cinder

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const GetAllProjectQuotas = `` /* 299-byte string literal not displayed */
View Source
const GetAllServices = `-- name: GetAllServices :many
SELECT
    uuid,
    host,
    ` + "`" + `binary` + "`" + ` as service,
    CASE
        WHEN disabled = 1 THEN 'disabled'
        ELSE 'enabled'
    END as admin_state,
    availability_zone as zone,
    disabled_reason,
    CASE
        WHEN TIMESTAMPDIFF (SECOND, updated_at, NOW()) <= 60 THEN 1
        ELSE 0
    END as state
FROM
    services
WHERE
    deleted = 0
`
View Source
const GetAllVolumes = `` /* 514-byte string literal not displayed */
View Source
const GetProjectQuotaLimits = `` /* 393-byte string literal not displayed */
View Source
const GetSnapshotCount = `-- name: GetSnapshotCount :one
SELECT
    COUNT(*) as count
FROM
    snapshots
WHERE
    deleted = 0
`
View Source
const GetVolumeTypes = `-- name: GetVolumeTypes :many
SELECT
    id,
    name
FROM
    volume_types
WHERE
    deleted = 0
`

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetAllProjectQuotasRow

type GetAllProjectQuotasRow struct {
	ProjectID sql.NullString
	Resource  string
	HardLimit sql.NullInt32
	InUse     int32
}

type GetAllServicesRow

type GetAllServicesRow struct {
	Uuid           sql.NullString
	Host           sql.NullString
	Service        sql.NullString
	AdminState     string
	Zone           sql.NullString
	DisabledReason sql.NullString
	State          int32
}

type GetAllVolumesRow

type GetAllVolumesRow struct {
	ID               string
	Name             sql.NullString
	Size             sql.NullInt32
	Status           sql.NullString
	AvailabilityZone sql.NullString
	Bootable         sql.NullBool
	ProjectID        sql.NullString
	UserID           sql.NullString
	VolumeType       sql.NullString
	ServerID         sql.NullString
}

type GetProjectQuotaLimitsRow

type GetProjectQuotaLimitsRow struct {
	ProjectID sql.NullString
	Resource  string
	HardLimit sql.NullInt32
	InUse     int32
}

type GetVolumeTypesRow

