Documentation ¶
Index ¶
- func CreateBackupServicePath() string
- func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DeleteBackupServicePath(id string) string
- func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeDeleteError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeGetError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeUpdateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeUpdateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func GetBackupServicePath(id string) string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountCreateHandler(mux goahttp.Muxer, h http.Handler)
- func MountDeleteHandler(mux goahttp.Muxer, h http.Handler)
- func MountGetHandler(mux goahttp.Muxer, h http.Handler)
- func MountUpdateHandler(mux goahttp.Muxer, h http.Handler)
- func NewCreateBackup(body *CreateRequestBody) *backupservice.Backup
- func NewCreateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewDeleteHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewDeletePayload(id string) *backupservice.DeletePayload
- func NewGetHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewGetPayload(id string) *backupservice.GetPayload
- func NewUpdateBackupresult(body *UpdateRequestBody) *backupservice.Backupresult
- func NewUpdateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func UpdateBackupServicePath() string
- func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error)
- type CreateRequestBody
- type CreateResponseBody
- type DeleteBackupNotFoundResponseBody
- type DeleteResponseBody
- type ErrorNamer
- type GetBackupNotFoundResponseBody
- type GetResponseBody
- type MountPoint
- type Server
- type UpdateBackupNotFoundResponseBody
- type UpdateRequestBody
- type UpdateResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackupServicePath ¶
func CreateBackupServicePath() string
CreateBackupServicePath returns the URL path to the Backup Service service create HTTP endpoint.
func DecodeCreateRequest ¶
func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeCreateRequest returns a decoder for requests sent to the Backup Service create 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 Backup Service delete endpoint.
func DecodeGetRequest ¶
func DecodeGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeGetRequest returns a decoder for requests sent to the Backup Service get endpoint.
func DecodeUpdateRequest ¶
func DecodeUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeUpdateRequest returns a decoder for requests sent to the Backup Service update endpoint.
func DeleteBackupServicePath ¶
DeleteBackupServicePath returns the URL path to the Backup Service service delete HTTP endpoint.
func EncodeCreateResponse ¶
func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeCreateResponse returns an encoder for responses returned by the Backup Service create 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 Backup Service 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 Backup Service delete endpoint.
func EncodeGetError ¶
func EncodeGetError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeGetError returns an encoder for errors returned by the get Backup Service endpoint.
func EncodeGetResponse ¶
func EncodeGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeGetResponse returns an encoder for responses returned by the Backup Service get endpoint.
func EncodeUpdateError ¶
func EncodeUpdateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeUpdateError returns an encoder for errors returned by the update Backup Service endpoint.
func EncodeUpdateResponse ¶
func EncodeUpdateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeUpdateResponse returns an encoder for responses returned by the Backup Service update endpoint.
func GetBackupServicePath ¶
GetBackupServicePath returns the URL path to the Backup Service service get HTTP endpoint.
func MountCreateHandler ¶
MountCreateHandler configures the mux to serve the "Backup Service" service "create" endpoint.
func MountDeleteHandler ¶
MountDeleteHandler configures the mux to serve the "Backup Service" service "delete" endpoint.
func MountGetHandler ¶
MountGetHandler configures the mux to serve the "Backup Service" service "get" endpoint.
func MountUpdateHandler ¶
MountUpdateHandler configures the mux to serve the "Backup Service" service "update" endpoint.
func NewCreateBackup ¶
func NewCreateBackup(body *CreateRequestBody) *backupservice.Backup
NewCreateBackup builds a Backup Service service create endpoint payload.
func NewCreateHandler ¶
func NewCreateHandler( 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
NewCreateHandler creates a HTTP handler which loads the HTTP request and calls the "Backup Service" service "create" endpoint.
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 "Backup Service" service "delete" endpoint.
func NewDeletePayload ¶
func NewDeletePayload(id string) *backupservice.DeletePayload
NewDeletePayload builds a Backup Service service delete endpoint payload.
func NewGetHandler ¶
func NewGetHandler( 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
NewGetHandler creates a HTTP handler which loads the HTTP request and calls the "Backup Service" service "get" endpoint.
func NewGetPayload ¶
func NewGetPayload(id string) *backupservice.GetPayload
NewGetPayload builds a Backup Service service get endpoint payload.
func NewUpdateBackupresult ¶
func NewUpdateBackupresult(body *UpdateRequestBody) *backupservice.Backupresult
NewUpdateBackupresult builds a Backup Service service update endpoint payload.
func NewUpdateHandler ¶
func NewUpdateHandler( 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
NewUpdateHandler creates a HTTP handler which loads the HTTP request and calls the "Backup Service" service "update" endpoint.
func UpdateBackupServicePath ¶
func UpdateBackupServicePath() string
UpdateBackupServicePath returns the URL path to the Backup Service service update HTTP endpoint.
func ValidateUpdateRequestBody ¶
func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error)
ValidateUpdateRequestBody runs the validations defined on UpdateRequestBody
Types ¶
type CreateRequestBody ¶
type CreateRequestBody struct { // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` }
CreateRequestBody is the type of the "Backup Service" service "create" endpoint HTTP request body.
type CreateResponseBody ¶
type CreateResponseBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` DeletedAt *string `form:"deleted_at,omitempty" json:"deleted_at,omitempty" xml:"deleted_at,omitempty"` ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Current state of the job State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` // URL of the uploaded backup tarball Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` }
CreateResponseBody is the type of the "Backup Service" service "create" endpoint HTTP response body.
func NewCreateResponseBody ¶
func NewCreateResponseBody(res *backupserviceviews.BackupresultView) *CreateResponseBody
NewCreateResponseBody builds the HTTP response body from the result of the "create" endpoint of the "Backup Service" service.
type DeleteBackupNotFoundResponseBody ¶
type DeleteBackupNotFoundResponseBody struct { // backup resource not found Message string `form:"message" json:"message" xml:"message"` }
DeleteBackupNotFoundResponseBody is the type of the "Backup Service" service "delete" endpoint HTTP response body for the "backup_not_found" error.
func NewDeleteBackupNotFoundResponseBody ¶
func NewDeleteBackupNotFoundResponseBody(res *backupservice.BackupNotFound) *DeleteBackupNotFoundResponseBody
NewDeleteBackupNotFoundResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "Backup Service" service.
type DeleteResponseBody ¶
type DeleteResponseBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` DeletedAt *string `form:"deleted_at,omitempty" json:"deleted_at,omitempty" xml:"deleted_at,omitempty"` ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Current state of the job State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` // URL of the uploaded backup tarball Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` }
DeleteResponseBody is the type of the "Backup Service" service "delete" endpoint HTTP response body.
func NewDeleteResponseBody ¶
func NewDeleteResponseBody(res *backupserviceviews.BackupresultView) *DeleteResponseBody
NewDeleteResponseBody builds the HTTP response body from the result of the "delete" endpoint of the "Backup Service" 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 GetBackupNotFoundResponseBody ¶
type GetBackupNotFoundResponseBody struct { // backup resource not found Message string `form:"message" json:"message" xml:"message"` }
GetBackupNotFoundResponseBody is the type of the "Backup Service" service "get" endpoint HTTP response body for the "backup_not_found" error.
func NewGetBackupNotFoundResponseBody ¶
func NewGetBackupNotFoundResponseBody(res *backupservice.BackupNotFound) *GetBackupNotFoundResponseBody
NewGetBackupNotFoundResponseBody builds the HTTP response body from the result of the "get" endpoint of the "Backup Service" service.
type GetResponseBody ¶
type GetResponseBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` DeletedAt *string `form:"deleted_at,omitempty" json:"deleted_at,omitempty" xml:"deleted_at,omitempty"` ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Current state of the job State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` // URL of the uploaded backup tarball Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` }
GetResponseBody is the type of the "Backup Service" service "get" endpoint HTTP response body.
func NewGetResponseBody ¶
func NewGetResponseBody(res *backupserviceviews.BackupresultView) *GetResponseBody
NewGetResponseBody builds the HTTP response body from the result of the "get" endpoint of the "Backup Service" 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 Create http.Handler Get http.Handler Update http.Handler Delete http.Handler }
Server lists the Backup Service service endpoint HTTP handlers.
func New ¶
func New( e *backupservice.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 Backup Service 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.
type UpdateBackupNotFoundResponseBody ¶
type UpdateBackupNotFoundResponseBody struct { // backup resource not found Message string `form:"message" json:"message" xml:"message"` }
UpdateBackupNotFoundResponseBody is the type of the "Backup Service" service "update" endpoint HTTP response body for the "backup_not_found" error.
func NewUpdateBackupNotFoundResponseBody ¶
func NewUpdateBackupNotFoundResponseBody(res *backupservice.BackupNotFound) *UpdateBackupNotFoundResponseBody
NewUpdateBackupNotFoundResponseBody builds the HTTP response body from the result of the "update" endpoint of the "Backup Service" service.
type UpdateRequestBody ¶
type UpdateRequestBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` DeletedAt *string `form:"deleted_at,omitempty" json:"deleted_at,omitempty" xml:"deleted_at,omitempty"` ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Current state of the job State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` // URL of the uploaded backup tarball Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` }
UpdateRequestBody is the type of the "Backup Service" service "update" endpoint HTTP request body.
type UpdateResponseBody ¶
type UpdateResponseBody struct { CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` DeletedAt *string `form:"deleted_at,omitempty" json:"deleted_at,omitempty" xml:"deleted_at,omitempty"` ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Current state of the job State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // Name of pachyderm instance backed up Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // Namespace of resource backed up Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"` // Name of target pod Pod *string `form:"pod,omitempty" json:"pod,omitempty" xml:"pod,omitempty"` // Name of container in pod Container *string `form:"container,omitempty" json:"container,omitempty" xml:"container,omitempty"` // base64 encoded command to run in pod Command *string `form:"command,omitempty" json:"command,omitempty" xml:"command,omitempty"` // Kubernetes secret containing S3 storage credentials StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"` // base64 encoded json representation of object KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"` // URL of the uploaded backup tarball Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"` }
UpdateResponseBody is the type of the "Backup Service" service "update" endpoint HTTP response body.
func NewUpdateResponseBody ¶
func NewUpdateResponseBody(res *backupserviceviews.BackupresultView) *UpdateResponseBody
NewUpdateResponseBody builds the HTTP response body from the result of the "update" endpoint of the "Backup Service" service.