app

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountAuthController

func MountAuthController(service *goa.Service, ctrl AuthController)

MountAuthController "mounts" a Auth resource controller on the given service.

func MountProposalController

func MountProposalController(service *goa.Service, ctrl ProposalController)

MountProposalController "mounts" a Proposal resource controller on the given service.

func MountReviewController

func MountReviewController(service *goa.Service, ctrl ReviewController)

MountReviewController "mounts" a Review resource controller on the given service.

func MountUIController

func MountUIController(service *goa.Service, ctrl UIController)

MountUIController "mounts" a UI resource controller on the given service.

func MountUserController

func MountUserController(service *goa.Service, ctrl UserController)

MountUserController "mounts" a User resource controller on the given service.

func ProposalHref

func ProposalHref(userID, proposalID interface{}) string

ProposalHref returns the resource href.

func ReviewHref

func ReviewHref(userID, proposalID, reviewID interface{}) string

ReviewHref returns the resource href.

func UserHref

func UserHref(userID interface{}) string

UserHref returns the resource href.

Types

type AuthController

type AuthController interface {
	goa.Muxer
	Callback(*CallbackAuthContext) error
	Oauth(*OauthAuthContext) error
	Refresh(*RefreshAuthContext) error
	Token(*TokenAuthContext) error
}

AuthController is the controller interface for the Auth actions.

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"`
}

Authorize media type.

Identifier: application/vnd.authorize+json

type BootstrapUIContext

type BootstrapUIContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
}

BootstrapUIContext provides the ui bootstrap action context.

func NewBootstrapUIContext

func NewBootstrapUIContext(ctx context.Context, service *goa.Service) (*BootstrapUIContext, error)

NewBootstrapUIContext parses the incoming request URL and body, performs validations and creates the context used by the ui controller bootstrap action.

func (*BootstrapUIContext) OK

func (ctx *BootstrapUIContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type CallbackAuthContext

type CallbackAuthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service  *goa.Service
	Provider string
}

CallbackAuthContext provides the auth callback action context.

func NewCallbackAuthContext

func NewCallbackAuthContext(ctx context.Context, service *goa.Service) (*CallbackAuthContext, error)

NewCallbackAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller callback action.

func (*CallbackAuthContext) OK

func (ctx *CallbackAuthContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type CreateProposalContext

type CreateProposalContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	UserID  int
	Payload *CreateProposalPayload
}

CreateProposalContext provides the proposal create action context.

func NewCreateProposalContext

func NewCreateProposalContext(ctx context.Context, service *goa.Service) (*CreateProposalContext, error)

NewCreateProposalContext parses the incoming request URL and body, performs validations and creates the context used by the proposal controller create action.

func (*CreateProposalContext) Created

func (ctx *CreateProposalContext) Created() error

Created sends a HTTP response with status code 201.

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.

func (*CreateProposalPayload) Validate

func (payload *CreateProposalPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type CreateReviewContext

type CreateReviewContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	UserID     int
	Payload    *CreateReviewPayload
}

CreateReviewContext provides the review create action context.

func NewCreateReviewContext

func NewCreateReviewContext(ctx context.Context, service *goa.Service) (*CreateReviewContext, error)

NewCreateReviewContext parses the incoming request URL and body, performs validations and creates the context used by the review controller create action.

func (*CreateReviewContext) Created

func (ctx *CreateReviewContext) Created() error

Created sends a HTTP response with status code 201.

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.

func (*CreateReviewPayload) Validate

func (payload *CreateReviewPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type CreateUserContext

type CreateUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	Payload *CreateUserPayload
}

CreateUserContext provides the user create action context.

func NewCreateUserContext

func NewCreateUserContext(ctx context.Context, service *goa.Service) (*CreateUserContext, error)

NewCreateUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller create action.

func (*CreateUserContext) Created

func (ctx *CreateUserContext) Created() error

Created sends a HTTP response with status code 201.

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.

func (*CreateUserPayload) Validate

func (payload *CreateUserPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type DeleteProposalContext

type DeleteProposalContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	UserID     int
}

DeleteProposalContext provides the proposal delete action context.

func NewDeleteProposalContext

func NewDeleteProposalContext(ctx context.Context, service *goa.Service) (*DeleteProposalContext, error)

