1
// The code in this file was automatically generated by running httprequest-generate-client.
7
"github.com/juju/httprequest"
10
"github.com/juju/idmclient/params"
14
Client httprequest.Client
17
// QueryUsers serves the /u endpoint. See http://tinyurl.com/lu3mmr9 for
19
func (c *client) QueryUsers(p *params.QueryUsersRequest) ([]string, error) {
21
err := c.Client.Call(p, &r)
25
func (c *client) SetUser(p *params.SetUserRequest) error {
26
return c.Client.Call(p, nil)
29
// SetUserExtraInfo serves the /v1/u/:username/extra-info endpoint, see
30
// http://tinyurl.com/mqpynlw for details.
31
func (c *client) SetUserExtraInfo(p *params.SetUserExtraInfoRequest) error {
32
return c.Client.Call(p, nil)
35
// ServeUserPutExtraInfoItem serves the /u/:username/extra-info/:item
36
// endpoint, see http://tinyurl.com/l5dc4r4 for details.
37
func (c *client) SetUserExtraInfoItem(p *params.SetUserExtraInfoItemRequest) error {
38
return c.Client.Call(p, nil)
41
// User serves the /u/$username endpoint. See http://tinyurl.com/lrdjwmw
43
func (c *client) User(p *params.UserRequest) (*params.User, error) {
45
err := c.Client.Call(p, &r)
49
// UserExtraInfo serves the /v1/u/:username/extra-info endpoint, see
50
// http://tinyurl.com/mxo24yy for details.
51
func (c *client) UserExtraInfo(p *params.UserExtraInfoRequest) (map[string]interface{}, error) {
52
var r map[string]interface{}
53
err := c.Client.Call(p, &r)
57
// UserExtraInfoItem serves the /u/:username/extra-info/:item
58
// endpoint, see http://tinyurl.com/mjuu7dt for details.
59
func (c *client) UserExtraInfoItem(p *params.UserExtraInfoItemRequest) (interface{}, error) {
61
err := c.Client.Call(p, &r)
65
// serveUserGroups serves the /u/$username/groups endpoint, and returns
66
// the list of groups associated with the user.
67
func (c *client) UserGroups(p *params.UserGroupsRequest) ([]string, error) {
69
err := c.Client.Call(p, &r)
73
// UserIDPGroups serves the /u/$username/idpgroups endpoint, and returns
74
// the list of groups associated with the user. This endpoint should no longer be used
75
// and is maintained for backwards compatibility purposes only.
76
func (c *client) UserIDPGroups(p *params.UserIDPGroupsRequest) ([]string, error) {
78
err := c.Client.Call(p, &r)
82
// UserToken serves a token, in the form of a macaroon, identifying
83
// the user. This token can only be generated by an administrator.
84
func (c *client) UserToken(p *params.UserTokenRequest) (*macaroon.Macaroon, error) {
85
var r *macaroon.Macaroon
86
err := c.Client.Call(p, &r)
90
func (c *client) VerifyToken(p *params.VerifyTokenRequest) (map[string]string, error) {
91
var r map[string]string
92
err := c.Client.Call(p, &r)