glance

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ImageGetAll = `` /* 335-byte string literal not displayed */

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 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
}

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 ImagesVisibility

type ImagesVisibility string
const (
	ImagesVisibilityPrivate   ImagesVisibility = "private"
	ImagesVisibilityPublic    ImagesVisibility = "public"
	ImagesVisibilityShared    ImagesVisibility = "shared"
	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.

func (NullImagesVisibility) Value

func (ns NullImagesVisibility) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ImageGet

func (q *Queries) ImageGet(ctx context.Context, id string) (ImageGetAllRow, error)

ImageGet returns one undeleted resource, or sql.ErrNoRows when absent.

func (*Queries) ImageGetAll

func (q *Queries) ImageGetAll(ctx context.Context) ([]ImageGetAllRow, error)

func (*Queries) ImageGetAllByFilters

func (q *Queries) ImageGetAllByFilters(ctx context.Context, f ImageFilters) ([]ImageGetAllRow, error)

ImageGetAllByFilters returns the resource projection for matching database records. It does not perform OpenStack authorization, cell discovery, or archive searches.

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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