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 NewViewedBackupresult(res *Backupresult, view string) *backupserviceviews.Backupresult
- type Backup
- type BackupNotFound
- type Backupresult
- type Client
- func (c *Client) Create(ctx context.Context, p *Backup) (res *Backupresult, err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (res *Backupresult, err error)
- func (c *Client) Get(ctx context.Context, p *GetPayload) (res *Backupresult, err error)
- func (c *Client) Update(ctx context.Context, p *Backupresult) (res *Backupresult, err error)
- type DeletePayload
- type Endpoints
- type GetPayload
- type Service
Constants ¶
const ServiceName = "Backup 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 "Backup Service".
func NewDeleteEndpoint ¶
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "Backup Service".
func NewGetEndpoint ¶
NewGetEndpoint returns an endpoint function that calls the method "get" of service "Backup Service".
func NewUpdateEndpoint ¶
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "Backup Service".
func NewViewedBackupresult ¶
func NewViewedBackupresult(res *Backupresult, view string) *backupserviceviews.Backupresult
NewViewedBackupresult initializes viewed result type Backupresult from result type Backupresult using the given view.
Types ¶
type Backup ¶
type Backup struct {
// Name of pachyderm instance backed up
Name *string
// Namespace of resource backed up
Namespace *string
// Name of target pod
Pod *string
// Name of container in pod
Container *string
// base64 encoded command to run in pod
Command *string
// Kubernetes secret containing S3 storage credentials
StorageSecret *string
// base64 encoded json representation of object
KubernetesResource *string
}
Backup is the payload type of the Backup Service service create method.
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 Backupresult ¶
type Backupresult struct {
CreatedAt *string
UpdatedAt *string
DeletedAt *string
ID *string
// Current state of the job
State *string
// Name of pachyderm instance backed up
Name *string
// Namespace of resource backed up
Namespace *string
// Name of target pod
Pod *string
// Name of container in pod
Container *string
// base64 encoded command to run in pod
Command *string
// Kubernetes secret containing S3 storage credentials
StorageSecret *string
// base64 encoded json representation of object
KubernetesResource *string
// URL of the uploaded backup tarball
Location *string
}
Backupresult is the result type of the Backup Service service create method.
func NewBackupresult ¶
func NewBackupresult(vres *backupserviceviews.Backupresult) *Backupresult
NewBackupresult initializes result type Backupresult from viewed result type Backupresult.
type Client ¶
type Client struct {
CreateEndpoint goa.Endpoint
GetEndpoint goa.Endpoint
UpdateEndpoint goa.Endpoint
DeleteEndpoint goa.Endpoint
}
Client is the "Backup Service" service client.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (res *Backupresult, err error)
Delete calls the "delete" endpoint of the "Backup Service" service. Delete may return the following errors:
- "backup_not_found" (type *BackupNotFound): backup not found
- error: internal error
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, p *GetPayload) (res *Backupresult, err error)
Get calls the "get" endpoint of the "Backup Service" service. Get may return the following errors:
- "backup_not_found" (type *BackupNotFound): backup not found
- error: internal error
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, p *Backupresult) (res *Backupresult, err error)
Update calls the "update" endpoint of the "Backup Service" service. Update may return the following errors:
- "backup_not_found" (type *BackupNotFound): backup not found
- error: internal error
type DeletePayload ¶
type DeletePayload struct {
ID *string
}
DeletePayload is the payload type of the Backup Service service delete method.
type Endpoints ¶
type Endpoints struct {
Create goa.Endpoint
Get goa.Endpoint
Update goa.Endpoint
Delete goa.Endpoint
}
Endpoints wraps the "Backup Service" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "Backup Service" service with endpoints.
type GetPayload ¶
type GetPayload struct {
ID *string
}
GetPayload is the payload type of the Backup Service service get method.
type Service ¶
type Service interface {
// New backup request
Create(context.Context, *Backup) (res *Backupresult, err error)
// Obtain backup request
Get(context.Context, *GetPayload) (res *Backupresult, err error)
// Update backup request
Update(context.Context, *Backupresult) (res *Backupresult, err error)
// Mark complete backup request
Delete(context.Context, *DeletePayload) (res *Backupresult, err error)
}
Service to handle backup requests