client

package
v0.0.0-...-3febccf Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreatePayload

func BuildCreatePayload(restoreServiceCreateBody string) (*restoreservice.Restore, error)

BuildCreatePayload builds the payload for the Restore Service create endpoint from CLI flags.

func BuildDeletePayload

func BuildDeletePayload(restoreServiceDeleteID string) (*restoreservice.DeletePayload, error)

BuildDeletePayload builds the payload for the Restore Service delete endpoint from CLI flags.

func BuildGetPayload

func BuildGetPayload(restoreServiceGetID string) (*restoreservice.GetPayload, error)

BuildGetPayload builds the payload for the Restore Service get endpoint from CLI flags.

func BuildUpdatePayload

func BuildUpdatePayload(restoreServiceUpdateBody string) (*restoreservice.Restoreresult, error)

BuildUpdatePayload builds the payload for the Restore Service update endpoint from CLI flags.

func CreateRestoreServicePath

func CreateRestoreServicePath() string

CreateRestoreServicePath returns the URL path to the Restore Service service create HTTP endpoint.

func DecodeCreateResponse

func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeCreateResponse returns a decoder for responses returned by the Restore Service create endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeCreateResponse may return the following errors:

  • "backup_not_found" (type *restoreservice.BackupNotFound): http.StatusNotFound
  • error: internal error

func DecodeDeleteResponse

func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeDeleteResponse returns a decoder for responses returned by the Restore Service delete endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeGetResponse

func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeGetResponse returns a decoder for responses returned by the Restore Service get endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeUpdateResponse

func DecodeUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeUpdateResponse returns a decoder for responses returned by the Restore Service update endpoint. restoreBody controls whether the response body should be restored after having been read.

func DeleteRestoreServicePath

func DeleteRestoreServicePath(id string) string

DeleteRestoreServicePath returns the URL path to the Restore Service service delete HTTP endpoint.

func EncodeCreateRequest

func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeCreateRequest returns an encoder for requests sent to the Restore Service create server.

func EncodeUpdateRequest

func EncodeUpdateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeUpdateRequest returns an encoder for requests sent to the Restore Service update server.

func GetRestoreServicePath

func GetRestoreServicePath(id string) string

GetRestoreServicePath returns the URL path to the Restore Service service get HTTP endpoint.

func NewCreateBackupNotFound

func NewCreateBackupNotFound(body *CreateBackupNotFoundResponseBody) *restoreservice.BackupNotFound

NewCreateBackupNotFound builds a Restore Service service create endpoint backup_not_found error.

func NewCreateRestoreresultOK

func NewCreateRestoreresultOK(body *CreateResponseBody) *restoreserviceviews.RestoreresultView

NewCreateRestoreresultOK builds a "Restore Service" service "create" endpoint result from a HTTP "OK" response.

func NewDeleteRestoreresultOK

func NewDeleteRestoreresultOK(body *DeleteResponseBody) *restoreserviceviews.RestoreresultView

NewDeleteRestoreresultOK builds a "Restore Service" service "delete" endpoint result from a HTTP "OK" response.

func NewGetRestoreresultOK

func NewGetRestoreresultOK(body *GetResponseBody) *restoreserviceviews.RestoreresultView

NewGetRestoreresultOK builds a "Restore Service" service "get" endpoint result from a HTTP "OK" response.

func NewUpdateRestoreresultOK

func NewUpdateRestoreresultOK(body *UpdateResponseBody) *restoreserviceviews.RestoreresultView

NewUpdateRestoreresultOK builds a "Restore Service" service "update" endpoint result from a HTTP "OK" response.

func UpdateRestoreServicePath

func UpdateRestoreServicePath() string

UpdateRestoreServicePath returns the URL path to the Restore Service service update HTTP endpoint.

func ValidateCreateBackupNotFoundResponseBody

func ValidateCreateBackupNotFoundResponseBody(body *CreateBackupNotFoundResponseBody) (err error)

ValidateCreateBackupNotFoundResponseBody runs the validations defined on create_backup_not_found_response_body

Types

type Client

