identity

package
v0.0.0-...-f67de66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2016 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package identity implements a client for identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a client that can be used to query an identity server.

func NewClient

func NewClient(p *Params) *Client

NewClient creates a new Client.

func (*Client) GetJSON

func (c *Client) GetJSON(path string, v interface{}) error

GetJSON performs a JSON request on the identity server at the specified path. The returned value is unmarshalled to v.

func (*Client) GroupsForUser

func (c *Client) GroupsForUser(username string) ([]string, error)

GroupsForUser gets the list of groups to which the specified user belongs.

type Params

type Params struct {
	URL    string
	Client *httpbakery.Client
}

Params provides the parameters to be passed when creating a new client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL