v2

package
v0.0.0-...-f4df827 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const TEN_GB = 10 * 1024 * 1024 * 1024

Variables

This section is empty.

Functions

func ImageAccessible

func ImageAccessible(img *v1.Image, proj *identityv1.Project) bool

func NewService

func NewService(client api.Interface, tm auth.TokenManager, imagerepo string, serverID string, prefix string) rest.Service

Types

type ImageCreateReq

type ImageCreateReq struct {
	ID              string            `json:"id"`
	Name            *string           `json:"name"`
	ContainerFormat *string           `json:"container_format"`
	DiskFormat      *string           `json:"disk_format"`
	Visibility      *string           `json:"visibility"`
	Protected       *bool             `json:"protected"`
	MinDisk         uint64            `json:"min_disk"`
	MinRam          uint64            `json:"min_ram"`
	Tags            []string          `json:"tags"`
	Metadata        map[string]string `json:"-"`
}

func (*ImageCreateReq) UnmarshalJSON

func (info *ImageCreateReq) UnmarshalJSON(b []byte) error

type ImageInfo

type ImageInfo struct {
	ID              string            `json:"id"`
	Name            *string           `json:"name"`
	File            string            `json:"file"`
	Schema          string            `json:"schema"`
	Status          string            `json:"status"`
	ContainerFormat *string           `json:"container_format"`
	DiskFormat      *string           `json:"disk_format"`
	Visibility      string            `json:"visibility"`
	Protected       bool              `json:"protected"`
	Size            *uint64           `json:"size"`
	VirtualSize     *uint64           `json:"virtual_size"`
	Owner           string            `json:"owner"`
	MinDisk         uint64            `json:"min_disk"`
	MinRam          uint64            `json:"min_ram"`
	Checksum        *string           `json:"checksum"`
	CreatedAt       string            `json:"created_at"`
	UpdatedAt       string            `json:"updated_at"`
	Tags            []string          `json:"tags"`
	Metadata        map[string]string `json:"-"`
}

func (ImageInfo) MarshalJSON

func (info ImageInfo) MarshalJSON() ([]byte, error)

type ImageListRes

type ImageListRes struct {
	Images []ImageInfo `json:"images"`
}

type ImagePatchChange

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

type ImagePatchReq

type ImagePatchReq []ImagePatchChange

type IndexRes

type IndexRes struct {
	Versions []VersionInfo `json:"versions"`
}

type SchemaImageShowRes

type SchemaImageShowRes struct {
	Links                []rest.LinkInfo           `json:"links"`
	Name                 string                    `json:"name"`
	Properties           map[string]SchemaPropInfo `json:"properties"`
	AdditionalProperties map[string]string         `json:"additionalProperties"`
}

type SchemaPropInfo

type SchemaPropInfo struct {
	Description string           `json:"description"`
	Type        interface{}      `json:"type"`
	ReadOnly    *bool            `json:"readonly,omitempty"`
	Enum        []*string        `json:"enum,omitempty"`
	Pattern     string           `json:"pattern,omitempty"`
	IsBase      *bool            `json:"is_base,omitempty"`
	MaxLength   uint             `json:"maxLength,omitempty"`
	Items       *SchemaPropItems `json:"items,omitempty"`
}

type SchemaPropItems

type SchemaPropItems struct {
	Properties map[string]SchemaPropInfo `json:"properties,omitempty"`
	Required   []string                  `json:"required,omitempty"`
	MaxLength  uint                      `json:"maxLength,omitempty"`
	Type       string                    `json:"type"`
}

type VersionInfo

type VersionInfo struct {
	ID     string          `json:"id"`
	Status string          `json:"status"`
	Links  []rest.LinkInfo `json:"links"`
}

Jump to

Keyboard shortcuts

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