Documentation ¶
Index ¶
- type ActionCommand
- type Client
- func (c *Client) CallbackAuth(path string) (*http.Response, error)
- func (c *Client) CreateProposal(path string, payload *CreateProposalPayload) (*http.Response, error)
- func (c *Client) CreateReview(path string, payload *CreateReviewPayload) (*http.Response, error)
- func (c *Client) CreateUser(path string, payload *CreateUserPayload) (*http.Response, error)
- func (c *Client) DeleteProposal(path string) (*http.Response, error)
- func (c *Client) DeleteReview(path string) (*http.Response, error)
- func (c *Client) DeleteUser(path string) (*http.Response, error)
- func (c *Client) ListProposal(path string) (*http.Response, error)
- func (c *Client) ListReview(path string) (*http.Response, error)
- func (c *Client) ListUser(path string) (*http.Response, error)
- func (c *Client) OauthAuth(path string) (*http.Response, error)
- func (c *Client) RefreshAuth(path string, payload *RefreshAuthPayload) (*http.Response, error)
- func (c *Client) ShowProposal(path string) (*http.Response, error)
- func (c *Client) ShowReview(path string) (*http.Response, error)
- func (c *Client) ShowUser(path string) (*http.Response, error)
- func (c *Client) TokenAuth(path string, payload *TokenAuthPayload) (*http.Response, error)
- func (c *Client) UpdateProposal(path string, payload *UpdateProposalPayload) (*http.Response, error)
- func (c *Client) UpdateReview(path string, payload *UpdateReviewPayload) (*http.Response, error)
- func (c *Client) UpdateUser(path string, payload *UpdateUserPayload) (*http.Response, error)
- type CreateProposalPayload
- type CreateReviewPayload
- type CreateUserPayload
- type RefreshAuthPayload
- type TokenAuthPayload
- type UpdateProposalPayload
- type UpdateReviewPayload
- type UpdateUserPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCommand ¶
type ActionCommand interface { // Run makes the HTTP request and returns the response. Run(c *Client) (*http.Response, error) // RegisterFlags defines the command flags. RegisterFlags(*kingpin.CmdClause) }
ActionCommand represents a single action command as defined on the command line. Each command is associated with a generated client method and contains the logic to call the method passing in arguments computed from the command line.
type Client ¶
Client is the congo service client.
func (*Client) CallbackAuth ¶
OAUTH2 callback endpoint
func (*Client) CreateProposal ¶
func (c *Client) CreateProposal(path string, payload *CreateProposalPayload) (*http.Response, error)
Create a new proposal
func (*Client) CreateReview ¶
Create a new review
func (*Client) CreateUser ¶
Record new user
func (*Client) DeleteProposal ¶
DeleteProposal makes a request to the delete action endpoint of the proposal resource
func (*Client) DeleteReview ¶
DeleteReview makes a request to the delete action endpoint of the review resource
func (*Client) DeleteUser ¶
DeleteUser makes a request to the delete action endpoint of the user resource
func (*Client) ListProposal ¶
List all proposals for a user
func (*Client) ListReview ¶
List all reviews for a proposal
func (*Client) RefreshAuth ¶
Obtain a refreshed access token
func (*Client) ShowProposal ¶
Retrieve proposal with given id
func (*Client) ShowReview ¶
Retrieve review with given id
func (*Client) UpdateProposal ¶
func (c *Client) UpdateProposal(path string, payload *UpdateProposalPayload) (*http.Response, error)
UpdateProposal makes a request to the update action endpoint of the proposal resource
func (*Client) UpdateReview ¶
UpdateReview makes a request to the update action endpoint of the review resource
func (*Client) UpdateUser ¶
UpdateUser makes a request to the update action endpoint of the user resource
type CreateProposalPayload ¶
type CreateProposalPayload struct { Abstract string `json:"abstract,omitempty"` Detail string `json:"detail,omitempty"` Firstname string `json:"firstname,omitempty"` Title string `json:"title"` Withdrawn bool `json:"withdrawn,omitempty"` }
CreateProposalPayload is the data structure used to initialize the proposal create request body.
type CreateReviewPayload ¶
type CreateReviewPayload struct { Comment string `json:"comment,omitempty"` Rating int `json:"rating"` }
CreateReviewPayload is the data structure used to initialize the review create request body.
type CreateUserPayload ¶
type CreateUserPayload struct { Bio string `json:"bio,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Email string `json:"email,omitempty"` Firstname string `json:"firstname"` Lastname string `json:"lastname,omitempty"` Role string `json:"role,omitempty"` State string `json:"state,omitempty"` }
CreateUserPayload is the data structure used to initialize the user create request body.
type RefreshAuthPayload ¶
type RefreshAuthPayload struct { // UUID of requesting application Application string `json:"application,omitempty"` // email Email string `json:"email,omitempty"` // password Password string `json:"password,omitempty"` }
RefreshAuthPayload is the data structure used to initialize the auth refresh request body.
type TokenAuthPayload ¶
type TokenAuthPayload struct { // UUID of requesting application Application string `json:"application,omitempty"` // email Email string `json:"email,omitempty"` // password Password string `json:"password,omitempty"` }
TokenAuthPayload is the data structure used to initialize the auth token request body.
type UpdateProposalPayload ¶
type UpdateProposalPayload struct { Abstract string `json:"abstract,omitempty"` Detail string `json:"detail,omitempty"` Firstname string `json:"firstname,omitempty"` Title string `json:"title,omitempty"` Withdrawn bool `json:"withdrawn,omitempty"` }
UpdateProposalPayload is the data structure used to initialize the proposal update request body.
type UpdateReviewPayload ¶
type UpdateReviewPayload struct { Comment string `json:"comment,omitempty"` Rating int `json:"rating,omitempty"` }
UpdateReviewPayload is the data structure used to initialize the review update request body.
type UpdateUserPayload ¶
type UpdateUserPayload struct { Bio string `json:"bio,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Email string `json:"email,omitempty"` Firstname string `json:"firstname,omitempty"` Lastname string `json:"lastname,omitempty"` Role string `json:"role,omitempty"` State string `json:"state,omitempty"` }
UpdateUserPayload is the data structure used to initialize the user update request body.