server

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFirmwarePath

func AddFirmwarePath() string

AddFirmwarePath returns the URL path to the firmware service add HTTP endpoint.

func DecodeAddRequest

func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeAddRequest returns a decoder for requests sent to the firmware add endpoint.

func DecodeDeleteRequest

func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDeleteRequest returns a decoder for requests sent to the firmware delete endpoint.

func DecodeDownloadRequest

func DecodeDownloadRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDownloadRequest returns a decoder for requests sent to the firmware download endpoint.

func DecodeListRequest

func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeListRequest returns a decoder for requests sent to the firmware list endpoint.

func DeleteFirmwarePath

func DeleteFirmwarePath(firmwareID int32) string

DeleteFirmwarePath returns the URL path to the firmware service delete HTTP endpoint.

func DownloadFirmwarePath

func DownloadFirmwarePath(firmwareID int32) string

DownloadFirmwarePath returns the URL path to the firmware service download HTTP endpoint.

func EncodeAddError

func EncodeAddError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeAddError returns an encoder for errors returned by the add firmware endpoint.

func EncodeAddResponse

func EncodeAddResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeAddResponse returns an encoder for responses returned by the firmware add endpoint.

func EncodeDeleteError

func EncodeDeleteError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDeleteError returns an encoder for errors returned by the delete firmware endpoint.

func EncodeDeleteResponse

func EncodeDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDeleteResponse returns an encoder for responses returned by the firmware delete endpoint.

func EncodeDownloadError

func EncodeDownloadError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDownloadError returns an encoder for errors returned by the download firmware endpoint.

func EncodeDownloadResponse

func EncodeDownloadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDownloadResponse returns an encoder for responses returned by the firmware download endpoint.

func EncodeListError

func EncodeListError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeListError returns an encoder for errors returned by the list firmware endpoint.

func EncodeListResponse

func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeListResponse returns an encoder for responses returned by the firmware list endpoint.

func ListFirmwarePath

func ListFirmwarePath() string

ListFirmwarePath returns the URL path to the firmware service list HTTP endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the firmware endpoints.

func MountAddHandler

func MountAddHandler(mux goahttp.Muxer, h http.Handler)

MountAddHandler configures the mux to serve the "firmware" service "add" endpoint.

func MountCORSHandler

func MountCORSHandler(mux goahttp.Muxer, h http.Handler)

MountCORSHandler configures the mux to serve the CORS endpoints for the service firmware.

func MountDeleteHandler

func MountDeleteHandler(mux goahttp.Muxer, h http.Handler)

MountDeleteHandler configures the mux to serve the "firmware" service "delete" endpoint.

func MountDownloadHandler

func MountDownloadHandler(mux goahttp.Muxer, h http.Handler)

MountDownloadHandler configures the mux to serve the "firmware" service "download" endpoint.

func MountListHandler

func MountListHandler(mux goahttp.Muxer, h http.Handler)

MountListHandler configures the mux to serve the "firmware" service "list" endpoint.

func NewAddHandler

func NewAddHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewAddHandler creates a HTTP handler which loads the HTTP request and calls the "firmware" service "add" endpoint.

func NewAddPayload

func NewAddPayload(body *AddRequestBody, auth *string) *firmware.AddPayload

NewAddPayload builds a firmware service add endpoint payload.

func NewCORSHandler

func NewCORSHandler() http.Handler

NewCORSHandler creates a HTTP handler which returns a simple 200 response.

func NewDeleteHandler

func NewDeleteHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "firmware" service "delete" endpoint.

func NewDeletePayload

func NewDeletePayload(firmwareID int32, auth *string) *firmware.DeletePayload

NewDeletePayload builds a firmware service delete endpoint payload.

func NewDownloadHandler

func NewDownloadHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDownloadHandler creates a HTTP handler which loads the HTTP request and calls the "firmware" service "download" endpoint.

func NewDownloadPayload

func NewDownloadPayload(firmwareID int32) *firmware.DownloadPayload

NewDownloadPayload builds a firmware service download endpoint payload.

func NewListHandler

func NewListHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewListHandler creates a HTTP handler which loads the HTTP request and calls the "firmware" service "list" endpoint.

func NewListPayload

func NewListPayload(module *string, profile *string, pageSize *int32, page *int32, auth *string) *firmware.ListPayload

NewListPayload builds a firmware service list endpoint payload.

func ValidateAddRequestBody

func ValidateAddRequestBody(body *AddRequestBody) (err error)

ValidateAddRequestBody runs the validations defined on AddRequestBody

Types

type AddBadRequestResponseBody

type AddBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

AddBadRequestResponseBody is the type of the "firmware" service "add" endpoint HTTP response body for the "bad-request" error.

func NewAddBadRequestResponseBody

func NewAddBadRequestResponseBody(res *goa.ServiceError) *AddBadRequestResponseBody

