Documentation
¶
Index ¶
- func BuildCreatePayload(volumesCreateBody string) (*volumes.CreateVolumePayload, error)
- func BuildDeletePayload(volumesDeleteName string, volumesDeleteNamespace string) (*volumes.DeletePayload, error)
- func BuildGetPayload(volumesGetName string, volumesGetNamespace string) (*volumes.GetPayload, error)
- func BuildListPayload(volumesListNamespace string) (*volumes.ListPayload, error)
- func CreateVolumesPath() string
- func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DeleteVolumesPath(name string) string
- func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeDeleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeGetRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func GetVolumesPath(name string) string
- func ListVolumesPath() string
- func NewCreateAlreadyExists(body string) volumes.AlreadyExists
- func NewCreateInvalid(body string) volumes.Invalid
- func NewCreateVolumeCreated(body *CreateResponseBody) *volumesviews.VolumeView
- func NewDeleteNotFound(body string) volumes.NotFound
- func NewGetNotFound(body string) volumes.NotFound
- func NewGetVolumeOK(body *GetResponseBody) *volumesviews.VolumeView
- func NewListVolumeOK(body []*VolumeResponse) []*volumes.Volume
- func ValidateVolumeResponse(body *VolumeResponse) (err error)
- type Client
- func (c *Client) BuildCreateRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildDeleteRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildGetRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) Create() goa.Endpoint
- func (c *Client) Delete() goa.Endpoint
- func (c *Client) Get() goa.Endpoint
- func (c *Client) List() goa.Endpoint
- type CreateRequestBody
- type CreateResponseBody
- type GetResponseBody
- type VolumeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCreatePayload ¶
func BuildCreatePayload(volumesCreateBody string) (*volumes.CreateVolumePayload, error)
BuildCreatePayload builds the payload for the volumes create endpoint from CLI flags.
func BuildDeletePayload ¶
func BuildDeletePayload(volumesDeleteName string, volumesDeleteNamespace string) (*volumes.DeletePayload, error)
BuildDeletePayload builds the payload for the volumes delete endpoint from CLI flags.
func BuildGetPayload ¶
func BuildGetPayload(volumesGetName string, volumesGetNamespace string) (*volumes.GetPayload, error)
BuildGetPayload builds the payload for the volumes get endpoint from CLI flags.
func BuildListPayload ¶
func BuildListPayload(volumesListNamespace string) (*volumes.ListPayload, error)
BuildListPayload builds the payload for the volumes list endpoint from CLI flags.
func CreateVolumesPath ¶
func CreateVolumesPath() string
CreateVolumesPath returns the URL path to the volumes service create HTTP endpoint.
func DecodeCreateResponse ¶
func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeCreateResponse returns a decoder for responses returned by the volumes create endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeCreateResponse may return the following errors:
- "already_exists" (type volumes.AlreadyExists): http.StatusConflict
- "invalid" (type volumes.Invalid): http.StatusBadRequest
- error: internal error
func DecodeDeleteResponse ¶
func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeDeleteResponse returns a decoder for responses returned by the volumes delete endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeDeleteResponse may return the following errors:
- "not_found" (type volumes.NotFound): http.StatusNotFound
- error: internal error
func DecodeGetResponse ¶
func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeGetResponse returns a decoder for responses returned by the volumes get endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeGetResponse may return the following errors:
- "not_found" (type volumes.NotFound): http.StatusNotFound
- error: internal error
func DecodeListResponse ¶
func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeListResponse returns a decoder for responses returned by the volumes list endpoint. restoreBody controls whether the response body should be restored after having been read.
func DeleteVolumesPath ¶
DeleteVolumesPath returns the URL path to the volumes service delete HTTP endpoint.
func EncodeCreateRequest ¶
func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeCreateRequest returns an encoder for requests sent to the volumes create server.
func EncodeDeleteRequest ¶
func EncodeDeleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeDeleteRequest returns an encoder for requests sent to the volumes delete server.
func EncodeGetRequest ¶
EncodeGetRequest returns an encoder for requests sent to the volumes get server.
func EncodeListRequest ¶
EncodeListRequest returns an encoder for requests sent to the volumes list server.
func GetVolumesPath ¶
GetVolumesPath returns the URL path to the volumes service get HTTP endpoint.
func ListVolumesPath ¶
func ListVolumesPath() string
ListVolumesPath returns the URL path to the volumes service list HTTP endpoint.
func NewCreateAlreadyExists ¶
func NewCreateAlreadyExists(body string) volumes.AlreadyExists
NewCreateAlreadyExists builds a volumes service create endpoint already_exists error.
func NewCreateInvalid ¶
NewCreateInvalid builds a volumes service create endpoint invalid error.
func NewCreateVolumeCreated ¶
func NewCreateVolumeCreated(body *CreateResponseBody) *volumesviews.VolumeView
NewCreateVolumeCreated builds a "volumes" service "create" endpoint result from a HTTP "Created" response.
func NewDeleteNotFound ¶
NewDeleteNotFound builds a volumes service delete endpoint not_found error.
func NewGetNotFound ¶
NewGetNotFound builds a volumes service get endpoint not_found error.
func NewGetVolumeOK ¶
func NewGetVolumeOK(body *GetResponseBody) *volumesviews.VolumeView
NewGetVolumeOK builds a "volumes" service "get" endpoint result from a HTTP "OK" response.
func NewListVolumeOK ¶
func NewListVolumeOK(body []*VolumeResponse) []*volumes.Volume
NewListVolumeOK builds a "volumes" service "list" endpoint result from a HTTP "OK" response.
func ValidateVolumeResponse ¶
func ValidateVolumeResponse(body *VolumeResponse) (err error)
ValidateVolumeResponse runs the validations defined on VolumeResponse
Types ¶
type Client ¶
type Client struct {
// List Doer is the HTTP client used to make requests to the list endpoint.
ListDoer goahttp.Doer
// Get Doer is the HTTP client used to make requests to the get endpoint.
GetDoer goahttp.Doer
// Create Doer is the HTTP client used to make requests to the create endpoint.
CreateDoer goahttp.Doer
// Delete Doer is the HTTP client used to make requests to the delete endpoint.
DeleteDoer goahttp.Doer
// RestoreResponseBody controls whether the response bodies are reset after
// decoding so they can be read again.
RestoreResponseBody bool
// contains filtered or unexported fields
}
Client lists the volumes service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the volumes service servers.
func (*Client) BuildCreateRequest ¶
BuildCreateRequest instantiates a HTTP request object with method and path set to call the "volumes" service "create" endpoint
func (*Client) BuildDeleteRequest ¶
BuildDeleteRequest instantiates a HTTP request object with method and path set to call the "volumes" service "delete" endpoint
func (*Client) BuildGetRequest ¶
BuildGetRequest instantiates a HTTP request object with method and path set to call the "volumes" service "get" endpoint
func (*Client) BuildListRequest ¶
BuildListRequest instantiates a HTTP request object with method and path set to call the "volumes" service "list" endpoint
func (*Client) Create ¶
Create returns an endpoint that makes HTTP requests to the volumes service create server.
func (*Client) Delete ¶
Delete returns an endpoint that makes HTTP requests to the volumes service delete server.
type CreateRequestBody ¶
type CreateRequestBody struct {
// PVC name
Name string `form:"name" json:"name" xml:"name"`
// Target namespace
Namespace string `form:"namespace" json:"namespace" xml:"namespace"`
// Storage size
Size string `form:"size" json:"size" xml:"size"`
// Storage class name
StorageClass *string `form:"storage_class,omitempty" json:"storage_class,omitempty" xml:"storage_class,omitempty"`
// Access mode
AccessMode string `form:"access_mode" json:"access_mode" xml:"access_mode"`
}
CreateRequestBody is the type of the "volumes" service "create" endpoint HTTP request body.
func NewCreateRequestBody ¶
func NewCreateRequestBody(p *volumes.CreateVolumePayload) *CreateRequestBody
NewCreateRequestBody builds the HTTP request body from the payload of the "create" endpoint of the "volumes" service.
type CreateResponseBody ¶
type CreateResponseBody struct {
// PVC name
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// Storage size
Size *string `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
// Storage class
StorageClass *string `form:"storage_class,omitempty" json:"storage_class,omitempty" xml:"storage_class,omitempty"`
// Access mode
AccessMode *string `form:"access_mode,omitempty" json:"access_mode,omitempty" xml:"access_mode,omitempty"`
// PVC phase (Bound, Pending, etc.)
Phase *string `form:"phase,omitempty" json:"phase,omitempty" xml:"phase,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
// Kubernetes labels on the PVC
Labels map[string]string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}
CreateResponseBody is the type of the "volumes" service "create" endpoint HTTP response body.
type GetResponseBody ¶
type GetResponseBody struct {
// PVC name
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// Storage size
Size *string `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
// Storage class
StorageClass *string `form:"storage_class,omitempty" json:"storage_class,omitempty" xml:"storage_class,omitempty"`
// Access mode
AccessMode *string `form:"access_mode,omitempty" json:"access_mode,omitempty" xml:"access_mode,omitempty"`
// PVC phase (Bound, Pending, etc.)
Phase *string `form:"phase,omitempty" json:"phase,omitempty" xml:"phase,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
// Kubernetes labels on the PVC
Labels map[string]string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}
GetResponseBody is the type of the "volumes" service "get" endpoint HTTP response body.
type VolumeResponse ¶
type VolumeResponse struct {
// PVC name
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// Storage size
Size *string `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
// Storage class
StorageClass *string `form:"storage_class,omitempty" json:"storage_class,omitempty" xml:"storage_class,omitempty"`
// Access mode
AccessMode *string `form:"access_mode,omitempty" json:"access_mode,omitempty" xml:"access_mode,omitempty"`
// PVC phase (Bound, Pending, etc.)
Phase *string `form:"phase,omitempty" json:"phase,omitempty" xml:"phase,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
// Kubernetes labels on the PVC
Labels map[string]string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}
VolumeResponse is used to define fields on response body types.