Documentation ¶
Index ¶
- Constants
- Variables
- func NewCreateEndpoint(s Service) goa.Endpoint
- func NewDeleteEndpoint(s Service) goa.Endpoint
- func NewGetEndpoint(s Service) goa.Endpoint
- func NewUpdateEndpoint(s Service) goa.Endpoint
- func NewViewedRestoreresult(res *Restoreresult, view string) *restoreserviceviews.Restoreresult
- type BackupNotFound
- type Client
- func (c *Client) Create(ctx context.Context, p *Restore) (res *Restoreresult, err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (res *Restoreresult, err error)
- func (c *Client) Get(ctx context.Context, p *GetPayload) (res *Restoreresult, err error)
- func (c *Client) Update(ctx context.Context, p *Restoreresult) (res *Restoreresult, err error)
- type DeletePayload
- type Endpoints
- type GetPayload
- type Restore
- type Restoreresult
- type Service
Constants ¶
const ServiceName = "Restore Service"
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{"create", "get", "update", "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 NewCreateEndpoint ¶
NewCreateEndpoint returns an endpoint function that calls the method "create" of service "Restore Service".
func NewDeleteEndpoint ¶
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "Restore Service".
func NewGetEndpoint ¶
NewGetEndpoint returns an endpoint function that calls the method "get" of service "Restore Service".
func NewUpdateEndpoint ¶
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "Restore Service".
func NewViewedRestoreresult ¶
func NewViewedRestoreresult(res *Restoreresult, view string) *restoreserviceviews.Restoreresult
NewViewedRestoreresult initializes viewed result type Restoreresult from result type Restoreresult using the given view.
Types ¶
type BackupNotFound ¶
type BackupNotFound struct { // backup resource not found Message string }
Backup not found error is returned when the backup is not found.
func (*BackupNotFound) Error ¶
func (e *BackupNotFound) Error() string
Error returns an error description.
func (*BackupNotFound) ErrorName ¶
func (e *BackupNotFound) ErrorName() string
ErrorName returns "BackupNotFound".
type Client ¶
type Client struct { CreateEndpoint goa.Endpoint GetEndpoint goa.Endpoint UpdateEndpoint goa.Endpoint DeleteEndpoint goa.Endpoint }
Client is the "Restore Service" service client.
func (*Client) Create ¶
Create calls the "create" endpoint of the "Restore Service" service. Create may return the following errors:
- "backup_not_found" (type *BackupNotFound): backup not found
- error: internal error
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (res *Restoreresult, err error)
Delete calls the "delete" endpoint of the "Restore Service" service.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, p *GetPayload) (res *Restoreresult, err error)
Get calls the "get" endpoint of the "Restore Service" service.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, p *Restoreresult) (res *Restoreresult, err error)
Update calls the "update" endpoint of the "Restore Service" service.
type DeletePayload ¶
type DeletePayload struct {
ID *string
}
DeletePayload is the payload type of the Restore Service service delete method.
type Endpoints ¶
type Endpoints struct { Create goa.Endpoint Get goa.Endpoint Update goa.Endpoint Delete goa.Endpoint }
Endpoints wraps the "Restore Service" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "Restore Service" service with endpoints.
type GetPayload ¶
type GetPayload struct {
ID *string
}
GetPayload is the payload type of the Restore Service service get method.
type Restore ¶
type Restore struct { // Name of pachyderm instance to restore to Name *string // Namespace to restore to Namespace *string // Kubernetes secret containing S3 storage credentials StorageSecret *string // Key of backup tarball BackupLocation *string }
Restore is the payload type of the Restore Service service create method.
type Restoreresult ¶
type Restoreresult struct { CreatedAt *string UpdatedAt *string DeletedAt *string ID *string // Name of pachyderm instance to restore to Name *string // Namespace to restore to Namespace *string // Key of backup tarball BackupLocation *string // Kubernetes secret containing S3 storage credentials StorageSecret *string // base64 encoded kubernetes object KubernetesResource *string // base64 encoded database dump Database *string }
Restoreresult is the result type of the Restore Service service create method.
func NewRestoreresult ¶
func NewRestoreresult(vres *restoreserviceviews.Restoreresult) *Restoreresult
NewRestoreresult initializes result type Restoreresult from viewed result type Restoreresult.
type Service ¶
type Service interface { // New restore request Create(context.Context, *Restore) (res *Restoreresult, err error) // Get restore request Get(context.Context, *GetPayload) (res *Restoreresult, err error) // Update restore request Update(context.Context, *Restoreresult) (res *Restoreresult, err error) // Mark complete restore request Delete(context.Context, *DeletePayload) (res *Restoreresult, err error) }
Service to handle restore requests