type GetVolumeTypesRow struct {
	ID   string
	Name sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetAllProjectQuotas

func (q *Queries) GetAllProjectQuotas(ctx context.Context) ([]GetAllProjectQuotasRow, error)

func (*Queries) GetAllServices

func (q *Queries) GetAllServices(ctx context.Context) ([]GetAllServicesRow, error)

func (*Queries) GetAllVolumes

func (q *Queries) GetAllVolumes(ctx context.Context) ([]GetAllVolumesRow, error)

func (*Queries) GetProjectQuotaLimits

func (q *Queries) GetProjectQuotaLimits(ctx context.Context) ([]GetProjectQuotaLimitsRow, error)

func (*Queries) GetSnapshotCount

func (q *Queries) GetSnapshotCount(ctx context.Context) (int64, error)

func (*Queries) GetVolumeTypes

func (q *Queries) GetVolumeTypes(ctx context.Context) ([]GetVolumeTypesRow, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Quota

type Quota struct {
	ID        int32
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
	Deleted   sql.NullBool
	ProjectID sql.NullString
	Resource  string
	HardLimit sql.NullInt32
	Allocated sql.NullInt32
}

type QuotaUsage

type QuotaUsage struct {
	CreatedAt     sql.NullTime
	UpdatedAt     sql.NullTime
	DeletedAt     sql.NullTime
	Deleted       sql.NullBool
	ID            int32
	ProjectID     sql.NullString
	Resource      sql.NullString
	InUse         int32
	Reserved      int32
	UntilRefresh  sql.NullInt32
	RacePreventer sql.NullBool
}

type Service

type Service struct {
	CreatedAt            sql.NullTime
	UpdatedAt            sql.NullTime
	DeletedAt            sql.NullTime
	Deleted              sql.NullBool
	ID                   int32
	Host                 sql.NullString
	Binary               sql.NullString
	Topic                sql.NullString
	ReportCount          int32
	Disabled             sql.NullBool
	AvailabilityZone     sql.NullString
	DisabledReason       sql.NullString
	ModifiedAt           sql.NullTime
	RpcCurrentVersion    sql.NullString
	ObjectCurrentVersion sql.NullString
	ReplicationStatus    sql.NullString
	Frozen               sql.NullBool
	ActiveBackendID      sql.NullString
	ClusterName          sql.NullString
	Uuid                 sql.NullString
}

type Snapshot

type Snapshot struct {
	CreatedAt          sql.NullTime
	UpdatedAt          sql.NullTime
	DeletedAt          sql.NullTime
	Deleted            sql.NullBool
	ID                 string
	VolumeID           string
	UserID             sql.NullString
	ProjectID          sql.NullString
	Status             sql.NullString
	Progress           sql.NullString
	VolumeSize         sql.NullInt32
	ScheduledAt        sql.NullTime
	DisplayName        sql.NullString
	DisplayDescription sql.NullString
	ProviderLocation   sql.NullString
	EncryptionKeyID    sql.NullString
	VolumeTypeID       string
	CgsnapshotID       sql.NullString
	ProviderID         sql.NullString
	ProviderAuth       sql.NullString
	GroupSnapshotID    sql.NullString
	UseQuota           bool
}

type Volume

type Volume struct {
	CreatedAt                 sql.NullTime
	UpdatedAt                 sql.NullTime
	DeletedAt                 sql.NullTime
	Deleted                   sql.NullBool
	ID                        string
	Ec2ID                     sql.NullString
	UserID                    sql.NullString
	ProjectID                 sql.NullString
	Host                      sql.NullString
	Size                      sql.NullInt32
	AvailabilityZone          sql.NullString
	Status                    sql.NullString
	AttachStatus              sql.NullString
	ScheduledAt               sql.NullTime
	LaunchedAt                sql.NullTime
	TerminatedAt              sql.NullTime
	DisplayName               sql.NullString
	DisplayDescription        sql.NullString
	ProviderLocation          sql.NullString
	ProviderAuth              sql.NullString
	SnapshotID                sql.NullString
	VolumeTypeID              string
	SourceVolid               sql.NullString
	Bootable                  sql.NullBool
	ProviderGeometry          sql.NullString
	NameID                    sql.NullString
	EncryptionKeyID           sql.NullString
	MigrationStatus           sql.NullString
	ReplicationStatus         sql.NullString
	ReplicationExtendedStatus sql.NullString
	ReplicationDriverData     sql.NullString
	ConsistencygroupID        sql.NullString
	ProviderID                sql.NullString
	Multiattach               sql.NullBool
	PreviousStatus            sql.NullString
	ClusterName               sql.NullString
	GroupID                   sql.NullString
	ServiceUuid               sql.NullString
	SharedTargets             sql.NullBool
	UseQuota                  bool
}

type VolumeAttachment

type VolumeAttachment struct {
	CreatedAt      sql.NullTime
	UpdatedAt      sql.NullTime
	DeletedAt      sql.NullTime
	Deleted        sql.NullBool
	ID             string
	VolumeID       string
	AttachedHost   sql.NullString
	InstanceUuid   sql.NullString
	Mountpoint     sql.NullString
	AttachTime     sql.NullTime
	DetachTime     sql.NullTime
	AttachMode     sql.NullString
	AttachStatus   sql.NullString
	ConnectionInfo sql.NullString
	Connector      sql.NullString
}

type VolumeType

type VolumeType struct {
	CreatedAt   sql.NullTime
	UpdatedAt   sql.NullTime
	DeletedAt   sql.NullTime
	Deleted     sql.NullBool
	ID          string
	Name        sql.NullString
	QosSpecsID  sql.NullString
	IsPublic    sql.NullBool
	Description sql.NullString
}

Jump to

Keyboard shortcuts

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