storage

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

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

func (c *Client) Delete(ctx context.Context, storageID string) error

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) Get

func (c *Client) Get(ctx context.Context, storageID string) (*openapi.StorageV2Read, error)

Get returns a storage object for a specific storageID.

func (*Client) GetRaw

func (c *Client) GetRaw(ctx context.Context, storageID string) (*regionv1.FileStorage, error)

func (*Client) GetStorageClass

func (c *Client) GetStorageClass(ctx context.Context, storageClassID string) (*openapi.StorageClassV2Read, error)

func (*Client) ListV2

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.

type Driver added in v1.13.0

type Driver interface {
	GetDetails(ctx context.Context, projectID string, fileStorageID string) (*types.FileStorageDetails, error)
}

Jump to

Keyboard shortcuts

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