Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateV2(ctx context.Context, request *openapi.StorageV2Create) (*openapi.StorageV2Read, error)
- func (c *Client) Delete(ctx context.Context, storageID string) error
- func (c *Client) Get(ctx context.Context, storageID string) (*openapi.StorageV2Read, error)
- func (c *Client) GetRaw(ctx context.Context, storageID string) (*regionv1.FileStorage, error)
- func (c *Client) GetStorageClass(ctx context.Context, storageClassID string) (*openapi.StorageClassV2Read, error)
- func (c *Client) ListClasses(ctx context.Context, params openapi.GetApiV2FilestorageclassesParams) (openapi.StorageClassListV2Read, error)
- func (c *Client) ListV2(ctx context.Context, params openapi.GetApiV2FilestorageParams) (openapi.StorageV2List, error)
- func (c *Client) Update(ctx context.Context, storageID string, request *openapi.StorageV2Update) (*openapi.StorageV2Read, error)
- type Driver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// GetFileStorageDriverFunc is used for test mocking to be able
// to abstract the Filestorage Driver
GetFileStorageDriverFunc func(ctx context.Context, storageClassID string) (Driver, error)
// contains filtered or unexported fields
}
Client provides a restful API for storage.
func New ¶
func New(client client.Client, namespace string, identity identityapi.ClientWithResponsesInterface) *Client
New creates a new client.
func (*Client) CreateV2 ¶
func (c *Client) CreateV2(ctx context.Context, request *openapi.StorageV2Create) (*openapi.StorageV2Read, error)
CreateV2 satisifies an http PUT action by creating a unique storage object. It does this leveraging the saga system which acts as a tape to enable rollbacks in case of errors.
func (*Client) Delete ¶
Delete satisfies the http DELETE action by removing the client. It does not leverage the saga system because we can rely on finalizers to handle this for us.
func (*Client) GetStorageClass ¶
func (*Client) ListClasses ¶
func (c *Client) ListClasses(ctx context.Context, params openapi.GetApiV2FilestorageclassesParams) (openapi.StorageClassListV2Read, error)
func (*Client) ListV2 ¶
func (c *Client) ListV2(ctx context.Context, params openapi.GetApiV2FilestorageParams) (openapi.StorageV2List, error)
ListV2 satisfies an http get to return all storage items within a project.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, storageID string, request *openapi.StorageV2Update) (*openapi.StorageV2Read, error)
Update satisifies an http POST action by updating the storage object attached to the storage ID. it leverages the update saga system, which acts as a tape to enable rollbacks in case of errors.