app

package
v0.0.0-...-d42fbf4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassHref

func ClassHref(classID interface{}) string

ClassHref returns the resource href.

func MountClassController

func MountClassController(service *goa.Service, ctrl ClassController)

MountClassController "mounts" a Class resource controller on the given service.

func MountQuestionController

func MountQuestionController(service *goa.Service, ctrl QuestionController)

MountQuestionController "mounts" a Question resource controller on the given service.

func QuestionHref

func QuestionHref(questionID interface{}) string

QuestionHref returns the resource href.

Types

type ClassController

type ClassController interface {
	goa.Muxer
	List(*ListClassContext) error
	Show(*ShowClassContext) error
	ShowMembers(*ShowMembersClassContext) error
	ShowQuestions(*ShowQuestionsClassContext) error
}

ClassController is the controller interface for the Class actions.

type ListClassContext

type ListClassContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
}

ListClassContext provides the class list action context.

func NewListClassContext

func NewListClassContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListClassContext, error)

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

func (*ListClassContext) InternalServerError

func (ctx *ListClassContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ListClassContext) NotFound

func (ctx *ListClassContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ListClassContext) OK

OK sends a HTTP response with status code 200.

type QuestionController

type QuestionController interface {
	goa.Muxer
	Show(*ShowQuestionContext) error
}

QuestionController is the controller interface for the Question actions.

type ShowClassContext

type ShowClassContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ClassID int
}

ShowClassContext provides the class show action context.

func NewShowClassContext

func NewShowClassContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowClassContext, error)

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

func (*ShowClassContext) InternalServerError

func (ctx *ShowClassContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ShowClassContext) NotFound

func (ctx *ShowClassContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowClassContext) OK

OK sends a HTTP response with status code 200.

type ShowMembersClassContext

type ShowMembersClassContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ClassID int
}

ShowMembersClassContext provides the class show_members action context.

func NewShowMembersClassContext

func NewShowMembersClassContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowMembersClassContext, error)

NewShowMembersClassContext parses the incoming request URL and body, performs validations and creates the context used by the class controller show_members action.

func (*ShowMembersClassContext) InternalServerError

func (ctx *ShowMembersClassContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ShowMembersClassContext) NotFound

func (ctx *ShowMembersClassContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowMembersClassContext) OK

OK sends a HTTP response with status code 200.

type ShowQuestionContext

type ShowQuestionContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	QuestionID int
}

ShowQuestionContext provides the question show action context.

func NewShowQuestionContext

func NewShowQuestionContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowQuestionContext, error)

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

func (*ShowQuestionContext) InternalServerError

func (ctx *ShowQuestionContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ShowQuestionContext) NotFound

func (ctx *ShowQuestionContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowQuestionContext) OK

OK sends a HTTP response with status code 200.

func (*ShowQuestionContext) OKByAuthor

OKByAuthor sends a HTTP response with status code 200.

func (*ShowQuestionContext) OKByType

OKByType sends a HTTP response with status code 200.

func (*ShowQuestionContext) OKByUnit

OKByUnit sends a HTTP response with status code 200.

func (*ShowQuestionContext) OKFeed

OKFeed sends a HTTP response with status code 200.

type ShowQuestionsClassContext

type ShowQuestionsClassContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Answered     *bool
	AuthorID     *int
	ClassID      int
	QuestionType *string
	UnitID       *int
}

ShowQuestionsClassContext provides the class show_questions action context.

func NewShowQuestionsClassContext

func NewShowQuestionsClassContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowQuestionsClassContext, error)

NewShowQuestionsClassContext parses the incoming request URL and body, performs validations and creates the context used by the class controller show_questions action.

func (*ShowQuestionsClassContext) BadRequest

func (ctx *ShowQuestionsClassContext) BadRequest() error

BadRequest sends a HTTP response with status code 400.

func (*ShowQuestionsClassContext) InternalServerError

func (ctx *ShowQuestionsClassContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ShowQuestionsClassContext) NotFound

func (ctx *ShowQuestionsClassContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowQuestionsClassContext) OKFeed

OKFeed sends a HTTP response with status code 200.

type StudiouslyClass

