client

package
v0.0.0-...-2b3100b Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapUIPath

func BootstrapUIPath() string

BootstrapUIPath computes a request path to the bootstrap action of ui.

func CallbackAuthPath

func CallbackAuthPath(provider string) string

CallbackAuthPath computes a request path to the callback action of auth.

func CreateProposalPath

func CreateProposalPath(userID string) string

CreateProposalPath computes a request path to the create action of proposal.

func CreateReviewPath

func CreateReviewPath(userID string, proposalID string) string

CreateReviewPath computes a request path to the create action of review.

func CreateUserPath

func CreateUserPath() string

CreateUserPath computes a request path to the create action of user.

func DeleteProposalPath

func DeleteProposalPath(userID string, proposalID int) string

DeleteProposalPath computes a request path to the delete action of proposal.

func DeleteReviewPath

func DeleteReviewPath(userID string, proposalID string, reviewID int) string

DeleteReviewPath computes a request path to the delete action of review.

func DeleteUserPath

func DeleteUserPath(userID int) string

DeleteUserPath computes a request path to the delete action of user.

func ListProposalPath

func ListProposalPath(userID string) string

ListProposalPath computes a request path to the list action of proposal.

func ListReviewPath

func ListReviewPath(userID string, proposalID string) string

ListReviewPath computes a request path to the list action of review.

func ListUserPath

func ListUserPath() string

ListUserPath computes a request path to the list action of user.

func OauthAuthPath

func OauthAuthPath(provider string) string

OauthAuthPath computes a request path to the oauth action of auth.

func RefreshAuthPath

func RefreshAuthPath() string

RefreshAuthPath computes a request path to the refresh action of auth.

func ShowProposalPath

func ShowProposalPath(userID string, proposalID int) string

ShowProposalPath computes a request path to the show action of proposal.

func ShowReviewPath

func ShowReviewPath(userID string, proposalID string, reviewID int) string

ShowReviewPath computes a request path to the show action of review.

func ShowUserPath

func ShowUserPath(userID int) string

ShowUserPath computes a request path to the show action of user.

func TokenAuthPath

func TokenAuthPath() string

TokenAuthPath computes a request path to the token action of auth.

func UpdateProposalPath

func UpdateProposalPath(userID string, proposalID int) string

UpdateProposalPath computes a request path to the update action of proposal.

func UpdateReviewPath

func UpdateReviewPath(userID string, proposalID string, reviewID int) string

UpdateReviewPath computes a request path to the update action of review.

func UpdateUserPath

func UpdateUserPath(userID int) string

UpdateUserPath computes a request path to the update action of user.

Types

type Authorize

type Authorize struct {
	// access token
	AccessToken *string `json:"access_token,omitempty" xml:"access_token,omitempty"`
	// Time to expiration in seconds
	ExpiresIn *int `json:"expires_in,omitempty" xml:"expires_in,omitempty"`
	// type of token
	TokenType *string `json:"token_type,omitempty" xml:"token_type,omitempty"`
}

Token authorization response

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the congo service client.

func New

func New(c *http.Client) *Client

New instantiates the client.

func (*Client) BootstrapUI

func (c *Client) BootstrapUI(ctx context.Context, path string) (*http.Response, error)

Render single page app HTML

func (*Client) CallbackAuth

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

OAUTH2 callback endpoint

func (*Client) CreateProposal

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

Create a new proposal

func (*Client) CreateReview

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

Create a new review

func (*Client) CreateUser

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

Record new user

func (*Client) DecodeAuthorize

func (c *Client) DecodeAuthorize(resp *http.Response) (*Authorize, error)

DecodeAuthorize decodes the Authorize instance encoded in resp body.

func (*Client) DecodeProposal

func (c *Client) DecodeProposal(resp *http.Response) (*Proposal, error)

DecodeProposal decodes the Proposal instance encoded in resp body.

func (*Client) DecodeProposalCollection

func (c *Client) DecodeProposalCollection(resp *http.Response) (ProposalCollection, error)

DecodeProposalCollection decodes the ProposalCollection instance encoded in resp body.

func (*Client) DecodeReview

func (c *Client) DecodeReview(resp *http.Response) (*Review, error)

DecodeReview decodes the Review instance encoded in resp body.

func (*Client) DecodeReviewCollection

func (c *Client) DecodeReviewCollection(resp *http.Response) (ReviewCollection, error)

DecodeReviewCollection decodes the ReviewCollection instance encoded in resp body.

func (*Client) DecodeUser

func (c *Client) DecodeUser(resp *http.Response) (*User, error)

DecodeUser decodes the User instance encoded in resp body.

func (*Client) DecodeUserCollection

func (c *Client) DecodeUserCollection(resp *http.Response) (UserCollection, error)

DecodeUserCollection decodes the UserCollection instance encoded in resp body.

func (*Client) DeleteProposal

func (c *Client) DeleteProposal(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, path string) (*http.Response, error)

List all proposals for a user

func (*Client) ListReview

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

List all reviews for a proposal

func (*Client) ListUser

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

List all users in account

func (*Client) NewBootstrapUIRequest