NewDeleteProposalContext parses the incoming request URL and body, performs validations and creates the context used by the proposal controller delete action.

func (*DeleteProposalContext) NoContent

func (ctx *DeleteProposalContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*DeleteProposalContext) NotFound

func (ctx *DeleteProposalContext) NotFound() error

NotFound sends a HTTP response with status code 404.

type DeleteReviewContext

type DeleteReviewContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	ReviewID   int
	UserID     int
}

DeleteReviewContext provides the review delete action context.

func NewDeleteReviewContext

func NewDeleteReviewContext(ctx context.Context, service *goa.Service) (*DeleteReviewContext, error)

NewDeleteReviewContext parses the incoming request URL and body, performs validations and creates the context used by the review controller delete action.

func (*DeleteReviewContext) NoContent

func (ctx *DeleteReviewContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*DeleteReviewContext) NotFound

func (ctx *DeleteReviewContext) NotFound() error

NotFound sends a HTTP response with status code 404.

type DeleteUserContext

type DeleteUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	UserID  int
}

DeleteUserContext provides the user delete action context.

func NewDeleteUserContext

func NewDeleteUserContext(ctx context.Context, service *goa.Service) (*DeleteUserContext, error)

NewDeleteUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller delete action.

func (*DeleteUserContext) NoContent

func (ctx *DeleteUserContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*DeleteUserContext) NotFound

func (ctx *DeleteUserContext) NotFound() error

NotFound sends a HTTP response with status code 404.

type ListProposalContext

type ListProposalContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	UserID  int
}

ListProposalContext provides the proposal list action context.

func NewListProposalContext

func NewListProposalContext(ctx context.Context, service *goa.Service) (*ListProposalContext, error)

NewListProposalContext parses the incoming request URL and body, performs validations and creates the context used by the proposal controller list action.

func (*ListProposalContext) OK

OK sends a HTTP response with status code 200.

type ListReviewContext

type ListReviewContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	UserID     int
}

ListReviewContext provides the review list action context.

func NewListReviewContext

func NewListReviewContext(ctx context.Context, service *goa.Service) (*ListReviewContext, error)

NewListReviewContext parses the incoming request URL and body, performs validations and creates the context used by the review controller list action.

func (*ListReviewContext) OK

OK sends a HTTP response with status code 200.

type ListUserContext

type ListUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
}

ListUserContext provides the user list action context.

func NewListUserContext

func NewListUserContext(ctx context.Context, service *goa.Service) (*ListUserContext, error)

NewListUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller list action.

func (*ListUserContext) OK

OK sends a HTTP response with status code 200.

type Login

type Login 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"`
}

Login media type.

Identifier: application/vnd.login+json

type OauthAuthContext

type OauthAuthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service  *goa.Service
	Provider string
}

OauthAuthContext provides the auth oauth action context.

func NewOauthAuthContext

func NewOauthAuthContext(ctx context.Context, service *goa.Service) (*OauthAuthContext, error)

NewOauthAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller oauth action.

func (*OauthAuthContext) OK

func (ctx *OauthAuthContext) OK(r *Authorize) error

OK sends a HTTP response with status code 200.

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"`
	// Links to related resources
	Links *ProposalLinks `json:"links,omitempty" xml:"links,omitempty"`
	// Reviews
	Reviews ReviewCollection `json:"reviews,omitempty" xml:"reviews,omitempty"`
	// Response title
	Title *string `json:"title,omitempty" xml:"title,omitempty"`
}

Proposal media type.

Identifier: application/vnd.proposal+json

func (*Proposal) Validate

func (mt *Proposal) Validate() (err error)

Validate validates the Proposal media type instance.

type ProposalCollection

type ProposalCollection []*Proposal

ProposalCollection media type is a collection of Proposal.

Identifier: application/vnd.proposal+json; type=collection

func (ProposalCollection) Validate

func (mt ProposalCollection) Validate() (err error)

Validate validates the ProposalCollection media type instance.

type ProposalController

type ProposalController interface {
	goa.Muxer
	Create(*CreateProposalContext) error
	Delete(*DeleteProposalContext) error
	List(*ListProposalContext) error
	Show(*ShowProposalContext) error
	Update(*UpdateProposalContext) error
}

ProposalController is the controller interface for the Proposal actions.

type ProposalLink struct {
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
	// Response title
	Title *string `json:"title,omitempty" xml:"title,omitempty"`
}

