Documentation ¶
Index ¶
- func CreateCoursePath() string
- func CreateRegistrationPath() string
- func DeleteCoursePath(id int) string
- func ListCoursePath() string
- func ListRegistrationPath() string
- func LoginSessionPath() string
- func PatchCoursePath(id int) string
- func PatchRegistrationPath(id int) 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) DecodeCourseMediaCollection(resp *http.Response) (CourseMediaCollection, 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) ListCourse(ctx context.Context, path string, name *string) (*http.Response, error)
- func (c *Client) ListRegistration(ctx context.Context, path string, courseID *int) (*http.Response, error)
- func (c *Client) LoginSession(ctx context.Context, path string) (*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) NewListCourseRequest(ctx context.Context, path string, name *string) (*http.Request, error)
- func (c *Client) NewListRegistrationRequest(ctx context.Context, path string, courseID *int) (*http.Request, error)
- func (c *Client) NewLoginSessionRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewPatchCourseRequest(ctx context.Context, path string, payload *PatchCoursePayload, ...) (*http.Request, error)
- func (c *Client) NewPatchRegistrationRequest(ctx context.Context, path string, payload *PatchRegistrationPayload, ...) (*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) PatchCourse(ctx context.Context, path string, payload *PatchCoursePayload, ...) (*http.Response, error)
- func (c *Client) PatchRegistration(ctx context.Context, path string, payload *PatchRegistrationPayload, ...) (*http.Response, error)
- func (c *Client) SetBasicAuthSigner(signer goaclient.Signer)
- func (c *Client) SetJWTAuthSigner(signer goaclient.Signer)
- 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 CourseMediaCollection
- type CreateCoursePayload
- type CreateRegistrationPayload
- type PatchCoursePayload
- type PatchRegistrationPayload
- 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 ListCoursePath ¶
func ListCoursePath() string
ListCoursePath computes a request path to the list action of course.
func ListRegistrationPath ¶
func ListRegistrationPath() string
ListRegistrationPath computes a request path to the list action of registration.
func LoginSessionPath ¶
func LoginSessionPath() string
LoginSessionPath computes a request path to the login action of session.
func PatchCoursePath ¶
PatchCoursePath computes a request path to the patch action of course.
func PatchRegistrationPath ¶
PatchRegistrationPath computes a request path to the patch 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 JWTAuthSigner goaclient.Signer BasicAuthSigner goaclient.Signer 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) DecodeCourseMediaCollection ¶
func (c *Client) DecodeCourseMediaCollection(resp *http.Response) (CourseMediaCollection, error)
DecodeCourseMediaCollection decodes the CourseMediaCollection 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) ListCourse ¶
List all courses
func (*Client) ListRegistration ¶
func (c *Client) ListRegistration(ctx context.Context, path string, courseID *int) (*http.Response, error)
List all registrations
func (*Client) LoginSession ¶
Login uses basic auth and on successful auth returns a JWT in the response "Authorization" header
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) NewListCourseRequest ¶
func (c *Client) NewListCourseRequest(ctx context.Context, path string, name *string) (*http.Request, error)
NewListCourseRequest create the request corresponding to the list 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) NewLoginSessionRequest ¶
NewLoginSessionRequest create the request corresponding to the login action endpoint of the session resource.
func (*Client) NewPatchCourseRequest ¶
func (c *Client) NewPatchCourseRequest(ctx context.Context, path string, payload *PatchCoursePayload, contentType string) (*http.Request, error)
NewPatchCourseRequest create the request corresponding to the patch action endpoint of the course resource.
func (*Client) NewPatchRegistrationRequest ¶
func (c *Client) NewPatchRegistrationRequest(ctx context.Context, path string, payload *PatchRegistrationPayload, contentType string) (*http.Request, error)
NewPatchRegistrationRequest create the request corresponding to the patch 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) PatchCourse ¶
func (c *Client) PatchCourse(ctx context.Context, path string, payload *PatchCoursePayload, contentType string) (*http.Response, error)
Update a course using patch semantic
func (*Client) PatchRegistration ¶
func (c *Client) PatchRegistration(ctx context.Context, path string, payload *PatchRegistrationPayload, contentType string) (*http.Response, error)
Update a registration using patch semantic
func (*Client) SetBasicAuthSigner ¶
SetBasicAuthSigner sets the request signer for the BasicAuth security scheme.
func (*Client) SetJWTAuthSigner ¶
SetJWTAuthSigner sets the request signer for the JWTAuth security scheme.
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 CourseMediaCollection ¶
type CourseMediaCollection []*CourseMedia
CourseMediaCollection media type is a collection of CourseMedia.
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 PatchCoursePayload ¶
type PatchCoursePayload struct { // Course description Description *string `json:"description,omitempty" xml:"description,omitempty" form:"description,omitempty"` // Course end date/time EndTime *time.Time `json:"end_time,omitempty" xml:"end_time,omitempty" form:"end_time,omitempty"` // Course location Location *string `json:"location,omitempty" xml:"location,omitempty" form:"location,omitempty"` // Course start date/time StartTime *time.Time `json:"start_time,omitempty" xml:"start_time,omitempty" form:"start_time,omitempty"` }
PatchCoursePayload is the course patch action payload.
type PatchRegistrationPayload ¶
type PatchRegistrationPayload struct { // Attendee address Address *Address `json:"address,omitempty" xml:"address,omitempty" form:"address,omitempty"` // Attendee first name FirstName *string `json:"first_name,omitempty" xml:"first_name,omitempty" form:"first_name,omitempty"` // Attendee last name LastName *string `json:"last_name,omitempty" xml:"last_name,omitempty" form:"last_name,omitempty"` }
PatchRegistrationPayload is the registration patch 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.