Documentation ¶
Index ¶
- func AccountHref(accountID interface{}) string
- func MountAccountController(service goa.Service, ctrl AccountController)
- func MountSeriesController(service goa.Service, ctrl SeriesController)
- func MountUserController(service goa.Service, ctrl UserController)
- func SeriesHref(accountID, seriesID interface{}) string
- func UserHref(accountID, userID interface{}) string
- type Account
- type AccountController
- type AccountViewEnum
- type CreateAccountContext
- type CreateAccountPayload
- type CreateSeriesContext
- type CreateSeriesPayload
- type CreateUserContext
- type CreateUserPayload
- type DeleteAccountContext
- type ListSeriesContext
- type ListUserContext
- type Series
- type SeriesCollection
- type SeriesCollectionViewEnum
- type SeriesController
- type SeriesPayload
- type SeriesViewEnum
- type ShowAccountContext
- type ShowSeriesContext
- type ShowUserContext
- type UpdateAccountContext
- type UpdateAccountPayload
- type UpdateSeriesContext
- type UpdateSeriesPayload
- type UpdateUserContext
- type UpdateUserPayload
- type User
- type UserCollection
- type UserCollectionViewEnum
- type UserController
- type UserPayload
- type UserViewEnum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountHref ¶
func AccountHref(accountID interface{}) string
AccountHref returns the resource href.
func MountAccountController ¶
func MountAccountController(service goa.Service, ctrl AccountController)
MountAccountController "mounts" a Account resource controller on the given service.
func MountSeriesController ¶
func MountSeriesController(service goa.Service, ctrl SeriesController)
MountSeriesController "mounts" a Series 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 SeriesHref ¶
func SeriesHref(accountID, seriesID interface{}) string
SeriesHref returns the resource href.
Types ¶
type Account ¶
type Account struct { // Date of creation CreatedAt string // Email of account owner CreatedBy string // API href of account Href string // ID of account ID int // Name of account Name string }
A tenant account Identifier: application/vnd.congo.api.account+json
func LoadAccount ¶
LoadAccount loads raw data into an instance of Account running all the validations. Raw data is defined by data that the JSON unmarshaler would create when unmarshaling into a variable of type interface{}. See https://golang.org/pkg/encoding/json/#Unmarshal for the complete list of supported data types.
type AccountController ¶
type AccountController interface { Create(*CreateAccountContext) error Delete(*DeleteAccountContext) error Show(*ShowAccountContext) error Update(*UpdateAccountContext) error }
AccountController is the controller interface for the Account actions.
type AccountViewEnum ¶
type AccountViewEnum string
object views
const ( // Account default view AccountDefaultView AccountViewEnum = "default" // Account link view AccountLinkView AccountViewEnum = "link" )
type CreateAccountContext ¶
type CreateAccountContext struct { *goa.Context Payload *CreateAccountPayload }
CreateAccountContext provides the account create action context.
func NewCreateAccountContext ¶
func NewCreateAccountContext(c *goa.Context) (*CreateAccountContext, error)
NewCreateAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller create action.
func (*CreateAccountContext) Created ¶
func (ctx *CreateAccountContext) Created() error
Created sends a HTTP response with status code 201.
type CreateAccountPayload ¶
type CreateAccountPayload struct { // Name of account Name string }
CreateAccountPayload is the account create action payload.
func NewCreateAccountPayload ¶
func NewCreateAccountPayload(raw interface{}) (*CreateAccountPayload, error)
NewCreateAccountPayload instantiates a CreateAccountPayload from a raw request body. It validates each field and returns an error if any validation fails.
type CreateSeriesContext ¶
type CreateSeriesContext struct { *goa.Context AccountID int Payload *CreateSeriesPayload }
CreateSeriesContext provides the series create action context.
func NewCreateSeriesContext ¶
func NewCreateSeriesContext(c *goa.Context) (*CreateSeriesContext, error)
NewCreateSeriesContext parses the incoming request URL and body, performs validations and creates the context used by the series controller create action.
func (*CreateSeriesContext) Created ¶
func (ctx *CreateSeriesContext) Created() error
Created sends a HTTP response with status code 201.
type CreateSeriesPayload ¶
type CreateSeriesPayload struct {
Name string
}
CreateSeriesPayload is the series create action payload.
func NewCreateSeriesPayload ¶
func NewCreateSeriesPayload(raw interface{}) (*CreateSeriesPayload, error)
NewCreateSeriesPayload instantiates a CreateSeriesPayload from a raw request body. It validates each field and returns an error if any validation fails.
type CreateUserContext ¶
type CreateUserContext struct { *goa.Context AccountID int Payload *CreateUserPayload }
CreateUserContext provides the user create action context.
func NewCreateUserContext ¶
func NewCreateUserContext(c *goa.Context) (*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 ¶
CreateUserPayload is the user create action payload.
func NewCreateUserPayload ¶
func NewCreateUserPayload(raw interface{}) (*CreateUserPayload, error)
NewCreateUserPayload instantiates a CreateUserPayload from a raw request body. It validates each field and returns an error if any validation fails.
type DeleteAccountContext ¶
DeleteAccountContext provides the account delete action context.
func NewDeleteAccountContext ¶
func NewDeleteAccountContext(c *goa.Context) (*DeleteAccountContext, error)
NewDeleteAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller delete action.
func (*DeleteAccountContext) NoContent ¶
func (ctx *DeleteAccountContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteAccountContext) NotFound ¶
func (ctx *DeleteAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type ListSeriesContext ¶
ListSeriesContext provides the series list action context.
func NewListSeriesContext ¶
func NewListSeriesContext(c *goa.Context) (*ListSeriesContext, error)
NewListSeriesContext parses the incoming request URL and body, performs validations and creates the context used by the series controller list action.
func (*ListSeriesContext) OK ¶
func (ctx *ListSeriesContext) OK(resp SeriesCollection, view SeriesCollectionViewEnum) error
OK sends a HTTP response with status code 200.
type ListUserContext ¶
ListUserContext provides the user list action context.
func NewListUserContext ¶
func NewListUserContext(c *goa.Context) (*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 ¶
func (ctx *ListUserContext) OK(resp UserCollection) error
OK sends a HTTP response with status code 200.
type Series ¶
type Series struct { // Account that owns bottle Account *Account // Date of creation CreatedAt string // API href of series Href string // ID of series ID int Name string // Date of last update UpdatedAt string }
A recurring event or conference Identifier: application/vnd.congo.api.series+json
func LoadSeries ¶
LoadSeries loads raw data into an instance of Series running all the validations. Raw data is defined by data that the JSON unmarshaler would create when unmarshaling into a variable of type interface{}. See https://golang.org/pkg/encoding/json/#Unmarshal for the complete list of supported data types.
type SeriesCollection ¶
type SeriesCollection []*Series
SeriesCollection media type Identifier: application/vnd.congo.api.series+json; type=collection
func LoadSeriesCollection ¶
func LoadSeriesCollection(raw interface{}) (SeriesCollection, error)
LoadSeriesCollection loads raw data into an instance of SeriesCollection running all the validations. Raw data is defined by data that the JSON unmarshaler would create when unmarshaling into a variable of type interface{}. See https://golang.org/pkg/encoding/json/#Unmarshal for the complete list of supported data types.
func (SeriesCollection) Dump ¶
func (mt SeriesCollection) Dump(view SeriesCollectionViewEnum) ([]map[string]interface{}, error)
Dump produces raw data from an instance of SeriesCollection running all the validations. See LoadSeriesCollection for the definition of raw data.
func (SeriesCollection) Validate ¶
func (mt SeriesCollection) Validate() (err error)
Validate validates the media type instance.
type SeriesCollectionViewEnum ¶
type SeriesCollectionViewEnum string
array views
const ( // SeriesCollection default view SeriesCollectionDefaultView SeriesCollectionViewEnum = "default" // SeriesCollection tiny view SeriesCollectionTinyView SeriesCollectionViewEnum = "tiny" )
type SeriesController ¶
type SeriesController interface { Create(*CreateSeriesContext) error List(*ListSeriesContext) error Show(*ShowSeriesContext) error Update(*UpdateSeriesContext) error }
SeriesController is the controller interface for the Series actions.
type SeriesViewEnum ¶
type SeriesViewEnum string
object views
const ( // Series default view SeriesDefaultView SeriesViewEnum = "default" // Series full view SeriesFullView SeriesViewEnum = "full" // Series tiny view SeriesTinyView SeriesViewEnum = "tiny" )
type ShowAccountContext ¶
ShowAccountContext provides the account show action context.
func NewShowAccountContext ¶
func NewShowAccountContext(c *goa.Context) (*ShowAccountContext, error)
NewShowAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller show action.
func (*ShowAccountContext) NotFound ¶
func (ctx *ShowAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowAccountContext) OK ¶
func (ctx *ShowAccountContext) OK(resp *Account, view AccountViewEnum) error
OK sends a HTTP response with status code 200.
type ShowSeriesContext ¶
ShowSeriesContext provides the series show action context.
func NewShowSeriesContext ¶
func NewShowSeriesContext(c *goa.Context) (*ShowSeriesContext, error)
NewShowSeriesContext parses the incoming request URL and body, performs validations and creates the context used by the series controller show action.
func (*ShowSeriesContext) NotFound ¶
func (ctx *ShowSeriesContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowSeriesContext) OK ¶
func (ctx *ShowSeriesContext) OK(resp *Series, view SeriesViewEnum) error
OK sends a HTTP response with status code 200.
type ShowUserContext ¶
ShowUserContext provides the user show action context.
func NewShowUserContext ¶
func NewShowUserContext(c *goa.Context) (*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(resp *User, view UserViewEnum) error
OK sends a HTTP response with status code 200.
type UpdateAccountContext ¶
type UpdateAccountContext struct { *goa.Context AccountID int Payload *UpdateAccountPayload }
UpdateAccountContext provides the account update action context.
func NewUpdateAccountContext ¶
func NewUpdateAccountContext(c *goa.Context) (*UpdateAccountContext, error)
NewUpdateAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller update action.
func (*UpdateAccountContext) NoContent ¶
func (ctx *UpdateAccountContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*UpdateAccountContext) NotFound ¶
func (ctx *UpdateAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type UpdateAccountPayload ¶
type UpdateAccountPayload struct { // Name of account Name string }
UpdateAccountPayload is the account update action payload.
func NewUpdateAccountPayload ¶
func NewUpdateAccountPayload(raw interface{}) (*UpdateAccountPayload, error)
NewUpdateAccountPayload instantiates a UpdateAccountPayload from a raw request body. It validates each field and returns an error if any validation fails.
type UpdateSeriesContext ¶
type UpdateSeriesContext struct { *goa.Context AccountID int SeriesID int Payload *UpdateSeriesPayload }
UpdateSeriesContext provides the series update action context.
func NewUpdateSeriesContext ¶
func NewUpdateSeriesContext(c *goa.Context) (*UpdateSeriesContext, error)
NewUpdateSeriesContext parses the incoming request URL and body, performs validations and creates the context used by the series controller update action.
func (*UpdateSeriesContext) NoContent ¶
func (ctx *UpdateSeriesContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*UpdateSeriesContext) NotFound ¶
func (ctx *UpdateSeriesContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type UpdateSeriesPayload ¶
type UpdateSeriesPayload struct {
Name string
}
UpdateSeriesPayload is the series update action payload.
func NewUpdateSeriesPayload ¶
func NewUpdateSeriesPayload(raw interface{}) (*UpdateSeriesPayload, error)
NewUpdateSeriesPayload instantiates a UpdateSeriesPayload from a raw request body. It validates each field and returns an error if any validation fails.
type UpdateUserContext ¶
type UpdateUserContext struct { *goa.Context AccountID int UserID int Payload *UpdateUserPayload }
UpdateUserContext provides the user update action context.
func NewUpdateUserContext ¶
func NewUpdateUserContext(c *goa.Context) (*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 ¶
UpdateUserPayload is the user update action payload.
func NewUpdateUserPayload ¶
func NewUpdateUserPayload(raw interface{}) (*UpdateUserPayload, error)
NewUpdateUserPayload instantiates a UpdateUserPayload from a raw request body. It validates each field and returns an error if any validation fails.
type User ¶
type User struct { // Date of creation CreatedAt string // Email address of user Email string // First name of user FirstName string // API href of user Href string // ID of user ID int // Last name of user LastName string }
A user belonging to a tenant account Identifier: application/vnd.congo.api.user+json
func LoadUser ¶
LoadUser loads raw data into an instance of User running all the validations. Raw data is defined by data that the JSON unmarshaler would create when unmarshaling into a variable of type interface{}. See https://golang.org/pkg/encoding/json/#Unmarshal for the complete list of supported data types.
type UserCollection ¶
type UserCollection []*User
UserCollection media type Identifier: application/vnd.congo.api.user+json; type=collection
func LoadUserCollection ¶
func LoadUserCollection(raw interface{}) (UserCollection, error)
LoadUserCollection loads raw data into an instance of UserCollection running all the validations. Raw data is defined by data that the JSON unmarshaler would create when unmarshaling into a variable of type interface{}. See https://golang.org/pkg/encoding/json/#Unmarshal for the complete list of supported data types.
func (UserCollection) Dump ¶
func (mt UserCollection) Dump() ([]map[string]interface{}, error)
Dump produces raw data from an instance of UserCollection running all the validations. See LoadUserCollection for the definition of raw data.
func (UserCollection) Validate ¶
func (mt UserCollection) Validate() (err error)
Validate validates the media type instance.
type UserCollectionViewEnum ¶
type UserCollectionViewEnum string
array views
const ( // UserCollection default view UserCollectionDefaultView UserCollectionViewEnum = "default" )
type UserController ¶
type UserController interface { Create(*CreateUserContext) error List(*ListUserContext) error Show(*ShowUserContext) error Update(*UpdateUserContext) error }
UserController is the controller interface for the User actions.
type UserPayload ¶
UserPayload type
type UserViewEnum ¶
type UserViewEnum string
object views
const ( // User default view UserDefaultView UserViewEnum = "default" // User link view UserLinkView UserViewEnum = "link" )