func (c *Client) NewBootstrapUIRequest(ctx context.Context, path string) (*http.Request, error)

NewBootstrapUIRequest create the request corresponding to the bootstrap action endpoint of the ui resource.

func (*Client) NewCallbackAuthRequest

func (c *Client) NewCallbackAuthRequest(ctx context.Context, path string) (*http.Request, error)

NewCallbackAuthRequest create the request corresponding to the callback action endpoint of the auth resource.

func (*Client) NewCreateProposalRequest

func (c *Client) NewCreateProposalRequest(ctx context.Context, path string, payload *CreateProposalPayload) (*http.Request, error)

NewCreateProposalRequest create the request corresponding to the create action endpoint of the proposal resource.

func (*Client) NewCreateReviewRequest

func (c *Client) NewCreateReviewRequest(ctx context.Context, path string, payload *CreateReviewPayload) (*http.Request, error)

NewCreateReviewRequest create the request corresponding to the create action endpoint of the review resource.

func (*Client) NewCreateUserRequest

func (c *Client) NewCreateUserRequest(ctx context.Context, path string, payload *CreateUserPayload) (*http.Request, error)

NewCreateUserRequest create the request corresponding to the create action endpoint of the user resource.

func (*Client) NewDeleteProposalRequest

func (c *Client) NewDeleteProposalRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteProposalRequest create the request corresponding to the delete action endpoint of the proposal resource.

func (*Client) NewDeleteReviewRequest

func (c *Client) NewDeleteReviewRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteReviewRequest create the request corresponding to the delete action endpoint of the review resource.

func (*Client) NewDeleteUserRequest

func (c *Client) NewDeleteUserRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteUserRequest create the request corresponding to the delete action endpoint of the user resource.

func (*Client) NewListProposalRequest

func (c *Client) NewListProposalRequest(ctx context.Context, path string) (*http.Request, error)

NewListProposalRequest create the request corresponding to the list action endpoint of the proposal resource.

func (*Client) NewListReviewRequest

func (c *Client) NewListReviewRequest(ctx context.Context, path string) (*http.Request, error)

NewListReviewRequest create the request corresponding to the list action endpoint of the review resource.

func (*Client) NewListUserRequest

func (c *Client) NewListUserRequest(ctx context.Context, path string) (*http.Request, error)

NewListUserRequest create the request corresponding to the list action endpoint of the user resource.

func (*Client) NewOauthAuthRequest

func (c *Client) NewOauthAuthRequest(ctx context.Context, path string) (*http.Request, error)

NewOauthAuthRequest create the request corresponding to the oauth action endpoint of the auth resource.

func (*Client) NewRefreshAuthRequest

func (c *Client) NewRefreshAuthRequest(ctx context.Context, path string, payload *RefreshAuthPayload) (*http.Request, error)

NewRefreshAuthRequest create the request corresponding to the refresh action endpoint of the auth resource.

func (*Client) NewShowProposalRequest

func (c *Client) NewShowProposalRequest(ctx context.Context, path string) (*http.Request, error)

NewShowProposalRequest create the request corresponding to the show action endpoint of the proposal resource.

func (*Client) NewShowReviewRequest

func (c *Client) NewShowReviewRequest(ctx context.Context, path string) (*http.Request, error)

NewShowReviewRequest create the request corresponding to the show action endpoint of the review resource.

func (*Client) NewShowUserRequest

func (c *Client) NewShowUserRequest(ctx context.Context, path string) (*http.Request, error)

NewShowUserRequest create the request corresponding to the show action endpoint of the user resource.

func (*Client) NewTokenAuthRequest

func (c *Client) NewTokenAuthRequest(ctx context.Context, path string, payload *TokenAuthPayload) (*http.Request, error)

NewTokenAuthRequest create the request corresponding to the token action endpoint of the auth resource.

func (*Client) NewUpdateProposalRequest

func (c *Client) NewUpdateProposalRequest(ctx context.Context, path string, payload *UpdateProposalPayload) (*http.Request, error)

NewUpdateProposalRequest create the request corresponding to the update action endpoint of the proposal resource.

func (*Client) NewUpdateReviewRequest

func (c *Client) NewUpdateReviewRequest(ctx context.Context, path string, payload *UpdateReviewPayload) (*http.Request, error)

NewUpdateReviewRequest create the request corresponding to the update action endpoint of the review resource.

func (*Client) NewUpdateUserRequest

func (c *Client) NewUpdateUserRequest(ctx context.Context, path string, payload *UpdateUserPayload) (*http.Request, error)

NewUpdateUserRequest create the request corresponding to the update action endpoint of the user resource.

func (*Client) OauthAuth

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

OAUTH2 login endpoint

func (*Client) RefreshAuth

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

Obtain a refreshed access token

func (*Client) ShowProposal

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

Retrieve proposal with given id

func (*Client) ShowReview

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

Retrieve review with given id

func (*Client) ShowUser

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

Retrieve user with given id

func (*Client) TokenAuth

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

Obtain an access token

func (*Client) UpdateProposal

func (c *Client) UpdateProposal(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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" xml:"abstract"`
	Detail    string `json:"detail" xml:"detail"`
	Title     string `json:"title" xml:"title"`
	Withdrawn *bool  `json:"withdrawn,omitempty" xml:"withdrawn,omitempty"`
}