ProposalLink media type.

Identifier: application/vnd.proposal+json

func (*ProposalLink) Validate

func (mt *ProposalLink) Validate() (err error)

Validate validates the ProposalLink media type instance.

type ProposalLinks struct {
	Reviews ReviewLinkCollection `json:"reviews,omitempty" xml:"reviews,omitempty"`
}

ProposalLinks contains links to related resources of Proposal.

type ProposalLinksArray

type ProposalLinksArray []*ProposalLinks

ProposalLinksArray contains links to related resources of ProposalCollection.

type ProposalPayload

type ProposalPayload 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"`
}

ProposalPayload user type.

func (*ProposalPayload) Validate

func (ut *ProposalPayload) Validate() (err error)

Validate validates the ProposalPayload type instance.

type RefreshAuthContext

type RefreshAuthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	Payload *RefreshAuthPayload
}

RefreshAuthContext provides the auth refresh action context.

func NewRefreshAuthContext

func NewRefreshAuthContext(ctx context.Context, service *goa.Service) (*RefreshAuthContext, error)

NewRefreshAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller refresh action.

func (*RefreshAuthContext) Created

func (ctx *RefreshAuthContext) Created(r *Authorize) error

Created sends a HTTP response with status code 201.

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"`
}

Review media type.

Identifier: application/vnd.review+json

func (*Review) Validate

func (mt *Review) Validate() (err error)

Validate validates the Review media type instance.

type ReviewCollection

type ReviewCollection []*Review

ReviewCollection media type is a collection of Review.

Identifier: application/vnd.review+json; type=collection

func (ReviewCollection) Validate

func (mt ReviewCollection) Validate() (err error)

Validate validates the ReviewCollection media type instance.

type ReviewController

type ReviewController interface {
	goa.Muxer
	Create(*CreateReviewContext) error
	Delete(*DeleteReviewContext) error
	List(*ListReviewContext) error
	Show(*ShowReviewContext) error
	Update(*UpdateReviewContext) error
}

ReviewController is the controller interface for the Review actions.

type ReviewLink struct {
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
}

ReviewLink media type.

Identifier: application/vnd.review+json

type ReviewLinkCollection

type ReviewLinkCollection []*ReviewLink

ReviewLinkCollection media type is a collection of ReviewLink.

Identifier: application/vnd.review+json; type=collection

type ReviewPayload

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

ReviewPayload user type.

func (*ReviewPayload) Validate

func (ut *ReviewPayload) Validate() (err error)

Validate validates the ReviewPayload type instance.

type ShowProposalContext

type ShowProposalContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	UserID     int
}

ShowProposalContext provides the proposal show action context.

func NewShowProposalContext

func NewShowProposalContext(ctx context.Context, service *goa.Service) (*ShowProposalContext, error)

NewShowProposalContext parses the incoming request URL and body, performs validations and creates the context used by the proposal controller show action.

func (*ShowProposalContext) NotFound

func (ctx *ShowProposalContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowProposalContext) OK

func (ctx *ShowProposalContext) OK(r *Proposal) error

OK sends a HTTP response with status code 200.

type ShowReviewContext

type ShowReviewContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	ReviewID   int
	UserID     int
}

ShowReviewContext provides the review show action context.

func NewShowReviewContext

func NewShowReviewContext(ctx context.Context, service *goa.Service) (*ShowReviewContext, error)

NewShowReviewContext parses the incoming request URL and body, performs validations and creates the context used by the review controller show action.

func (*ShowReviewContext) NotFound

func (ctx *ShowReviewContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowReviewContext) OK

func (ctx *ShowReviewContext) OK(r *Review) error

OK sends a HTTP response with status code 200.

type ShowUserContext

type ShowUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	UserID  int
}

ShowUserContext provides the user show action context.

func NewShowUserContext

func NewShowUserContext(ctx context.Context, service *goa.Service) (*ShowUserContext, error)

NewShowUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller show action.

func (*ShowUserContext) NotFound

func (ctx *ShowUserContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowUserContext) OK

func (ctx *ShowUserContext) OK(r *User) error

OK sends a HTTP response with status code 200.

type TokenAuthContext

type TokenAuthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	Payload *TokenAuthPayload
}

TokenAuthContext provides the auth token action context.

