client

package
v0.0.0-...-84d5eb4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowBottlePath

func ShowBottlePath(bottleID int) string

ShowBottlePath computes a request path to the show action of bottle.

Types

type Client

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

Client is the cellar service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeGoaExampleBottle

func (c *Client) DecodeGoaExampleBottle(resp *http.Response) (*GoaExampleBottle, error)

DecodeGoaExampleBottle decodes the GoaExampleBottle instance encoded in resp body.

func (*Client) NewShowBottleRequest

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

NewShowBottleRequest create the request corresponding to the show action endpoint of the bottle resource.

func (*Client) ShowBottle

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

Get bottle by id

type GoaExampleBottle

type GoaExampleBottle struct {
	// API href for making requests on the bottle
	Href string `form:"href" json:"href" yaml:"href" xml:"href"`
	// Unique bottle ID
	ID int `form:"id" json:"id" yaml:"id" xml:"id"`
	// Name of wine
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
}

A bottle of wine (default view)

Identifier: application/vnd.goa.example.bottle+json; view=default

func (*GoaExampleBottle) Validate

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

Validate validates the GoaExampleBottle media type instance.

Jump to

Keyboard shortcuts

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