CreateProposalPayload is the proposal create action payload.

type CreateReviewPayload

type CreateReviewPayload struct {
	Comment *string `json:"comment,omitempty" xml:"comment,omitempty"`
	Rating  int     `json:"rating" xml:"rating"`
}

CreateReviewPayload is the review create action payload.

type CreateUserPayload

type CreateUserPayload struct {
	Bio       *string `json:"bio,omitempty" xml:"bio,omitempty"`
	City      *string `json:"city,omitempty" xml:"city,omitempty"`
	Country   *string `json:"country,omitempty" xml:"country,omitempty"`
	Email     string  `json:"email" xml:"email"`
	Firstname string  `json:"firstname" xml:"firstname"`
	Lastname  string  `json:"lastname" xml:"lastname"`
	State     *string `json:"state,omitempty" xml:"state,omitempty"`
}

CreateUserPayload is the user create action payload.

type Proposal

type Proposal struct {
	// Response abstract
	Abstract *string `json:"abstract,omitempty" xml:"abstract,omitempty"`
	// Response detail
	Detail *string `json:"detail,omitempty" xml:"detail,omitempty"`
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
	// Reviews
	Reviews ReviewCollection `json:"reviews,omitempty" xml:"reviews,omitempty"`
	// Response title
	Title *string `json:"title,omitempty" xml:"title,omitempty"`
}

A response to a CFP

type ProposalCollection

type ProposalCollection []*Proposal

ProposalCollection media type is a collection of Proposal.

type RefreshAuthPayload

type RefreshAuthPayload struct {
	// UUID of requesting application
	Application *string `json:"application,omitempty" xml:"application,omitempty"`
	// email
	Email *string `json:"email,omitempty" xml:"email,omitempty"`
	// password
	Password *string `json:"password,omitempty" xml:"password,omitempty"`
}

RefreshAuthPayload is the auth refresh action payload.

type Review

type Review struct {
	// Review comments
	Comment *string `json:"comment,omitempty" xml:"comment,omitempty"`
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
	// Rating of proposal, from 1-5
	Rating *int `json:"rating,omitempty" xml:"rating,omitempty"`
}

A review is submitted by a reviewer

type ReviewCollection

type ReviewCollection []*Review

ReviewCollection media type is a collection of Review.

type TokenAuthPayload

type TokenAuthPayload struct {
	// UUID of requesting application
	Application *string `json:"application,omitempty" xml:"application,omitempty"`
	// email
	Email *string `json:"email,omitempty" xml:"email,omitempty"`
	// password
	Password *string `json:"password,omitempty" xml:"password,omitempty"`
}

TokenAuthPayload is the auth token action payload.

type UpdateProposalPayload

type UpdateProposalPayload struct {
	Abstract  *string `json:"abstract,omitempty" xml:"abstract,omitempty"`
	Detail    *string `json:"detail,omitempty" xml:"detail,omitempty"`
	Title     *string `json:"title,omitempty" xml:"title,omitempty"`
	Withdrawn *bool   `json:"withdrawn,omitempty" xml:"withdrawn,omitempty"`
}

UpdateProposalPayload is the proposal update action payload.

type UpdateReviewPayload

type UpdateReviewPayload struct {
	Comment *string `json:"comment,omitempty" xml:"comment,omitempty"`
	Rating  *int    `json:"rating,omitempty" xml:"rating,omitempty"`
}

UpdateReviewPayload is the review update action payload.

type UpdateUserPayload

type UpdateUserPayload struct {
	Bio       *string `json:"bio,omitempty" xml:"bio,omitempty"`
	City      *string `json:"city,omitempty" xml:"city,omitempty"`
	Country   *string `json:"country,omitempty" xml:"country,omitempty"`
	Email     string  `json:"email" xml:"email"`
	Firstname *string `json:"firstname,omitempty" xml:"firstname,omitempty"`
	Lastname  *string `json:"lastname,omitempty" xml:"lastname,omitempty"`
	State     *string `json:"state,omitempty" xml:"state,omitempty"`
}

UpdateUserPayload is the user update action payload.

type User

type User struct {
	// Biography of user
	Bio *string `json:"bio,omitempty" xml:"bio,omitempty"`
	// City of residence
	City *string `json:"city,omitempty" xml:"city,omitempty"`
	// Country of residence
	Country *string `json:"country,omitempty" xml:"country,omitempty"`
	// Email address of user
	Email *string `json:"email,omitempty" xml:"email,omitempty"`
	// First name of user
	Firstname *string `json:"firstname,omitempty" xml:"firstname,omitempty"`
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
	// Last name of user
	Lastname *string `json:"lastname,omitempty" xml:"lastname,omitempty"`
	// Role of user
	Role *string `json:"role,omitempty" xml:"role,omitempty"`
	// State of residence
	State *string `json:"state,omitempty" xml:"state,omitempty"`
}

A user belonging to a tenant account

type UserCollection

type UserCollection []*User

UserCollection media type is a collection of User.

Jump to

Keyboard shortcuts

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