image

package
v1.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedImageFetch = goerrors.New("image fetch failed")
View Source
var ErrInvalidMasterBootRecord = errors.New("invalid master boot record")
View Source
var ErrInvalidQCOW2 = errors.New("invalid QCOW2 image")
View Source
var ErrProviderResource = goerrors.New("conflict with resource at provider")
View Source
var ErrUnknownDiskFormat = errors.New("unknown image format")

Functions

func NewMasterBootRecordReader added in v1.12.0

func NewMasterBootRecordReader(r io.Reader) (io.Reader, error)

func NewQCOW2Reader added in v1.12.0

func NewQCOW2Reader(r io.Reader) (io.Reader, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client client.Client, namespace string, getProvider GetProviderFunc) *Client

func (*Client) CreateImage added in v1.12.0

func (c *Client) CreateImage(ctx context.Context, organizationID, regionID string, request *openapi.ImageCreateRequest) (*openapi.ImageResponse, error)

func (*Client) DeleteImage added in v1.12.0

func (c *Client) DeleteImage(ctx context.Context, organizationID, regionID, imageID string) error

func (*Client) ListActiveImages added in v1.12.0

func (c *Client) ListActiveImages(ctx context.Context, organizationID, regionID string) (openapi.Images, error)

func (*Client) ListAllImages added in v1.12.0

func (c *Client) ListAllImages(ctx context.Context, organizationID, regionID string) (openapi.Images, error)

type GetProviderFunc added in v1.12.0

type GetProviderFunc func(context.Context, client.Client, string, string) (Provider, error)

type Provider added in v1.12.0

type Provider interface {
	types.ImageRead
	types.ImageWrite
}

func DefaultGetProvider added in v1.12.0

func DefaultGetProvider(ctx context.Context, c client.Client, namespace, regionID string) (Provider, error)

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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