Documentation
¶
Index ¶
- Constants
- type DBTX
- type Image
- type ImageFilters
- type ImageGetAllRow
- type ImageRecord
- type ImagesVisibility
- type NullImagesVisibility
- type Queries
- func (q *Queries) ImageGet(ctx context.Context, id string) (ImageRecord, error)
- func (q *Queries) ImageGetAll(ctx context.Context) ([]ImageGetAllRow, error)
- func (q *Queries) ImageGetAllByFilters(ctx context.Context, f ImageFilters) ([]ImageRecord, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
Constants ¶
View Source
const ImageGetAll = `` /* 335-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
ID string
Name sql.NullString
Size sql.NullInt64
Status string
CreatedAt time.Time
UpdatedAt sql.NullTime
DeletedAt sql.NullTime
Deleted bool
DiskFormat sql.NullString
ContainerFormat sql.NullString
Checksum sql.NullString
Owner sql.NullString
MinDisk int32
MinRam int32
Protected bool
VirtualSize sql.NullInt64
Visibility ImagesVisibility
OsHidden bool
OsHashAlgo sql.NullString
OsHashValue sql.NullString
}
type ImageFilters ¶
type ImageFilters struct {
IDs []string
ProjectIDs []string
Statuses []string
Visibilities []string
Deleted db.Deleted
CreatedBefore time.Time
DeletedAfter time.Time
// IncludeStartBoundary includes records deleted exactly at DeletedAfter.
IncludeStartBoundary bool
// DeletedAtIsNull adds a deleted_at IS NULL predicate independently of Deleted.
DeletedAtIsNull bool
}
ImageFilters combines exact-match filters with AND. Values within a slice use OR. Nil slices are unrestricted; non-nil empty slices match no records. CreatedBefore and DeletedAfter form an optional half-open lifetime window. The zero deletion policy excludes soft-deleted records.
type ImageGetAllRow ¶
type ImageGetAllRow struct {
ID string
Name sql.NullString
Size sql.NullInt64
Status string
Owner sql.NullString
Visibility ImagesVisibility
DiskFormat sql.NullString
ContainerFormat sql.NullString
Checksum sql.NullString
CreatedAt time.Time
UpdatedAt sql.NullTime
MinDisk int32
MinRam int32
Protected bool
VirtualSize sql.NullInt64
OsHidden bool
OsHashAlgo sql.NullString
OsHashValue sql.NullString
}
type ImageRecord ¶ added in v0.2.0
type ImageRecord struct {
ImageGetAllRow
DeletedAt sql.NullTime
}
ImageRecord extends the current-resource projection with lifecycle metadata.
type ImagesVisibility ¶
type ImagesVisibility string
const ( ImagesVisibilityPrivate ImagesVisibility = "private" ImagesVisibilityPublic ImagesVisibility = "public" ImagesVisibilityCommunity ImagesVisibility = "community" )
func (*ImagesVisibility) Scan ¶
func (e *ImagesVisibility) Scan(src interface{}) error
type NullImagesVisibility ¶
type NullImagesVisibility struct {
ImagesVisibility ImagesVisibility
Valid bool // Valid is true if ImagesVisibility is not NULL
}
func (*NullImagesVisibility) Scan ¶
func (ns *NullImagesVisibility) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ImageGetAll ¶
func (q *Queries) ImageGetAll(ctx context.Context) ([]ImageGetAllRow, error)
func (*Queries) ImageGetAllByFilters ¶
func (q *Queries) ImageGetAllByFilters(ctx context.Context, f ImageFilters) ([]ImageRecord, error)
ImageGetAllByFilters returns the resource projection for matching database records. It does not perform OpenStack authorization, cell discovery, or archive searches.
Click to show internal directories.
Click to hide internal directories.