Documentation ¶
Index ¶
- func CreateBottlePath() string
- func ShowBottlePath(id int) string
- type Bottle
- type BottlePayload
- type Client
- func (c *Client) CreateBottle(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Response, error)
- func (c *Client) DecodeBottle(resp *http.Response) (*Bottle, error)
- func (c *Client) NewCreateBottleRequest(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Request, error)
- func (c *Client) NewShowBottleRequest(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Request, error)
- func (c *Client) ShowBottle(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBottlePath ¶
func CreateBottlePath() string
CreateBottlePath computes a request path to the create action of bottle.
func ShowBottlePath ¶
ShowBottlePath computes a request path to the show action of bottle.
Types ¶
type Bottle ¶
type Bottle struct { // Unique bottle ID ID int `form:"ID" json:"ID" yaml:"ID" xml:"ID"` // Name of bottle Name string `form:"name" json:"name" yaml:"name" xml:"name"` // Rating of bottle Rating int `form:"rating" json:"rating" yaml:"rating" xml:"rating"` // Vintage of bottle Vintage int `form:"vintage" json:"vintage" yaml:"vintage" xml:"vintage"` }
bottle media type (default view)
Identifier: application/vnd.gophercon.goa.bottle; view=default
type BottlePayload ¶
type BottlePayload struct { // Name of bottle Name string `form:"name" json:"name" yaml:"name" xml:"name"` // Rating of bottle Rating int `form:"rating" json:"rating" yaml:"rating" xml:"rating"` // Vintage of bottle Vintage int `form:"vintage" json:"vintage" yaml:"vintage" xml:"vintage"` }
BottlePayload that creates bottles
func (*BottlePayload) Validate ¶
func (ut *BottlePayload) Validate() (err error)
Validate validates the BottlePayload type instance.
type Client ¶
type Client struct { *goaclient.Client Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the cellar service client.
func (*Client) CreateBottle ¶
func (c *Client) CreateBottle(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Response, error)
creates a bottle
func (*Client) DecodeBottle ¶
DecodeBottle decodes the Bottle instance encoded in resp body.
func (*Client) NewCreateBottleRequest ¶
func (c *Client) NewCreateBottleRequest(ctx context.Context, path string, payload *BottlePayload, contentType string) (*http.Request, error)
NewCreateBottleRequest create the request corresponding to the create action endpoint of the bottle resource.
Click to show internal directories.
Click to hide internal directories.