func NewTokenAuthContext

func NewTokenAuthContext(ctx context.Context, service *goa.Service) (*TokenAuthContext, error)

NewTokenAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller token action.

func (*TokenAuthContext) Created

func (ctx *TokenAuthContext) Created(r *Authorize) error

Created sends a HTTP response with status code 201.

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 UIController

type UIController interface {
	goa.Muxer
	Bootstrap(*BootstrapUIContext) error
}

UIController is the controller interface for the UI actions.

type UpdateProposalContext

type UpdateProposalContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	UserID     int
	Payload    *UpdateProposalPayload
}

UpdateProposalContext provides the proposal update action context.

func NewUpdateProposalContext

func NewUpdateProposalContext(ctx context.Context, service *goa.Service) (*UpdateProposalContext, error)

NewUpdateProposalContext parses the incoming request URL and body, performs validations and creates the context used by the proposal controller update action.

func (*UpdateProposalContext) NoContent

func (ctx *UpdateProposalContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdateProposalContext) NotFound

func (ctx *UpdateProposalContext) NotFound() error

NotFound sends a HTTP response with status code 404.

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.

func (*UpdateProposalPayload) Validate

func (payload *UpdateProposalPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type UpdateReviewContext

type UpdateReviewContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service    *goa.Service
	ProposalID int
	ReviewID   int
	UserID     int
	Payload    *UpdateReviewPayload
}

UpdateReviewContext provides the review update action context.

func NewUpdateReviewContext

func NewUpdateReviewContext(ctx context.Context, service *goa.Service) (*UpdateReviewContext, error)

NewUpdateReviewContext parses the incoming request URL and body, performs validations and creates the context used by the review controller update action.

func (*UpdateReviewContext) NoContent

func (ctx *UpdateReviewContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdateReviewContext) NotFound

func (ctx *UpdateReviewContext) NotFound() error

NotFound sends a HTTP response with status code 404.

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.

func (*UpdateReviewPayload) Validate

func (payload *UpdateReviewPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type UpdateUserContext

type UpdateUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Service *goa.Service
	UserID  int
	Payload *UpdateUserPayload
}

UpdateUserContext provides the user update action context.

func NewUpdateUserContext

func NewUpdateUserContext(ctx context.Context, service *goa.Service) (*UpdateUserContext, error)

NewUpdateUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller update action.

func (*UpdateUserContext) NoContent

func (ctx *UpdateUserContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdateUserContext) NotFound

func (ctx *UpdateUserContext) NotFound() error

NotFound sends a HTTP response with status code 404.

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.

func (*UpdateUserPayload) Validate

func (payload *UpdateUserPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

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"`
}

User media type.

Identifier: application/vnd.user+json

func (*User) Validate

func (mt *User) Validate() (err error)

Validate validates the User media type instance.

type UserCollection

type UserCollection []*User

UserCollection media type is a collection of User.

Identifier: application/vnd.user+json; type=collection

func (UserCollection) Validate

func (mt UserCollection) Validate() (err error)

Validate validates the UserCollection media type instance.

type UserController

type UserController interface {
	goa.Muxer
	Create(*CreateUserContext) error
	Delete(*DeleteUserContext) error
	List(*ListUserContext) error
	Show(*ShowUserContext) error
	Update(*UpdateUserContext) error
}

UserController is the controller interface for the User actions.

type UserLink struct {
	// Email address of user
	Email *string `json:"email,omitempty" xml:"email,omitempty"`
	// API href of user
	Href *string `json:"href,omitempty" xml:"href,omitempty"`
	// ID of user
	ID *int `json:"id,omitempty" xml:"id,omitempty"`
}

UserLink media type.

Identifier: application/vnd.user+json

func (*UserLink) Validate

func (mt *UserLink) Validate() (err error)

Validate validates the UserLink media type instance.

type UserPayload

type UserPayload 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,omitempty" xml:"email,omitempty"`
	Firstname *string `json:"firstname,omitempty" xml:"firstname,omitempty"`
	Lastname  *string `json:"lastname,omitempty" xml:"lastname,omitempty"`
	State     *string `json:"state,omitempty" xml:"state,omitempty"`
}

UserPayload user type.

func (*UserPayload) Validate

func (ut *UserPayload) Validate() (err error)

Validate validates the UserPayload type instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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