Documentation ¶
Index ¶
- func CalendarHref(id interface{}) string
- func MountAuthController(service *goa.Service, ctrl AuthController)
- func MountCalendarController(service *goa.Service, ctrl CalendarController)
- func MountPublicController(service *goa.Service, ctrl PublicController)
- func NewJWTSecurity() *goa.JWTSecurity
- func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
- type Appointment
- type AuthController
- type CalendarController
- type CreateCalendarContext
- type DeleteCalendarContext
- type EditCalendarContext
- type ListCalendarContext
- type Login
- type LoginAuthContext
- type MaraAppointment
- type MaraAppointmentCollection
- type MaraToken
- type PublicController
- type Reset
- type ResetAuthContext
- type ShowCalendarContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalendarHref ¶
func CalendarHref(id interface{}) string
CalendarHref returns the resource href.
func MountAuthController ¶
func MountAuthController(service *goa.Service, ctrl AuthController)
MountAuthController "mounts" a Auth resource controller on the given service.
func MountCalendarController ¶
func MountCalendarController(service *goa.Service, ctrl CalendarController)
MountCalendarController "mounts" a Calendar resource controller on the given service.
func MountPublicController ¶
func MountPublicController(service *goa.Service, ctrl PublicController)
MountPublicController "mounts" a Public resource controller on the given service.
func NewJWTSecurity ¶
func NewJWTSecurity() *goa.JWTSecurity
NewJWTSecurity creates a jwt security definition.
func UseJWTMiddleware ¶
func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
UseJWTMiddleware mounts the jwt auth middleware onto the service.
Types ¶
type Appointment ¶
type Appointment struct { // The email of who's requesting it Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"` // Internal notes about the Appointment Notes *string `form:"notes,omitempty" json:"notes,omitempty" xml:"notes,omitempty"` // The phone of the client Phone *string `form:"phone,omitempty" json:"phone,omitempty" xml:"phone,omitempty"` // Option specifying that the work is problematic for some reason Problematic bool `form:"problematic" json:"problematic" xml:"problematic"` // Option to send email to the client SendEmail bool `form:"send_email" json:"send_email" xml:"send_email"` // Option to send sms to the client SendSms bool `form:"send_sms" json:"send_sms" xml:"send_sms"` // The status of the work. Can be one of todo/doing/done Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` // Option specifying that the work is to be done now Urgent bool `form:"urgent" json:"urgent" xml:"urgent"` // What is the purpose of the appointment What string `form:"what" json:"what" xml:"what"` // When is the appointment scheduled When time.Time `form:"when" json:"when" xml:"when"` // Where is the appointment scheduled Where string `form:"where" json:"where" xml:"where"` // Who is requesting the appointment Who string `form:"who" json:"who" xml:"who"` }
Appointment user type.
func (*Appointment) Validate ¶
func (ut *Appointment) Validate() (err error)
Validate validates the Appointment type instance.
type AuthController ¶
type AuthController interface { goa.Muxer Login(*LoginAuthContext) error Reset(*ResetAuthContext) error }
AuthController is the controller interface for the Auth actions.
type CalendarController ¶
type CalendarController interface { goa.Muxer Create(*CreateCalendarContext) error Delete(*DeleteCalendarContext) error Edit(*EditCalendarContext) error List(*ListCalendarContext) error Show(*ShowCalendarContext) error }
CalendarController is the controller interface for the Calendar actions.
type CreateCalendarContext ¶
type CreateCalendarContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *Appointment }
CreateCalendarContext provides the calendar create action context.
func NewCreateCalendarContext ¶
func NewCreateCalendarContext(ctx context.Context, service *goa.Service) (*CreateCalendarContext, error)
NewCreateCalendarContext parses the incoming request URL and body, performs validations and creates the context used by the calendar controller create action.
func (*CreateCalendarContext) BadRequest ¶
func (ctx *CreateCalendarContext) BadRequest() error
BadRequest sends a HTTP response with status code 400.
func (*CreateCalendarContext) InternalServerError ¶
func (ctx *CreateCalendarContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*CreateCalendarContext) OK ¶
func (ctx *CreateCalendarContext) OK(r *MaraAppointment) error
OK sends a HTTP response with status code 200.
type DeleteCalendarContext ¶
type DeleteCalendarContext struct { context.Context *goa.ResponseData *goa.RequestData ID string }
DeleteCalendarContext provides the calendar delete action context.
func NewDeleteCalendarContext ¶
func NewDeleteCalendarContext(ctx context.Context, service *goa.Service) (*DeleteCalendarContext, error)
NewDeleteCalendarContext parses the incoming request URL and body, performs validations and creates the context used by the calendar controller delete action.
func (*DeleteCalendarContext) InternalServerError ¶
func (ctx *DeleteCalendarContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*DeleteCalendarContext) NotFound ¶
func (ctx *DeleteCalendarContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*DeleteCalendarContext) OK ¶
func (ctx *DeleteCalendarContext) OK(r *MaraAppointment) error
OK sends a HTTP response with status code 200.
type EditCalendarContext ¶
type EditCalendarContext struct { context.Context *goa.ResponseData *goa.RequestData ID string Payload *Appointment }
EditCalendarContext provides the calendar edit action context.
func NewEditCalendarContext ¶
func NewEditCalendarContext(ctx context.Context, service *goa.Service) (*EditCalendarContext, error)
NewEditCalendarContext parses the incoming request URL and body, performs validations and creates the context used by the calendar controller edit action.
func (*EditCalendarContext) BadRequest ¶
func (ctx *EditCalendarContext) BadRequest() error
BadRequest sends a HTTP response with status code 400.
func (*EditCalendarContext) InternalServerError ¶
func (ctx *EditCalendarContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*EditCalendarContext) NotFound ¶
func (ctx *EditCalendarContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*EditCalendarContext) OK ¶
func (ctx *EditCalendarContext) OK(r *MaraAppointment) error
OK sends a HTTP response with status code 200.
type ListCalendarContext ¶
type ListCalendarContext struct { context.Context *goa.ResponseData *goa.RequestData End *time.Time Start *time.Time Where string }
ListCalendarContext provides the calendar list action context.
func NewListCalendarContext ¶
func NewListCalendarContext(ctx context.Context, service *goa.Service) (*ListCalendarContext, error)
NewListCalendarContext parses the incoming request URL and body, performs validations and creates the context used by the calendar controller list action.
func (*ListCalendarContext) InternalServerError ¶
func (ctx *ListCalendarContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*ListCalendarContext) OK ¶
func (ctx *ListCalendarContext) OK(r MaraAppointmentCollection) error
OK sends a HTTP response with status code 200.
type Login ¶
type Login struct { // The password Password string `form:"password" json:"password" xml:"password"` // The username User string `form:"user" json:"user" xml:"user"` }
Login user type.
type LoginAuthContext ¶
type LoginAuthContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *Login }
LoginAuthContext provides the auth login action context.
func NewLoginAuthContext ¶
NewLoginAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller login action.
func (*LoginAuthContext) BadRequest ¶
func (ctx *LoginAuthContext) BadRequest() error
BadRequest sends a HTTP response with status code 400.
func (*LoginAuthContext) OK ¶
func (ctx *LoginAuthContext) OK(r *MaraToken) error
OK sends a HTTP response with status code 200.
type MaraAppointment ¶
type MaraAppointment struct { // The email of who's requesting it Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"` // The url of the appointment Href *string `form:"href,omitempty" json:"href,omitempty" xml:"href,omitempty"` // The id of the appointment ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Internal notes about the Appointment Notes *string `form:"notes,omitempty" json:"notes,omitempty" xml:"notes,omitempty"` // The phone of the client Phone *string `form:"phone,omitempty" json:"phone,omitempty" xml:"phone,omitempty"` // Option specifying that the work is problematic for some reason Problematic bool `form:"problematic" json:"problematic" xml:"problematic"` // Option to send email to the client SendEmail bool `form:"send_email" json:"send_email" xml:"send_email"` // Option to send sms to the client SendSms bool `form:"send_sms" json:"send_sms" xml:"send_sms"` // The status of the work. Can be one of todo/doing/done Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` // Option specifying that the work is to be done now Urgent bool `form:"urgent" json:"urgent" xml:"urgent"` // What is the purpose of the appointment What *string `form:"what,omitempty" json:"what,omitempty" xml:"what,omitempty"` // When is the appointment scheduled When *time.Time `form:"when,omitempty" json:"when,omitempty" xml:"when,omitempty"` // Where is the appointment scheduled Where *string `form:"where,omitempty" json:"where,omitempty" xml:"where,omitempty"` // Who is requesting the appointment Who *string `form:"who,omitempty" json:"who,omitempty" xml:"who,omitempty"` }
MaraAppointment media type (default view)
Identifier: application/vnd.mara.appointment; view=default
func (*MaraAppointment) Validate ¶
func (mt *MaraAppointment) Validate() (err error)
Validate validates the MaraAppointment media type instance.
type MaraAppointmentCollection ¶
type MaraAppointmentCollection []*MaraAppointment
MaraAppointmentCollection is the media type for an array of MaraAppointment (default view)
Identifier: application/vnd.mara.appointment; type=collection; view=default
func (MaraAppointmentCollection) Validate ¶
func (mt MaraAppointmentCollection) Validate() (err error)
Validate validates the MaraAppointmentCollection media type instance.
type MaraToken ¶
type MaraToken struct { // The token to use in subsequent api calls Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"` }
MaraToken media type (default view)
Identifier: application/vnd.mara.token; view=default
type PublicController ¶
type PublicController interface { goa.Muxer goa.FileServer }
PublicController is the controller interface for the Public actions.
type Reset ¶
type Reset struct { // The user that will receive the new password User string `form:"user" json:"user" xml:"user"` }
Reset user type.
type ResetAuthContext ¶
type ResetAuthContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *Reset }
ResetAuthContext provides the auth reset action context.
func NewResetAuthContext ¶
NewResetAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller reset action.
func (*ResetAuthContext) BadRequest ¶
func (ctx *ResetAuthContext) BadRequest() error
BadRequest sends a HTTP response with status code 400.
func (*ResetAuthContext) OK ¶
func (ctx *ResetAuthContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type ShowCalendarContext ¶
type ShowCalendarContext struct { context.Context *goa.ResponseData *goa.RequestData ID string }
ShowCalendarContext provides the calendar show action context.
func NewShowCalendarContext ¶
func NewShowCalendarContext(ctx context.Context, service *goa.Service) (*ShowCalendarContext, error)
NewShowCalendarContext parses the incoming request URL and body, performs validations and creates the context used by the calendar controller show action.
func (*ShowCalendarContext) InternalServerError ¶
func (ctx *ShowCalendarContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*ShowCalendarContext) NotFound ¶
func (ctx *ShowCalendarContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowCalendarContext) OK ¶
func (ctx *ShowCalendarContext) OK(r *MaraAppointment) error
OK sends a HTTP response with status code 200.