Documentation ¶
Index ¶
- func CreateCoursePath() string
- func CreateRegistrationPath() string
- func DeleteCoursePath(id int) string
- func ListRegistrationPath() string
- func ShowCoursePath(id int) string
- func ShowRegistrationPath(id int) string
- type Address
- type Client
- func (c *Client) CreateCourse(ctx context.Context, path string, payload *CreateCoursePayload, ...) (*http.Response, error)
- func (c *Client) CreateRegistration(ctx context.Context, path string, payload *CreateRegistrationPayload, ...) (*http.Response, error)
- func (c *Client) DecodeCourseMedia(resp *http.Response) (*CourseMedia, error)
- func (c *Client) DecodeError(resp *http.Response) (*goa.Error, error)
- func (c *Client) DecodeRegistrationMedia(resp *http.Response) (*RegistrationMedia, error)
- func (c *Client) DecodeRegistrationMediaCollection(resp *http.Response) (RegistrationMediaCollection, error)
- func (c *Client) DeleteCourse(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) DownloadSwagger(ctx context.Context, filename, dest string) (int64, error)
- func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)
- func (c *Client) DownloadSwaggerYaml(ctx context.Context, dest string) (int64, error)
- func (c *Client) ListRegistration(ctx context.Context, path string, courseID *int) (*http.Response, error)
- func (c *Client) NewCreateCourseRequest(ctx context.Context, path string, payload *CreateCoursePayload, ...) (*http.Request, error)
- func (c *Client) NewCreateRegistrationRequest(ctx context.Context, path string, payload *CreateRegistrationPayload, ...) (*http.Request, error)
- func (c *Client) NewDeleteCourseRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewListRegistrationRequest(ctx context.Context, path string, courseID *int) (*http.Request, error)
- func (c *Client) NewShowCourseRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewShowRegistrationRequest(ctx context.Context, path string, view *string) (*http.Request, error)
- func (c *Client) ShowCourse(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) ShowRegistration(ctx context.Context, path string, view *string) (*http.Response, error)
- type CourseMedia
- type CreateCoursePayload
- type CreateRegistrationPayload
- type RegistrationMedia
- type RegistrationMediaCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCoursePath ¶
func CreateCoursePath() string
CreateCoursePath computes a request path to the create action of course.
func CreateRegistrationPath ¶
func CreateRegistrationPath() string
CreateRegistrationPath computes a request path to the create action of registration.
func DeleteCoursePath ¶
DeleteCoursePath computes a request path to the delete action of course.
func ListRegistrationPath ¶
func ListRegistrationPath() string
ListRegistrationPath computes a request path to the list action of registration.
func ShowCoursePath ¶
ShowCoursePath computes a request path to the show action of course.
func ShowRegistrationPath ¶
ShowRegistrationPath computes a request path to the show action of registration.
Types ¶
type Address ¶
type Address struct { // City City string `json:"city" xml:"city" form:"city"` // Street number Number int `json:"number" xml:"number" form:"number"` // US State Code State string `json:"state" xml:"state" form:"state"` // Street name Street string `json:"street" xml:"street" form:"street"` // US Zip code Zip int `json:"zip" xml:"zip" form:"zip"` }
Address is a street address
type Client ¶
type Client struct { *goaclient.Client Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the GoWorkshop service client.
func (*Client) CreateCourse ¶
func (c *Client) CreateCourse(ctx context.Context, path string, payload *CreateCoursePayload, contentType string) (*http.Response, error)
Create a new course
func (*Client) CreateRegistration ¶
func (c *Client) CreateRegistration(ctx context.Context, path string, payload *CreateRegistrationPayload, contentType string) (*http.Response, error)
Create a new registration
func (*Client) DecodeCourseMedia ¶
func (c *Client) DecodeCourseMedia(resp *http.Response) (*CourseMedia, error)
DecodeCourseMedia decodes the CourseMedia instance encoded in resp body.
func (*Client) DecodeError ¶
DecodeError decodes the Error instance encoded in resp body.
func (*Client) DecodeRegistrationMedia ¶
func (c *Client) DecodeRegistrationMedia(resp *http.Response) (*RegistrationMedia, error)
DecodeRegistrationMedia decodes the RegistrationMedia instance encoded in resp body.
func (*Client) DecodeRegistrationMediaCollection ¶
func (c *Client) DecodeRegistrationMediaCollection(resp *http.Response) (RegistrationMediaCollection, error)
DecodeRegistrationMediaCollection decodes the RegistrationMediaCollection instance encoded in resp body.
func (*Client) DeleteCourse ¶
Delete a course
func (*Client) DownloadSwagger ¶
DownloadSwagger downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) DownloadSwaggerJSON ¶
DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) DownloadSwaggerYaml ¶
DownloadSwaggerYaml downloads swagger.yaml and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) ListRegistration ¶
func (c *Client) ListRegistration(ctx context.Context, path string, courseID *int) (*http.Response, error)
List all registrations
func (*Client) NewCreateCourseRequest ¶
func (c *Client) NewCreateCourseRequest(ctx context.Context, path string, payload *CreateCoursePayload, contentType string) (*http.Request, error)
NewCreateCourseRequest create the request corresponding to the create action endpoint of the course resource.
func (*Client) NewCreateRegistrationRequest ¶
func (c *Client) NewCreateRegistrationRequest(ctx context.Context, path string, payload *CreateRegistrationPayload, contentType string) (*http.Request, error)
NewCreateRegistrationRequest create the request corresponding to the create action endpoint of the registration resource.
func (*Client) NewDeleteCourseRequest ¶
NewDeleteCourseRequest create the request corresponding to the delete action endpoint of the course resource.
func (*Client) NewListRegistrationRequest ¶
func (c *Client) NewListRegistrationRequest(ctx context.Context, path string, courseID *int) (*http.Request, error)
NewListRegistrationRequest create the request corresponding to the list action endpoint of the registration resource.
func (*Client) NewShowCourseRequest ¶
NewShowCourseRequest create the request corresponding to the show action endpoint of the course resource.
func (*Client) NewShowRegistrationRequest ¶
func (c *Client) NewShowRegistrationRequest(ctx context.Context, path string, view *string) (*http.Request, error)
NewShowRegistrationRequest create the request corresponding to the show action endpoint of the registration resource.
func (*Client) ShowCourse ¶
Retrieve a course by ID
type CourseMedia ¶
type CourseMedia struct { // Course description Description *string `json:"description,omitempty" xml:"description,omitempty" form:"description,omitempty"` // Course end date/time EndTime time.Time `json:"end_time" xml:"end_time" form:"end_time"` // Course href Href string `json:"href" xml:"href" form:"href"` // Course identifier ID int `json:"id" xml:"id" form:"id"` // Course location Location string `json:"location" xml:"location" form:"location"` // Course name Name string `json:"name" xml:"name" form:"name"` // Course start date/time StartTime time.Time `json:"start_time" xml:"start_time" form:"start_time"` }
CourseMedia is the media type used to render courses
type CreateCoursePayload ¶
type CreateCoursePayload struct { // Course description Description *string `json:"description,omitempty" xml:"description,omitempty" form:"description,omitempty"` // Course end date/time EndTime time.Time `json:"end_time" xml:"end_time" form:"end_time"` // Course location Location string `json:"location" xml:"location" form:"location"` // Course name Name string `json:"name" xml:"name" form:"name"` // Course start date/time StartTime time.Time `json:"start_time" xml:"start_time" form:"start_time"` }
CreateCoursePayload is the course create action payload.
type CreateRegistrationPayload ¶
type CreateRegistrationPayload struct { // Attendee address Address *Address `json:"address" xml:"address" form:"address"` // The href to the course resource that describes the course being taught CourseHref string `json:"course_href" xml:"course_href" form:"course_href"` // Attendee first name FirstName string `json:"first_name" xml:"first_name" form:"first_name"` // Attendee last name LastName string `json:"last_name" xml:"last_name" form:"last_name"` }
CreateRegistrationPayload is the registration create action payload.
type RegistrationMedia ¶
type RegistrationMedia struct { // Attendee address Address *Address `json:"address" xml:"address" form:"address"` // Course being taught Course *CourseMedia `json:"course" xml:"course" form:"course"` // Attendee first name FirstName string `json:"first_name" xml:"first_name" form:"first_name"` // Registration href Href string `json:"href" xml:"href" form:"href"` // Registration identifier ID int `json:"id" xml:"id" form:"id"` // Attendee last name LastName string `json:"last_name" xml:"last_name" form:"last_name"` }
RegistrationMedia is the media type used to render registrations
type RegistrationMediaCollection ¶
type RegistrationMediaCollection []*RegistrationMedia
RegistrationMediaCollection media type is a collection of RegistrationMedia.