Documentation
      ¶
    
    
  
    
  
    Index ¶
- func CreateBottlePath() string
 - func ShowBottlePath(id string) 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) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)
 - func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)
 - func (c *Client) DownloadSwaggerYaml(ctx context.Context, dest string) (int64, 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) (*http.Request, error)
 - func (c *Client) ShowBottle(ctx context.Context, path 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 string `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 {
	// Unique bottle ID
	ID *string `form:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty" xml:"id,omitempty"`
	// 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 is the type used to create 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) DecodeErrorResponse ¶
DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.
func (*Client) DownloadSwaggerJSON ¶
DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) DownloadSwaggerYaml ¶
DownloadSwaggerYaml downloads swagger.yaml and writes it to the file dest. It returns the number of bytes downloaded in case of success.
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.
func (*Client) NewShowBottleRequest ¶
NewShowBottleRequest create the request corresponding to the show action endpoint of the bottle resource.