Documentation ¶
Index ¶
- func CreateQuotePath() string
- func CreateSuggestionPath() string
- func ListByIDQuotePath(userID string) string
- func ListQuotePath() string
- func ListSuggestionPath(showID string) string
- func LoginQuotePath() string
- type Client
- func (c *Client) CreateQuote(ctx context.Context, path string, payload *CreateQuotePayload, ...) (*http.Response, error)
- func (c *Client) CreateSuggestion(ctx context.Context, path string, payload *CreateSuggestionPayload, ...) (*http.Response, error)
- func (c *Client) DecodeQuote(resp *http.Response) (*Quote, error)
- func (c *Client) DecodeQuotes(resp *http.Response) (*Quotes, error)
- func (c *Client) DecodeSuggestions(resp *http.Response) (*Suggestions, 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) ListSuggestion(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) NewCreateSuggestionRequest(ctx context.Context, path string, payload *CreateSuggestionPayload, ...) (*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) NewListSuggestionRequest(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 CreateSuggestionPayload
- type Quote
- type Quotes
- type Suggestion
- type Suggestions
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 CreateSuggestionPath ¶
func CreateSuggestionPath() string
CreateSuggestionPath computes a request path to the create action of suggestion.
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 ListSuggestionPath ¶
ListSuggestionPath computes a request path to the list action of suggestion.
func LoginQuotePath ¶
func LoginQuotePath() string
LoginQuotePath computes a request path to the login action of quote.
Types ¶
type Client ¶
type Client struct { *goaclient.Client BasicAuthSigner goaclient.Signer JWTSigner 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) CreateSuggestion ¶
func (c *Client) CreateSuggestion(ctx context.Context, path string, payload *CreateSuggestionPayload, contentType string) (*http.Response, error)
Create a new suggestion
func (*Client) DecodeQuote ¶
DecodeQuote decodes the Quote instance encoded in resp body.
func (*Client) DecodeQuotes ¶
DecodeQuotes decodes the Quotes instance encoded in resp body.
func (*Client) DecodeSuggestions ¶
func (c *Client) DecodeSuggestions(resp *http.Response) (*Suggestions, error)
DecodeSuggestions decodes the Suggestions instance encoded in resp body.
func (*Client) ListByIDQuote ¶
Returns all the quotes for a given person
func (*Client) ListSuggestion ¶
Return all suggestions for a given show ID
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) NewCreateSuggestionRequest ¶
func (c *Client) NewCreateSuggestionRequest(ctx context.Context, path string, payload *CreateSuggestionPayload, contentType string) (*http.Request, error)
NewCreateSuggestionRequest create the request corresponding to the create action endpoint of the suggestion 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) NewListSuggestionRequest ¶
NewListSuggestionRequest create the request corresponding to the list action endpoint of the suggestion 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 { // ID of the user ID *int `form:"ID,omitempty" json:"ID,omitempty" xml:"ID,omitempty"` // User ID of quoter Name string `form:"Name" json:"Name" xml:"Name"` // The actual quotes of the quoter Quote string `form:"Quote" json:"Quote" xml:"Quote"` }
CreateQuotePayload is the quote create action payload.
type CreateSuggestionPayload ¶
type CreateSuggestionPayload struct { // The ID of the show ShowID string `form:"ShowID" json:"ShowID" xml:"ShowID"` // Identity of suggester Suggester string `form:"Suggester" json:"Suggester" xml:"Suggester"` // The suggested title Title string `form:"Title" json:"Title" xml:"Title"` }
CreateSuggestionPayload is the suggestion create action payload.
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 (default view)
Identifier: vnd.application.io/quote; view=default
type Quotes ¶
type Quotes struct { // Quote Quotes []*Quote `form:"Quotes,omitempty" json:"Quotes,omitempty" xml:"Quotes,omitempty"` }
A quote from the user database (default view)
Identifier: vnd.application.io/quotes; view=default
type Suggestion ¶
type Suggestion struct { // The ID of the show ShowID *string `form:"ShowID,omitempty" json:"ShowID,omitempty" xml:"ShowID,omitempty"` // Identity of suggester Suggester *string `form:"Suggester,omitempty" json:"Suggester,omitempty" xml:"Suggester,omitempty"` // The suggested title Title *string `form:"Title,omitempty" json:"Title,omitempty" xml:"Title,omitempty"` }
All suggestions for a given user ID
type Suggestions ¶
type Suggestions struct { // Suggestion Suggestions []*Suggestion `form:"Suggestions,omitempty" json:"Suggestions,omitempty" xml:"Suggestions,omitempty"` }
Suggestions media type (default view)
Identifier: vnd.application.io/suggestions; view=default