type StudiouslyClass struct {
	// Current unit of study
	CurrentUnit *int   `form:"current_unit,omitempty" json:"current_unit,omitempty" xml:"current_unit,omitempty"`
	ID          int    `form:"id" json:"id" xml:"id"`
	Name        string `form:"name" json:"name" xml:"name"`
}

StudiouslyClass media type (default view)

Identifier: application/studiously.class+json; view=default

func (*StudiouslyClass) Validate

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

Validate validates the StudiouslyClass media type instance.

type StudiouslyClassCollection

type StudiouslyClassCollection []*StudiouslyClass

StudiouslyClassCollection is the media type for an array of StudiouslyClass (default view)

Identifier: application/studiously.class+json; type=collection; view=default

func (StudiouslyClassCollection) Validate

func (mt StudiouslyClassCollection) Validate() (err error)

Validate validates the StudiouslyClassCollection media type instance.

type StudiouslyMember

type StudiouslyMember struct {
	ID   int    `form:"id" json:"id" xml:"id"`
	Name string `form:"name" json:"name" xml:"name"`
	Role string `form:"role" json:"role" xml:"role"`
}

StudiouslyMember media type (default view)

Identifier: application/studiously.member+json; view=default

func (*StudiouslyMember) Validate

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

Validate validates the StudiouslyMember media type instance.

type StudiouslyMemberCollection

type StudiouslyMemberCollection []*StudiouslyMember

StudiouslyMemberCollection is the media type for an array of StudiouslyMember (default view)

Identifier: application/studiously.member+json; type=collection; view=default

func (StudiouslyMemberCollection) Validate

func (mt StudiouslyMemberCollection) Validate() (err error)

Validate validates the StudiouslyMemberCollection media type instance.

type StudiouslyQuestion

type StudiouslyQuestion struct {
	Answered     *bool        `form:"answered,omitempty" json:"answered,omitempty" xml:"answered,omitempty"`
	AuthorID     *int         `form:"author_id,omitempty" json:"author_id,omitempty" xml:"author_id,omitempty"`
	Data         *interface{} `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	ID           int          `form:"id" json:"id" xml:"id"`
	QuestionType string       `form:"question_type" json:"question_type" xml:"question_type"`
	UnitID       int          `form:"unit_id" json:"unit_id" xml:"unit_id"`
	Votes        *int         `form:"votes,omitempty" json:"votes,omitempty" xml:"votes,omitempty"`
}

StudiouslyQuestion media type (default view)

Identifier: application/studiously.question+json; view=default

func (*StudiouslyQuestion) Validate

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

Validate validates the StudiouslyQuestion media type instance.

type StudiouslyQuestionByAuthor

type StudiouslyQuestionByAuthor struct {
	Answered     *bool        `form:"answered,omitempty" json:"answered,omitempty" xml:"answered,omitempty"`
	Data         *interface{} `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	ID           int          `form:"id" json:"id" xml:"id"`
	QuestionType string       `form:"question_type" json:"question_type" xml:"question_type"`
	UnitID       int          `form:"unit_id" json:"unit_id" xml:"unit_id"`
	Votes        *int         `form:"votes,omitempty" json:"votes,omitempty" xml:"votes,omitempty"`
}

StudiouslyQuestion media type (by_author view)

Identifier: application/studiously.question+json; view=by_author

func (*StudiouslyQuestionByAuthor) Validate

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

Validate validates the StudiouslyQuestionByAuthor media type instance.

type StudiouslyQuestionByAuthorCollection

type StudiouslyQuestionByAuthorCollection []*StudiouslyQuestionByAuthor

StudiouslyQuestionCollection is the media type for an array of StudiouslyQuestion (by_author view)

Identifier: application/studiously.question+json; type=collection; view=by_author

func (StudiouslyQuestionByAuthorCollection) Validate

func (mt StudiouslyQuestionByAuthorCollection) Validate() (err error)

Validate validates the StudiouslyQuestionByAuthorCollection media type instance.

type StudiouslyQuestionByType

type StudiouslyQuestionByType struct {
	Answered *bool        `form:"answered,omitempty" json:"answered,omitempty" xml:"answered,omitempty"`
	AuthorID *int         `form:"author_id,omitempty" json:"author_id,omitempty" xml:"author_id,omitempty"`
	Data     *interface{} `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	ID       int          `form:"id" json:"id" xml:"id"`
	UnitID   int          `form:"unit_id" json:"unit_id" xml:"unit_id"`
	Votes    *int         `form:"votes,omitempty" json:"votes,omitempty" xml:"votes,omitempty"`
}

StudiouslyQuestion media type (by_type view)

Identifier: application/studiously.question+json; view=by_type

func (*StudiouslyQuestionByType) Validate

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

Validate validates the StudiouslyQuestionByType media type instance.

type StudiouslyQuestionByTypeCollection

type StudiouslyQuestionByTypeCollection []*StudiouslyQuestionByType

StudiouslyQuestionCollection is the media type for an array of StudiouslyQuestion (by_type view)

Identifier: application/studiously.question+json; type=collection; view=by_type

func (StudiouslyQuestionByTypeCollection) Validate

func (mt StudiouslyQuestionByTypeCollection) Validate() (err error)

Validate validates the StudiouslyQuestionByTypeCollection media type instance.

type StudiouslyQuestionByUnit

type StudiouslyQuestionByUnit struct {
	Answered     *bool        `form:"answered,omitempty" json:"answered,omitempty" xml:"answered,omitempty"`
	AuthorID     *int         `form:"author_id,omitempty" json:"author_id,omitempty" xml:"author_id,omitempty"`
	Data         *interface{} `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	ID           int          `form:"id" json:"id" xml:"id"`
	QuestionType string       `form:"question_type" json:"question_type" xml:"question_type"`
	Votes        *int         `form:"votes,omitempty" json:"votes,omitempty" xml:"votes,omitempty"`
}

StudiouslyQuestion media type (by_unit view)

Identifier: application/studiously.question+json; view=by_unit

func (*StudiouslyQuestionByUnit) Validate

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

Validate validates the StudiouslyQuestionByUnit media type instance.

type StudiouslyQuestionByUnitCollection

type StudiouslyQuestionByUnitCollection []*StudiouslyQuestionByUnit

StudiouslyQuestionCollection is the media type for an array of StudiouslyQuestion (by_unit view)

Identifier: application/studiously.question+json; type=collection; view=by_unit

func (StudiouslyQuestionByUnitCollection) Validate

func (mt StudiouslyQuestionByUnitCollection) Validate() (err error)

Validate validates the StudiouslyQuestionByUnitCollection media type instance.

type StudiouslyQuestionCollection

type StudiouslyQuestionCollection []*StudiouslyQuestion

StudiouslyQuestionCollection is the media type for an array of StudiouslyQuestion (default view)

Identifier: application/studiously.question+json; type=collection; view=default

func (StudiouslyQuestionCollection) Validate

func (mt StudiouslyQuestionCollection) Validate() (err error)

Validate validates the StudiouslyQuestionCollection media type instance.

type StudiouslyQuestionFeed

type StudiouslyQuestionFeed struct {
	Answered *bool `form:"answered,omitempty" json:"answered,omitempty" xml:"answered,omitempty"`
	AuthorID *int  `form:"author_id,omitempty" json:"author_id,omitempty" xml:"author_id,omitempty"`
	ID       int   `form:"id" json:"id" xml:"id"`
	UnitID   int   `form:"unit_id" json:"unit_id" xml:"unit_id"`
	Votes    *int  `form:"votes,omitempty" json:"votes,omitempty" xml:"votes,omitempty"`
}

StudiouslyQuestion media type (feed view)

Identifier: application/studiously.question+json; view=feed

func (*StudiouslyQuestionFeed) Validate

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

Validate validates the StudiouslyQuestionFeed media type instance.

type StudiouslyQuestionFeedCollection

type StudiouslyQuestionFeedCollection []*StudiouslyQuestionFeed

StudiouslyQuestionCollection is the media type for an array of StudiouslyQuestion (feed view)

Identifier: application/studiously.question+json; type=collection; view=feed

func (StudiouslyQuestionFeedCollection) Validate

func (mt StudiouslyQuestionFeedCollection) Validate() (err error)

Validate validates the StudiouslyQuestionFeedCollection media type instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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