auth

Paddy 2014-08-13 Parent:3423c552e249 Child:ceba439a0766

11:9a1e62c24903 Go to Latest

auth/client.go

Add a bunch of TODOs. Let's be realistic about what still needs to be done and tag it appropriately.

History
1 package auth
3 import (
4 "secondbit.org/uuid"
5 )
7 // Client information
8 type Client struct {
9 ID uuid.ID
10 Secret string
11 RedirectURI string
12 OwnerID uuid.ID
13 Name string
14 Logo string
15 }
17 func GetClient(id uuid.ID, ctx Context) (Client, error) {
18 // TODO: pull client from ctx
19 return Client{}, nil
20 }
22 func createClient(name, logo, redirectURI string, owner uuid.ID, ctx Context) (Client, error) {
23 // TODO: store client in ctx
24 return Client{}, nil
25 }
27 func updateClient(client *Client, name, logo, redirectURI *string, ctx Context) error {
28 // TODO: update client in ctx
29 return nil
30 }
32 func removeClient(id uuid.ID, ctx Context) error {
33 // TODO: delete client from ctx
34 return nil
35 }
37 func listClients(id uuid.ID, page, num int, ctx Context) ([]Client, error) {
38 // TODO: retrieve list of clients from ctx
39 return []Client{}, nil
40 }