client

package
v0.0.0-...-b8fb0c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type Client struct {
	*goa.Client
}

Client is the congo service client.

func New

func New() *Client

New instantiates the client.

func (*Client) CallbackAuth

func (c *Client) CallbackAuth(path string) (*http.Response, error)

OAUTH2 callback endpoint

func (*Client) CreateProposal

func (c *Client) CreateProposal(path string, payload *CreateProposalPayload) (*http.Response, error)

Create a new proposal

func (*Client) CreateReview

func (c *Client) CreateReview(path string, payload *CreateReviewPayload) (*http.Response, error)

Create a new review

func (*Client) CreateUser

func (c *Client) CreateUser(path string, payload *CreateUserPayload) (*http.Response, error)

Record new user

func (*Client) DeleteProposal

func (c *Client) DeleteProposal(path string) (*http.Response, error)

DeleteProposal makes a request to the delete action endpoint of the proposal resource

func (*Client) DeleteReview

func (c *Client) DeleteReview(path string) (*http.Response, error)

DeleteReview makes a request to the delete action endpoint of the review resource

func (*Client) DeleteUser

func (c *Client) DeleteUser(path string) (*http.Response, error)

DeleteUser makes a request to the delete action endpoint of the user resource

func (*Client) ListProposal

func (c *Client) ListProposal(path string) (*http.Response, error)

List all proposals for a user

func (*Client) ListReview

func (c *Client) ListReview(path string) (*http.Response, error)

List all reviews for a proposal

func (*Client) ListUser

func (c *Client) ListUser(path string) (*http.Response, error)

List all users in account

func (*Client) OauthAuth

func (c *Client) OauthAuth(path string) (*http.Response, error)

OAUTH2 login endpoint

func (*Client) RefreshAuth

func (c *Client) RefreshAuth(path string, payload *RefreshAuthPayload) (*http.Response, error)

Obtain a refreshed access token

func (*Client) ShowProposal

func (c *Client) ShowProposal(path string) (*http.Response, error)

Retrieve proposal with given id

func (*Client) ShowReview

func (c *Client) ShowReview(path string) (*http.Response, error)

Retrieve review with given id

func (*Client) ShowUser

func (c *Client) ShowUser(path string) (*http.Response, error)

Retrieve user with given id

func (*Client) TokenAuth

func (c *Client) TokenAuth(path string, payload *TokenAuthPayload) (*http.Response, error)

Obtain an access token

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

func (c *Client) UpdateReview(path string, payload *UpdateReviewPayload) (*http.Response, error)

UpdateReview makes a request to the update action endpoint of the review resource

func (*Client) UpdateUser

func (c *Client) UpdateUser(path string, payload *UpdateUserPayload) (*http.Response, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL