client

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListClassPath

func ListClassPath() string

ListClassPath computes a request path to the list action of class.

func ShowClassPath

func ShowClassPath(classID int) string

ShowClassPath computes a request path to the show action of class.

func ShowMembersClassPath

func ShowMembersClassPath(classID int) string

ShowMembersClassPath computes a request path to the show_members action of class.

func ShowQuestionPath

func ShowQuestionPath(questionID int) string

ShowQuestionPath computes a request path to the show action of question.

func ShowQuestionsClassPath

func ShowQuestionsClassPath(classID int) string

ShowQuestionsClassPath computes a request path to the show_questions action of class.

Types

type Client

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

Client is the studiously service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeStudiouslyClass

func (c *Client) DecodeStudiouslyClass(resp *http.Response) (*StudiouslyClass, error)

DecodeStudiouslyClass decodes the StudiouslyClass instance encoded in resp body.

func (*Client) DecodeStudiouslyClassCollection

func (c *Client) DecodeStudiouslyClassCollection(resp *http.Response) (StudiouslyClassCollection, error)

DecodeStudiouslyClassCollection decodes the StudiouslyClassCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyMember

func (c *Client) DecodeStudiouslyMember(resp *http.Response) (*StudiouslyMember, error)

DecodeStudiouslyMember decodes the StudiouslyMember instance encoded in resp body.

func (*Client) DecodeStudiouslyMemberCollection

func (c *Client) DecodeStudiouslyMemberCollection(resp *http.Response) (StudiouslyMemberCollection, error)

DecodeStudiouslyMemberCollection decodes the StudiouslyMemberCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestion

func (c *Client) DecodeStudiouslyQuestion(resp *http.Response) (*StudiouslyQuestion, error)

DecodeStudiouslyQuestion decodes the StudiouslyQuestion instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByAuthor

func (c *Client) DecodeStudiouslyQuestionByAuthor(resp *http.Response) (*StudiouslyQuestionByAuthor, error)

DecodeStudiouslyQuestionByAuthor decodes the StudiouslyQuestionByAuthor instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByAuthorCollection

func (c *Client) DecodeStudiouslyQuestionByAuthorCollection(resp *http.Response) (StudiouslyQuestionByAuthorCollection, error)

DecodeStudiouslyQuestionByAuthorCollection decodes the StudiouslyQuestionByAuthorCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByType

func (c *Client) DecodeStudiouslyQuestionByType(resp *http.Response) (*StudiouslyQuestionByType, error)

DecodeStudiouslyQuestionByType decodes the StudiouslyQuestionByType instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByTypeCollection

func (c *Client) DecodeStudiouslyQuestionByTypeCollection(resp *http.Response) (StudiouslyQuestionByTypeCollection, error)

DecodeStudiouslyQuestionByTypeCollection decodes the StudiouslyQuestionByTypeCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByUnit

func (c *Client) DecodeStudiouslyQuestionByUnit(resp *http.Response) (*StudiouslyQuestionByUnit, error)

DecodeStudiouslyQuestionByUnit decodes the StudiouslyQuestionByUnit instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionByUnitCollection

func (c *Client) DecodeStudiouslyQuestionByUnitCollection(resp *http.Response) (StudiouslyQuestionByUnitCollection, error)

DecodeStudiouslyQuestionByUnitCollection decodes the StudiouslyQuestionByUnitCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionCollection

func (c *Client) DecodeStudiouslyQuestionCollection(resp *http.Response) (StudiouslyQuestionCollection, error)

DecodeStudiouslyQuestionCollection decodes the StudiouslyQuestionCollection instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionFeed

func (c *Client) DecodeStudiouslyQuestionFeed(resp *http.Response) (*StudiouslyQuestionFeed, error)

DecodeStudiouslyQuestionFeed decodes the StudiouslyQuestionFeed instance encoded in resp body.

func (*Client) DecodeStudiouslyQuestionFeedCollection

func (c *Client) DecodeStudiouslyQuestionFeedCollection(resp *http.Response) (StudiouslyQuestionFeedCollection, error)

DecodeStudiouslyQuestionFeedCollection decodes the StudiouslyQuestionFeedCollection instance encoded in resp body.

func (*Client) ListClass

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

Get all classes a user is in

func (*Client) NewListClassRequest

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

NewListClassRequest create the request corresponding to the list action endpoint of the class resource.

func (*Client) NewShowClassRequest

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

NewShowClassRequest create the request corresponding to the show action endpoint of the class resource.

func (*Client) NewShowMembersClassRequest

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

NewShowMembersClassRequest create the request corresponding to the show_members action endpoint of the class resource.

func (*Client) NewShowQuestionRequest

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

NewShowQuestionRequest create the request corresponding to the show action endpoint of the question resource.

func (*Client) NewShowQuestionsClassRequest

func (c *Client) NewShowQuestionsClassRequest(ctx context.Context, path string, answered *bool, authorID *int, questionType *string, unitID *int) (*http.Request, error)

NewShowQuestionsClassRequest create the request corresponding to the show_questions action endpoint of the class resource.

func (*Client) ShowClass

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

Get class by ID

func (*Client) ShowMembersClass

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

Get members of a class

func (*Client) ShowQuestion

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

Get a question by ID

func (*Client) ShowQuestionsClass

func (c *Client) ShowQuestionsClass(ctx context.Context, path string, answered *bool, authorID *int, questionType *string, unitID *int) (*http.Response, error)

Get questions for a class

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.

Jump to

Keyboard shortcuts

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