glance

package
v0.0.0-...-78eb850 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = KB * 1024
	GB = MB * 1024
	TB = GB * 1024
)

Variables

View Source
var IMAGE_CONTAINER_FORMATS = []string{
	"bare", "ami", "ari", "aki", "ovf", "ova", "docker", "community", "shared"}
View Source
var IMAGE_DISK_FORMATS = []string{
	"ami", "ari", "aki", "vhd", "vhdx", "vmdk", "raw", "qcow2", "vdi", "iso", "ploop", "luks"}
View Source
var IMAGE_VISIBILITIES = []string{"public", "private", "community", "shared"}

Functions

This section is empty.

Types

type AttributeOp

type AttributeOp struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value"`
}

type Image

type Image struct {
	model.Resource
	DiskFormat      string   `json:"disk_format,omitempty"`
	ContainerFormat string   `json:"container_format,omitempty"`
	DirectUrl       string   `json:"direct_url,omitempty"`
	Checksum        string   `json:"checksum,omitempty"`
	Size            uint     `json:"size,omitempty"`
	VirtualSize     uint     `json:"virtual_size,omitempty"`
	MinDisk         uint     `json:"min_disk,omitempty"`
	MinRam          uint     `json:"min_ram,omitempty"`
	Owner           string   `json:"owner,omitempty"`
	Tags            []string `json:"tags,omitempty"`
	Protected       bool     `json:"protected,omitempty"`
	Visibility      string   `json:"visibility,omitempty"`
	ProcessInfo     float32  `json:"progress_info,omitempty"`
	OSHashAlgo      string   `json:"os_hash_algo,omitempty"`
	OSHashValue     string   `json:"os_hash_value,omitempty"`
	Schema          string   `json:"schema,omitempty"`
	File            string   `json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (Image) GetProperties

func (img Image) GetProperties() map[string]interface{}

func (Image) GetPropertyList

func (img Image) GetPropertyList() []string

func (Image) HumanSize

func (img Image) HumanSize() string

func (*Image) SetRaw

func (img *Image) SetRaw(raw map[string]interface{})

type Images

type Images []Image

type ImagesResp

type ImagesResp struct {
	Images []Image `json:"images,omitempty"`
	Next   string  `json:"next,omitempty"`
}

Jump to

Keyboard shortcuts

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