client

package
v0.0.0-...-2831af8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginUserPath

func LoginUserPath(username string) string

LoginUserPath computes a request path to the login action of user.

Types

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the opinionated service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeJSON

func (c *Client) DecodeJSON(resp *http.Response) (*JSON, error)

DecodeJSON decodes the JSON instance encoded in resp body.

func (*Client) LoginUser

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

Login

func (*Client) NewLoginUserRequest

func (c *Client) NewLoginUserRequest(ctx context.Context, path string) (*http.Request, error)

NewLoginUserRequest create the request corresponding to the login action endpoint of the user resource.

type JSON

type JSON struct {
	// Username
	ID string `form:"id" json:"id" xml:"id"`
}

Credentials (default view)

Identifier: application/json; view=default

func (*JSON) Validate

func (mt *JSON) Validate() (err error)

Validate validates the JSON media type instance.

Jump to

Keyboard shortcuts

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