Documentation
¶
Index ¶
- Constants
- type DBTX
- type GetAllProjectQuotasRow
- type GetAllServicesRow
- type GetAllVolumesRow
- type GetProjectQuotaLimitsRow
- type GetVolumeTypesRow
- type Queries
- func (q *Queries) GetAllProjectQuotas(ctx context.Context) ([]GetAllProjectQuotasRow, error)
- func (q *Queries) GetAllServices(ctx context.Context) ([]GetAllServicesRow, error)
- func (q *Queries) GetAllVolumes(ctx context.Context) ([]GetAllVolumesRow, error)
- func (q *Queries) GetProjectQuotaLimits(ctx context.Context) ([]GetProjectQuotaLimitsRow, error)
- func (q *Queries) GetSnapshotCount(ctx context.Context) (int64, error)
- func (q *Queries) GetVolumeTypes(ctx context.Context) ([]GetVolumeTypesRow, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Quota
- type QuotaUsage
- type Service
- type Snapshot
- type Volume
- type VolumeAttachment
- type VolumeType
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 GetAllProjectQuotasRow ¶
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 GetVolumeTypesRow ¶
type GetVolumeTypesRow struct {
ID string
Name sql.NullString
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
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 (*Queries) GetVolumeTypes ¶
func (q *Queries) GetVolumeTypes(ctx context.Context) ([]GetVolumeTypesRow, error)
type QuotaUsage ¶
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
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 ¶
Click to show internal directories.
Click to hide internal directories.