Documentation ¶
Index ¶
- func SetInstance(i Ops)
- type Client
- func (c *Client) CreateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
- func (c *Client) CreateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
- func (c *Client) CreateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
- func (c *Client) DeleteSnapshot(name string, namespace string) error
- func (c *Client) DeleteSnapshotClass(name string) error
- func (c *Client) DeleteSnapshotContent(name string) error
- func (c *Client) GetSnapshot(name string, namespace string) (*v1beta1.VolumeSnapshot, error)
- func (c *Client) GetSnapshotClass(name string) (*v1beta1.VolumeSnapshotClass, error)
- func (c *Client) GetSnapshotContent(name string) (*v1beta1.VolumeSnapshotContent, error)
- func (c *Client) ListSnapshotClasses() (*v1beta1.VolumeSnapshotClassList, error)
- func (c *Client) ListSnapshotContents() (*v1beta1.VolumeSnapshotContentList, error)
- func (c *Client) ListSnapshots(namespace string) (*v1beta1.VolumeSnapshotList, error)
- func (c *Client) SetConfig(cfg *rest.Config)
- func (c *Client) UpdateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
- func (c *Client) UpdateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
- func (c *Client) UpdateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
- type Ops
- type SnapshotClassOps
- type SnapshotContentOps
- type SnapshotOps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶
func SetInstance(i Ops)
SetInstance replaces the instance with the provided one. Should be used only for testing purposes.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the external-storage client.
func New ¶
func New(client v1beta1.SnapshotV1beta1Interface) *Client
New builds a new client for the given config.
func NewForConfig ¶
NewForConfig builds a new client for the given config.
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
CreateSnapshot creates the given snapshot.
func (*Client) CreateSnapshotClass ¶
func (c *Client) CreateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
CreateSnapshotClass creates the given snapshot class.
func (*Client) CreateSnapshotContent ¶
func (c *Client) CreateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
CreateSnapshotContent creates the given snapshot content.
func (*Client) DeleteSnapshot ¶
DeleteSnapshot deletes the given snapshot
func (*Client) DeleteSnapshotClass ¶
DeleteSnapshotClass deletes the given snapshot
func (*Client) DeleteSnapshotContent ¶
DeleteSnapshotContent deletes the given snapshot content
func (*Client) GetSnapshot ¶
GetSnapshot returns the snapshot for given name and namespace
func (*Client) GetSnapshotClass ¶
func (c *Client) GetSnapshotClass(name string) (*v1beta1.VolumeSnapshotClass, error)
GetSnapshotClass returns the snapshot class for given name
func (*Client) GetSnapshotContent ¶
func (c *Client) GetSnapshotContent(name string) (*v1beta1.VolumeSnapshotContent, error)
GetSnapshotContent returns the snapshot content for given name
func (*Client) ListSnapshotClasses ¶
func (c *Client) ListSnapshotClasses() (*v1beta1.VolumeSnapshotClassList, error)
ListSnapshotClasses lists all snapshot classes
func (*Client) ListSnapshotContents ¶
func (c *Client) ListSnapshotContents() (*v1beta1.VolumeSnapshotContentList, error)
ListSnapshotContents lists all snapshot contents
func (*Client) ListSnapshots ¶
func (c *Client) ListSnapshots(namespace string) (*v1beta1.VolumeSnapshotList, error)
ListSnapshots lists all snapshots in the given namespace
func (*Client) UpdateSnapshot ¶
func (c *Client) UpdateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
UpdateSnapshot updates the given snapshot
func (*Client) UpdateSnapshotClass ¶
func (c *Client) UpdateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
UpdateSnapshotClass updates the given snapshot class
func (*Client) UpdateSnapshotContent ¶
func (c *Client) UpdateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
UpdateSnapshotContent updates the given snapshot content
type Ops ¶
type Ops interface { SnapshotOps SnapshotContentOps SnapshotClassOps // SetConfig sets the config and resets the client SetConfig(config *rest.Config) }
Ops is an interface to perform operations on external storage resources.
func NewInstanceFromConfigFile ¶
NewInstanceFromConfigFile returns new instance of client by using given config file
type SnapshotClassOps ¶
type SnapshotClassOps interface { // CreateSnapshotClass creates the given snapshot class CreateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error) // GetSnapshotClass returns the snapshot class for given name GetSnapshotClass(name string) (*v1beta1.VolumeSnapshotClass, error) // ListSnapshotClasses lists all snapshot classes ListSnapshotClasses() (*v1beta1.VolumeSnapshotClassList, error) // UpdateSnapshotClass updates the given snapshot class UpdateSnapshotClass(snap *v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error) // DeleteSnapshotClass deletes the given snapshot class DeleteSnapshotClass(name string) error }
SnapshotClassOps is an interface to perform k8s VolumeSnapshotClass operations
type SnapshotContentOps ¶
type SnapshotContentOps interface { // CreateSnapshotContent creates the given snapshot content CreateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error) // GetSnapshotContent returns the snapshot content for given name GetSnapshotContent(name string) (*v1beta1.VolumeSnapshotContent, error) // ListSnapshotContents lists all snapshot contents ListSnapshotContents() (*v1beta1.VolumeSnapshotContentList, error) // UpdateSnapshotContent updates the given snapshot content UpdateSnapshotContent(snap *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error) // DeleteSnapshotContent deletes the given snapshot content DeleteSnapshotContent(name string) error }
SnapshotContentOps is an interface to perform k8s VolumeSnapshotContent operations
type SnapshotOps ¶
type SnapshotOps interface { // CreateSnapshot creates the given snapshot CreateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) // GetSnapshot returns the snapshot for given name and namespace GetSnapshot(name string, namespace string) (*v1beta1.VolumeSnapshot, error) // ListSnapshots lists all snapshots in the given namespace ListSnapshots(namespace string) (*v1beta1.VolumeSnapshotList, error) // UpdateSnapshot updates the given snapshot UpdateSnapshot(snap *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) // DeleteSnapshot deletes the given snapshot DeleteSnapshot(name string, namespace string) error }
SnapshotOps is an interface to perform k8s VolumeSnapshot operations