type Client struct {
	// Create Doer is the HTTP client used to make requests to the create endpoint.
	CreateDoer goahttp.Doer

	// Get Doer is the HTTP client used to make requests to the get endpoint.
	GetDoer goahttp.Doer

	// Update Doer is the HTTP client used to make requests to the update endpoint.
	UpdateDoer 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 Restore Service 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 Restore Service service servers.

func (*Client) BuildCreateRequest

func (c *Client) BuildCreateRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildCreateRequest instantiates a HTTP request object with method and path set to call the "Restore Service" service "create" endpoint

func (*Client) BuildDeleteRequest

func (c *Client) BuildDeleteRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildDeleteRequest instantiates a HTTP request object with method and path set to call the "Restore Service" service "delete" endpoint

func (*Client) BuildGetRequest

func (c *Client) BuildGetRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildGetRequest instantiates a HTTP request object with method and path set to call the "Restore Service" service "get" endpoint

func (*Client) BuildUpdateRequest

func (c *Client) BuildUpdateRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildUpdateRequest instantiates a HTTP request object with method and path set to call the "Restore Service" service "update" endpoint

func (*Client) Create

func (c *Client) Create() goa.Endpoint

Create returns an endpoint that makes HTTP requests to the Restore Service service create server.

func (*Client) Delete

func (c *Client) Delete() goa.Endpoint

Delete returns an endpoint that makes HTTP requests to the Restore Service service delete server.

func (*Client) Get

func (c *Client) Get() goa.Endpoint

Get returns an endpoint that makes HTTP requests to the Restore Service service get server.

func (*Client) Update

func (c *Client) Update() goa.Endpoint

Update returns an endpoint that makes HTTP requests to the Restore Service service update server.

type CreateBackupNotFoundResponseBody

type CreateBackupNotFoundResponseBody struct {
	// backup resource not found
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
}

CreateBackupNotFoundResponseBody is the type of the "Restore Service" service "create" endpoint HTTP response body for the "backup_not_found" error.

type CreateRequestBody

type CreateRequestBody struct {
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
}

CreateRequestBody is the type of the "Restore Service" service "create" endpoint HTTP request body.

func NewCreateRequestBody

func NewCreateRequestBody(p *restoreservice.Restore) *CreateRequestBody

NewCreateRequestBody builds the HTTP request body from the payload of the "create" endpoint of the "Restore Service" service.

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"`
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// base64 encoded kubernetes object
	KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"`
	// base64 encoded database dump
	Database *string `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
}

CreateResponseBody is the type of the "Restore Service" service "create" endpoint HTTP response body.

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"`
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// base64 encoded kubernetes object
	KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"`
	// base64 encoded database dump
	Database *string `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
}

DeleteResponseBody is the type of the "Restore Service" service "delete" endpoint HTTP response body.

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"`
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// base64 encoded kubernetes object
	KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"`
	// base64 encoded database dump
	Database *string `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
}

GetResponseBody is the type of the "Restore Service" service "get" endpoint HTTP response body.

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"`
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// base64 encoded kubernetes object
	KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"`
	// base64 encoded database dump
	Database *string `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
}

UpdateRequestBody is the type of the "Restore Service" service "update" endpoint HTTP request body.

func NewUpdateRequestBody

func NewUpdateRequestBody(p *restoreservice.Restoreresult) *UpdateRequestBody

NewUpdateRequestBody builds the HTTP request body from the payload of the "update" endpoint of the "Restore Service" service.

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"`
	// Name of pachyderm instance to restore to
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace to restore to
	Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
	// Key of backup tarball
	BackupLocation *string `form:"backup_location,omitempty" json:"backup_location,omitempty" xml:"backup_location,omitempty"`
	// Kubernetes secret containing S3 storage credentials
	StorageSecret *string `form:"storage_secret,omitempty" json:"storage_secret,omitempty" xml:"storage_secret,omitempty"`
	// base64 encoded kubernetes object
	KubernetesResource *string `form:"kubernetes_resource,omitempty" json:"kubernetes_resource,omitempty" xml:"kubernetes_resource,omitempty"`
	// base64 encoded database dump
	Database *string `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
}

UpdateResponseBody is the type of the "Restore Service" service "update" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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