client

package
v0.0.0-...-2587fd7 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2016 License: MIT 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 {
	*goaclient.Client
}

Client is the cellar service client.

func New

func New(c *http.Client) *Client

New instantiates the client.

func (*Client) CreateAccount

func (c *Client) CreateAccount(ctx context.Context, path string, payload *app.CreateAccountPayload) (*http.Response, error)

Create new account

func (*Client) CreateBottle

func (c *Client) CreateBottle(ctx context.Context, path string, payload *app.CreateBottlePayload) (*http.Response, error)

Record new bottle

func (*Client) DeleteAccount

func (c *Client) DeleteAccount(ctx context.Context, path string) (*http.Response, error)

DeleteAccount makes a request to the delete action endpoint of the account resource

func (*Client) DeleteBottle

func (c *Client) DeleteBottle(ctx context.Context, path string) (*http.Response, error)

DeleteBottle makes a request to the delete action endpoint of the bottle resource

func (*Client) ListBottle

func (c *Client) ListBottle(ctx context.Context, path string, years []int) (*http.Response, error)

List all bottles in account optionally filtering by year

func (*Client) RateBottle

func (c *Client) RateBottle(ctx context.Context, path string, payload *app.RateBottlePayload) (*http.Response, error)

RateBottle makes a request to the rate action endpoint of the bottle resource

func (*Client) ShowAccount

func (c *Client) ShowAccount(ctx context.Context, path string) (*http.Response, error)

Retrieve account with given id

func (*Client) ShowBottle

func (c *Client) ShowBottle(ctx context.Context, path string) (*http.Response, error)

Retrieve bottle with given id

func (*Client) UpdateAccount

func (c *Client) UpdateAccount(ctx context.Context, path string, payload *app.UpdateAccountPayload) (*http.Response, error)

Change account name

func (*Client) UpdateBottle

func (c *Client) UpdateBottle(ctx context.Context, path string, payload *app.UpdateBottlePayload) (*http.Response, error)

UpdateBottle makes a request to the update action endpoint of the bottle resource

func (*Client) WatchBottle

func (c *Client) WatchBottle(ctx context.Context, path string) (*websocket.Conn, error)

Retrieve bottle with given id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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