Documentation
¶
Index ¶
- func CreateQuotePath() string
- func ListByIDQuotePath(userID string) string
- func ListQuotePath() string
- func LoginQuotePath() string
- type Client
- func (c *Client) CreateQuote(ctx context.Context, path string, payload *CreateQuotePayload, ...) (*http.Response, error)
- func (c *Client) DecodeJSON(resp *http.Response) (*JSON, error)
- func (c *Client) ListByIDQuote(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) ListQuote(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) LoginQuote(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) NewCreateQuoteRequest(ctx context.Context, path string, payload *CreateQuotePayload, ...) (*http.Request, error)
- func (c *Client) NewListByIDQuoteRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewListQuoteRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewLoginQuoteRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) SetBasicAuthSigner(signer goaclient.Signer)
- func (c *Client) SetJWTSigner(signer goaclient.Signer)
- type CreateQuotePayload
- type JSON
- type Quote
- type QuotePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateQuotePath ¶
func CreateQuotePath() string
CreateQuotePath computes a request path to the create action of quote.
func ListByIDQuotePath ¶
ListByIDQuotePath computes a request path to the list by ID action of quote.
func ListQuotePath ¶
func ListQuotePath() string
ListQuotePath computes a request path to the list action of quote.
func LoginQuotePath ¶
func LoginQuotePath() string
LoginQuotePath computes a request path to the login action of quote.
Types ¶
type Client ¶
type Client struct { *goaclient.Client JWTSigner goaclient.Signer BasicAuthSigner goaclient.Signer Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the koredata service client.
func (*Client) CreateQuote ¶
func (c *Client) CreateQuote(ctx context.Context, path string, payload *CreateQuotePayload, contentType string) (*http.Response, error)
Create a quote and add it to the database
func (*Client) DecodeJSON ¶
DecodeJSON decodes the JSON instance encoded in resp body.
func (*Client) ListByIDQuote ¶
Returns all the quotes for a given person
func (*Client) LoginQuote ¶
Login to the api
func (*Client) NewCreateQuoteRequest ¶
func (c *Client) NewCreateQuoteRequest(ctx context.Context, path string, payload *CreateQuotePayload, contentType string) (*http.Request, error)
NewCreateQuoteRequest create the request corresponding to the create action endpoint of the quote resource.
func (*Client) NewListByIDQuoteRequest ¶
NewListByIDQuoteRequest create the request corresponding to the list by ID action endpoint of the quote resource.
func (*Client) NewListQuoteRequest ¶
NewListQuoteRequest create the request corresponding to the list action endpoint of the quote resource.
func (*Client) NewLoginQuoteRequest ¶
NewLoginQuoteRequest create the request corresponding to the login action endpoint of the quote resource.
func (*Client) SetBasicAuthSigner ¶
SetBasicAuthSigner sets the request signer for the BasicAuth security scheme.
func (*Client) SetJWTSigner ¶
SetJWTSigner sets the request signer for the jwt security scheme.
type CreateQuotePayload ¶
type CreateQuotePayload struct { Name string `form:"Name" json:"Name" xml:"Name"` Quote string `form:"Quote" json:"Quote" xml:"Quote"` }
CreateQuotePayload is the quote create action payload.
type JSON ¶
type JSON struct { // Quote Quotes []*Quote `form:"Quotes,omitempty" json:"Quotes,omitempty" xml:"Quotes,omitempty"` }
A quote from the user database (default view)
Identifier: application/json; view=default
type Quote ¶
type Quote struct { // ID of the user ID *int `form:"ID,omitempty" json:"ID,omitempty" xml:"ID,omitempty"` // User ID of quoter Name *string `form:"Name,omitempty" json:"Name,omitempty" xml:"Name,omitempty"` // The actual quotes of the quoter Quote *string `form:"Quote,omitempty" json:"Quote,omitempty" xml:"Quote,omitempty"` }
All quotes for a given user ID
type QuotePayload ¶
type QuotePayload struct { Name *string `form:"Name,omitempty" json:"Name,omitempty" xml:"Name,omitempty"` Quote *string `form:"Quote,omitempty" json:"Quote,omitempty" xml:"Quote,omitempty"` }
QuotePayload user type.
func (*QuotePayload) Validate ¶
func (ut *QuotePayload) Validate() (err error)
Validate validates the QuotePayload type instance.