NewAddBadRequestResponseBody builds the HTTP response body from the result of the "add" endpoint of the "firmware" service.

type AddForbiddenResponseBody

type AddForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

AddForbiddenResponseBody is the type of the "firmware" service "add" endpoint HTTP response body for the "forbidden" error.

func NewAddForbiddenResponseBody

func NewAddForbiddenResponseBody(res *goa.ServiceError) *AddForbiddenResponseBody

NewAddForbiddenResponseBody builds the HTTP response body from the result of the "add" endpoint of the "firmware" service.

type AddNotFoundResponseBody

type AddNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

AddNotFoundResponseBody is the type of the "firmware" service "add" endpoint HTTP response body for the "not-found" error.

func NewAddNotFoundResponseBody

func NewAddNotFoundResponseBody(res *goa.ServiceError) *AddNotFoundResponseBody

NewAddNotFoundResponseBody builds the HTTP response body from the result of the "add" endpoint of the "firmware" service.

type AddRequestBody

type AddRequestBody struct {
	Etag           *string `form:"etag,omitempty" json:"etag,omitempty" xml:"etag,omitempty"`
	Module         *string `form:"module,omitempty" json:"module,omitempty" xml:"module,omitempty"`
	Profile        *string `form:"profile,omitempty" json:"profile,omitempty" xml:"profile,omitempty"`
	Version        *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"`
	URL            *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
	Meta           *string `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
	LogicalAddress *int64  `form:"logicalAddress,omitempty" json:"logicalAddress,omitempty" xml:"logicalAddress,omitempty"`
}

AddRequestBody is the type of the "firmware" service "add" endpoint HTTP request body.

type AddUnauthorizedResponseBody

type AddUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

AddUnauthorizedResponseBody is the type of the "firmware" service "add" endpoint HTTP response body for the "unauthorized" error.

func NewAddUnauthorizedResponseBody

func NewAddUnauthorizedResponseBody(res *goa.ServiceError) *AddUnauthorizedResponseBody

NewAddUnauthorizedResponseBody builds the HTTP response body from the result of the "add" endpoint of the "firmware" service.

type DeleteBadRequestResponseBody

type DeleteBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DeleteBadRequestResponseBody is the type of the "firmware" service "delete" endpoint HTTP response body for the "bad-request" error.

func NewDeleteBadRequestResponseBody

func NewDeleteBadRequestResponseBody(res *goa.ServiceError) *DeleteBadRequestResponseBody

NewDeleteBadRequestResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "firmware" service.

type DeleteForbiddenResponseBody

type DeleteForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DeleteForbiddenResponseBody is the type of the "firmware" service "delete" endpoint HTTP response body for the "forbidden" error.

func NewDeleteForbiddenResponseBody

func NewDeleteForbiddenResponseBody(res *goa.ServiceError) *DeleteForbiddenResponseBody

NewDeleteForbiddenResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "firmware" service.

type DeleteNotFoundResponseBody

type DeleteNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DeleteNotFoundResponseBody is the type of the "firmware" service "delete" endpoint HTTP response body for the "not-found" error.

func NewDeleteNotFoundResponseBody

func NewDeleteNotFoundResponseBody(res *goa.ServiceError) *DeleteNotFoundResponseBody

NewDeleteNotFoundResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "firmware" service.

type DeleteUnauthorizedResponseBody

type DeleteUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DeleteUnauthorizedResponseBody is the type of the "firmware" service "delete" endpoint HTTP response body for the "unauthorized" error.

func NewDeleteUnauthorizedResponseBody

func NewDeleteUnauthorizedResponseBody(res *goa.ServiceError) *DeleteUnauthorizedResponseBody

NewDeleteUnauthorizedResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "firmware" service.

type DownloadBadRequestResponseBody

type DownloadBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadBadRequestResponseBody is the type of the "firmware" service "download" endpoint HTTP response body for the "bad-request" error.

func NewDownloadBadRequestResponseBody

func NewDownloadBadRequestResponseBody(res *goa.ServiceError) *DownloadBadRequestResponseBody

NewDownloadBadRequestResponseBody builds the HTTP response body from the result of the "download" endpoint of the "firmware" service.

type DownloadForbiddenResponseBody

type DownloadForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadForbiddenResponseBody is the type of the "firmware" service "download" endpoint HTTP response body for the "forbidden" error.

func NewDownloadForbiddenResponseBody

func NewDownloadForbiddenResponseBody(res *goa.ServiceError) *DownloadForbiddenResponseBody

NewDownloadForbiddenResponseBody builds the HTTP response body from the result of the "download" endpoint of the "firmware" service.

type DownloadNotFoundResponseBody

type DownloadNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadNotFoundResponseBody is the type of the "firmware" service "download" endpoint HTTP response body for the "not-found" error.

func NewDownloadNotFoundResponseBody

func NewDownloadNotFoundResponseBody(res *goa.ServiceError) *DownloadNotFoundResponseBody

NewDownloadNotFoundResponseBody builds the HTTP response body from the result of the "download" endpoint of the "firmware" service.

type DownloadUnauthorizedResponseBody

type DownloadUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadUnauthorizedResponseBody is the type of the "firmware" service "download" endpoint HTTP response body for the "unauthorized" error.

func NewDownloadUnauthorizedResponseBody

func NewDownloadUnauthorizedResponseBody(res *goa.ServiceError) *DownloadUnauthorizedResponseBody

NewDownloadUnauthorizedResponseBody builds the HTTP response body from the result of the "download" endpoint of the "firmware" service.

type ErrorNamer

type ErrorNamer interface {
	ErrorName() string
}

ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.

type FirmwareSummaryResponseBody

type FirmwareSummaryResponseBody struct {
	ID             int32                  `form:"id" json:"id" xml:"id"`
	Time           string                 `form:"time" json:"time" xml:"time"`
	Etag           string                 `form:"etag" json:"etag" xml:"etag"`
	Module         string                 `form:"module" json:"module" xml:"module"`
	Profile        string                 `form:"profile" json:"profile" xml:"profile"`
	Version        *string                `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"`
	URL            string                 `form:"url" json:"url" xml:"url"`
	Meta           map[string]interface{} `form:"meta" json:"meta" xml:"meta"`
	BuildNumber    int32                  `form:"buildNumber" json:"buildNumber" xml:"buildNumber"`
	BuildTime      int64                  `form:"buildTime" json:"buildTime" xml:"buildTime"`
	LogicalAddress *int64                 `form:"logicalAddress,omitempty" json:"logicalAddress,omitempty" xml:"logicalAddress,omitempty"`
}

