macaroondclient

package
v0.0.0-...-73d830b Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

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
}

func New

func New(netw, addr string, accessToken macaroon.Slice) *Client

New returns a new client that uses the given token for access. If accessToken is nil, the only methods that may be called are Login and ChangePassword.

func (*Client) Access

func (c *Client) Access(ctx context.Context, p *params.AccessRequest) (*params.AccessResponse, error)

func (*Client) FindRootKey

func (c *Client) FindRootKey(ctx context.Context, p *params.FindRootKeyRequest) (*params.FindRootKeyResponse, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, id []byte) ([]byte, error)

Get implemets bakery.RootKeyStore.Get by getting the key from the macaroond server.

func (*Client) Login

func (c *Client) Login(ctx context.Context, password string) (*bakery.Macaroon, error)

func (*Client) NewRootKey

func (c *Client) NewRootKey(ctx context.Context, p *params.NewRootKeyRequest) (*params.NewRootKeyResponse, error)

func (*Client) RootKey

func (c *Client) RootKey(ctx context.Context) (rootKey, id []byte, err error)

RootKey implements bakery.RootKeyStore.Get by using the macaroond server.

func (*Client) SetPassword

func (c *Client) SetPassword(ctx context.Context, p *params.SetPasswordRequest) error

Jump to

Keyboard shortcuts

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