Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewAddEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDownloadEndpoint(s Service) goa.Endpoint
- func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedFirmwares(res *Firmwares, view string) *firmwareviews.Firmwares
- type AddFirmwarePayload
- type AddPayload
- type Auther
- type Client
- func (c *Client) Add(ctx context.Context, p *AddPayload) (err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
- func (c *Client) Download(ctx context.Context, p *DownloadPayload) (res *DownloadResult, resp io.ReadCloser, err error)
- func (c *Client) List(ctx context.Context, p *ListPayload) (res *Firmwares, err error)
- type DeletePayload
- type DownloadPayload
- type DownloadResponseData
- type DownloadResult
- type Endpoints
- type FirmwareSummary
- type FirmwareSummaryCollection
- type Firmwares
- type ListPayload
- type Service
Constants ¶
const ServiceName = "firmware"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [4]string{"download", "add", "list", "delete"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewAddEndpoint ¶
func NewAddEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewAddEndpoint returns an endpoint function that calls the method "add" of service "firmware".
func NewDeleteEndpoint ¶
func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "firmware".
func NewDownloadEndpoint ¶
NewDownloadEndpoint returns an endpoint function that calls the method "download" of service "firmware".
func NewListEndpoint ¶
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "firmware".
func NewViewedFirmwares ¶
func NewViewedFirmwares(res *Firmwares, view string) *firmwareviews.Firmwares
NewViewedFirmwares initializes viewed result type Firmwares from result type Firmwares using the given view.
Types ¶
type AddFirmwarePayload ¶
type AddPayload ¶
type AddPayload struct { Auth *string Firmware *AddFirmwarePayload }
AddPayload is the payload type of the firmware service add method.
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
type Client struct { DownloadEndpoint goa.Endpoint AddEndpoint goa.Endpoint ListEndpoint goa.Endpoint DeleteEndpoint goa.Endpoint }
Client is the "firmware" service client.
func (*Client) Add ¶
func (c *Client) Add(ctx context.Context, p *AddPayload) (err error)
Add calls the "add" endpoint of the "firmware" service.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
Delete calls the "delete" endpoint of the "firmware" service.
func (*Client) Download ¶
func (c *Client) Download(ctx context.Context, p *DownloadPayload) (res *DownloadResult, resp io.ReadCloser, err error)
Download calls the "download" endpoint of the "firmware" service.
type DeletePayload ¶
DeletePayload is the payload type of the firmware service delete method.
type DownloadPayload ¶
type DownloadPayload struct {
FirmwareID int32
}
DownloadPayload is the payload type of the firmware service download method.
type DownloadResponseData ¶
type DownloadResponseData struct { // Result is the method result. Result *DownloadResult // Body streams the HTTP response body. Body io.ReadCloser }
DownloadResponseData holds both the result and the HTTP response body reader of the "download" method.
type DownloadResult ¶
DownloadResult is the result type of the firmware service download method.
type Endpoints ¶
type Endpoints struct { Download goa.Endpoint Add goa.Endpoint List goa.Endpoint Delete goa.Endpoint }
Endpoints wraps the "firmware" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "firmware" service with endpoints.
type FirmwareSummary ¶
type FirmwareSummaryCollection ¶
type FirmwareSummaryCollection []*FirmwareSummary
type Firmwares ¶
type Firmwares struct {
Firmwares FirmwareSummaryCollection
}
Firmwares is the result type of the firmware service list method.
func NewFirmwares ¶
func NewFirmwares(vres *firmwareviews.Firmwares) *Firmwares
NewFirmwares initializes result type Firmwares from viewed result type Firmwares.
type ListPayload ¶
ListPayload is the payload type of the firmware service list method.
type Service ¶
type Service interface { // Download implements download. Download(context.Context, *DownloadPayload) (res *DownloadResult, body io.ReadCloser, err error) // Add implements add. Add(context.Context, *AddPayload) (err error) // List implements list. List(context.Context, *ListPayload) (res *Firmwares, err error) // Delete implements delete. Delete(context.Context, *DeletePayload) (err error) }
Service is the firmware service interface.