api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionSpec

type EncryptionSpec struct {
	Type                EncryptionType `json:"type"`
	EncryptedPassphrase []byte         `json:"encryptedPassphrase"`
}

type EncryptionState

type EncryptionState string
const (
	EncryptionStateHeaderSet EncryptionState = "EncryptionHeaderSet"
)

type EncryptionType

type EncryptionType string
const (
	EncryptionTypeEncrypted   EncryptionType = "Encrypted"
	EncryptionTypeUnencrypted EncryptionType = "Unencrypted"
)

type Image

type Image struct {
	Metadata `json:"metadata,omitempty"`

	Spec   ImageSpec   `json:"spec"`
	Status ImageStatus `json:"status"`
}

type ImageAccess

type ImageAccess struct {
	Monitors string `json:"monitors"`
	Handle   string `json:"handle"`

	User    string `json:"user"`
	UserKey string `json:"userKey"`
}

type ImageSpec

type ImageSpec struct {
	Size        uint64         `json:"size"`
	WWN         string         `json:"wwn"`
	Limits      Limits         `json:"limits"`
	Image       string         `json:"image"`
	SnapshotRef *string        `json:"snapshotRef"`
	Encryption  EncryptionSpec `json:"encryption"`
}

type ImageState

type ImageState string
const (
	ImageStatePending   ImageState = "Pending"
	ImageStateAvailable ImageState = "Available"
)

type ImageStatus

type ImageStatus struct {
	State      ImageState      `json:"state"`
	Encryption EncryptionState `json:"encryption"`
	Access     *ImageAccess    `json:"access"`
}

type LimitType

type LimitType string
const (
	IOPSlLimit                  LimitType = "rbd_qos_iops_limit"
	IOPSBurstLimit              LimitType = "rbd_qos_iops_burst"
	IOPSBurstDurationLimit      LimitType = "rbd_qos_iops_burst_seconds"
	ReadIOPSLimit               LimitType = "rbd_qos_read_iops_limit"
	ReadIOPSBurstLimit          LimitType = "rbd_qos_read_iops_burst"
	ReadIOPSBurstDurationLimit  LimitType = "rbd_qos_read_iops_burst_seconds"
	WriteIOPSLimit              LimitType = "rbd_qos_write_iops_limit"
	WriteIOPSBurstLimit         LimitType = "rbd_qos_write_iops_burst"
	WriteIOPSBurstDurationLimit LimitType = "rbd_qos_write_iops_burst_seconds"
	BPSLimit                    LimitType = "rbd_qos_bps_limit"
	BPSBurstLimit               LimitType = "rbd_qos_bps_burst"
	BPSBurstDurationLimit       LimitType = "rbd_qos_bps_burst_seconds"
	ReadBPSLimit                LimitType = "rbd_qos_read_bps_limit"
	ReadBPSBurstLimit           LimitType = "rbd_qos_read_bps_burst"
	ReadBPSBurstDurationLimit   LimitType = "rbd_qos_read_bps_burst_seconds"
	WriteBPSLimit               LimitType = "rbd_qos_write_bps_limit"
	WriteBPSBurstLimit          LimitType = "rbd_qos_write_bps_burst"
	WriteBPSBurstDurationLimit  LimitType = "rbd_qos_write_bps_burst_seconds"
)

type Limits

type Limits map[LimitType]int64

type Metadata

type Metadata struct {
	ID          string            `json:"id"`
	Annotations map[string]string `json:"annotations"`
	Labels      map[string]string `json:"labels"`

	CreatedAt  time.Time  `json:"createdAt"`
	DeletedAt  *time.Time `json:"deletedAt,omitempty"`
	Generation int64      `json:"generation"`

	Finalizers []string `json:"finalizers,omitempty"`
}

func (*Metadata) GetAnnotations

func (m *Metadata) GetAnnotations() map[string]string

func (*Metadata) GetCreatedAt

func (m *Metadata) GetCreatedAt() time.Time

func (*Metadata) GetDeletedAt

func (m *Metadata) GetDeletedAt() *time.Time

func (*Metadata) GetFinalizers

func (m *Metadata) GetFinalizers() []string

func (*Metadata) GetGeneration

func (m *Metadata) GetGeneration() int64

func (*Metadata) GetID

func (m *Metadata) GetID() string

func (*Metadata) GetLabels

func (m *Metadata) GetLabels() map[string]string

func (*Metadata) SetAnnotations

func (m *Metadata) SetAnnotations(annotations map[string]string)

func (*Metadata) SetCreatedAt

func (m *Metadata) SetCreatedAt(createdAt time.Time)

func (*Metadata) SetDeletedAt

func (m *Metadata) SetDeletedAt(deleted *time.Time)

func (*Metadata) SetFinalizers

func (m *Metadata) SetFinalizers(finalizers []string)

func (*Metadata) SetGeneration

func (m *Metadata) SetGeneration(generation int64)

func (*Metadata) SetID

func (m *Metadata) SetID(id string)

func (*Metadata) SetLabels

func (m *Metadata) SetLabels(labels map[string]string)

type Object

type Object interface {
	GetID() string
	GetAnnotations() map[string]string
	GetLabels() map[string]string
	GetCreatedAt() time.Time
	GetDeletedAt() *time.Time
	GetGeneration() int64
	GetFinalizers() []string

	SetID(id string)
	SetAnnotations(annotations map[string]string)
	SetLabels(labels map[string]string)
	SetCreatedAt(createdAt time.Time)
	SetDeletedAt(deleted *time.Time)
	SetGeneration(generation int64)
	SetFinalizers(finalizers []string)
}

type Snapshot

type Snapshot struct {
	Metadata `json:"metadata,omitempty"`

	Source SnapshotSource `json:"source"`

	Status SnapshotStatus `json:"status"`
}

type SnapshotSource

type SnapshotSource struct {
	OnmetalImage string `json:"onmetalImage"`
}

type SnapshotState

type SnapshotState string
const (
	SnapshotStatePending   SnapshotState = "Pending"
	SnapshotStatePopulated SnapshotState = "Populated"
)

type SnapshotStatus

type SnapshotStatus struct {
	State  SnapshotState `json:"state"`
	Digest string        `json:"digest"`
}

Jump to

Keyboard shortcuts

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