FirmwareSummaryResponseBody is used to define fields on response body types.

type FirmwareSummaryResponseBodyCollection

type FirmwareSummaryResponseBodyCollection []*FirmwareSummaryResponseBody

FirmwareSummaryResponseBodyCollection is used to define fields on response body types.

type ListBadRequestResponseBody

type ListBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListBadRequestResponseBody is the type of the "firmware" service "list" endpoint HTTP response body for the "bad-request" error.

func NewListBadRequestResponseBody

func NewListBadRequestResponseBody(res *goa.ServiceError) *ListBadRequestResponseBody

NewListBadRequestResponseBody builds the HTTP response body from the result of the "list" endpoint of the "firmware" service.

type ListForbiddenResponseBody

type ListForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListForbiddenResponseBody is the type of the "firmware" service "list" endpoint HTTP response body for the "forbidden" error.

func NewListForbiddenResponseBody

func NewListForbiddenResponseBody(res *goa.ServiceError) *ListForbiddenResponseBody

NewListForbiddenResponseBody builds the HTTP response body from the result of the "list" endpoint of the "firmware" service.

type ListNotFoundResponseBody

type ListNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListNotFoundResponseBody is the type of the "firmware" service "list" endpoint HTTP response body for the "not-found" error.

func NewListNotFoundResponseBody

func NewListNotFoundResponseBody(res *goa.ServiceError) *ListNotFoundResponseBody

NewListNotFoundResponseBody builds the HTTP response body from the result of the "list" endpoint of the "firmware" service.

type ListResponseBody

type ListResponseBody struct {
	Firmwares FirmwareSummaryResponseBodyCollection `form:"firmwares" json:"firmwares" xml:"firmwares"`
}

ListResponseBody is the type of the "firmware" service "list" endpoint HTTP response body.

func NewListResponseBody

func NewListResponseBody(res *firmwareviews.FirmwaresView) *ListResponseBody

NewListResponseBody builds the HTTP response body from the result of the "list" endpoint of the "firmware" service.

type ListUnauthorizedResponseBody

type ListUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListUnauthorizedResponseBody is the type of the "firmware" service "list" endpoint HTTP response body for the "unauthorized" error.

func NewListUnauthorizedResponseBody

func NewListUnauthorizedResponseBody(res *goa.ServiceError) *ListUnauthorizedResponseBody

NewListUnauthorizedResponseBody builds the HTTP response body from the result of the "list" endpoint of the "firmware" service.

type MountPoint

type MountPoint struct {
	// Method is the name of the service method served by the mounted HTTP handler.
	Method string
	// Verb is the HTTP method used to match requests to the mounted handler.
	Verb string
	// Pattern is the HTTP request path pattern used to match requests to the
	// mounted handler.
	Pattern string
}

MountPoint holds information about the mounted endpoints.

type Server

type Server struct {
	Mounts   []*MountPoint
	Download http.Handler
	Add      http.Handler
	List     http.Handler
	Delete   http.Handler
	CORS     http.Handler
}

Server lists the firmware service endpoint HTTP handlers.

func New

func New(
	e *firmware.Endpoints,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) *Server

New instantiates HTTP handlers for all the firmware service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

Jump to

Keyboard shortcuts

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