simplestreams

package
v0.0.0-...-8dc4a41 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleStreams

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

func NewClient

func NewClient(url string, httpClient http.Client, useragent string) *SimpleStreams

func (*SimpleStreams) Download

func (s *SimpleStreams) Download(image string, fileType string, target string, progress func(int64, int64)) error

func (*SimpleStreams) ExportImage

func (s *SimpleStreams) ExportImage(image string, target string) (string, error)

func (*SimpleStreams) GetAlias

func (s *SimpleStreams) GetAlias(name string) (*api.ImageAliasesEntry, error)

func (*SimpleStreams) GetFiles

func (s *SimpleStreams) GetFiles(fingerprint string) (map[string]SimpleStreamsFile, error)

func (*SimpleStreams) GetImage

func (s *SimpleStreams) GetImage(fingerprint string) (*api.Image, error)

func (*SimpleStreams) ListAliases

func (s *SimpleStreams) ListAliases() ([]api.ImageAliasesEntry, error)

func (*SimpleStreams) ListImages

func (s *SimpleStreams) ListImages() ([]api.Image, error)

type SimpleStreamsFile

type SimpleStreamsFile struct {
	Path   string
	Sha256 string
	Size   int64
}

type SimpleStreamsIndex

type SimpleStreamsIndex struct {
	Format  string                              `json:"format"`
	Index   map[string]SimpleStreamsIndexStream `json:"index"`
	Updated string                              `json:"updated"`
}

type SimpleStreamsIndexStream

type SimpleStreamsIndexStream struct {
	Updated  string   `json:"updated"`
	DataType string   `json:"datatype"`
	Path     string   `json:"path"`
	Products []string `json:"products"`
}

type SimpleStreamsManifest

type SimpleStreamsManifest struct {
	Updated  string                                  `json:"updated"`
	DataType string                                  `json:"datatype"`
	Format   string                                  `json:"format"`
	License  string                                  `json:"license"`
	Products map[string]SimpleStreamsManifestProduct `json:"products"`
}

func (*SimpleStreamsManifest) ToLXD

func (s *SimpleStreamsManifest) ToLXD() ([]api.Image, map[string][][]string)

type SimpleStreamsManifestProduct

type SimpleStreamsManifestProduct struct {
	Aliases         string                                         `json:"aliases"`
	Architecture    string                                         `json:"arch"`
	OperatingSystem string                                         `json:"os"`
	Release         string                                         `json:"release"`
	ReleaseCodename string                                         `json:"release_codename"`
	ReleaseTitle    string                                         `json:"release_title"`
	Supported       bool                                           `json:"supported"`
	SupportedEOL    string                                         `json:"support_eol"`
	Version         string                                         `json:"version"`
	Versions        map[string]SimpleStreamsManifestProductVersion `json:"versions"`
}

type SimpleStreamsManifestProductVersion

type SimpleStreamsManifestProductVersion struct {
	PublicName string                                             `json:"pubname"`
	Label      string                                             `json:"label"`
	Items      map[string]SimpleStreamsManifestProductVersionItem `json:"items"`
}

type SimpleStreamsManifestProductVersionItem

type SimpleStreamsManifestProductVersionItem struct {
	Path                  string `json:"path"`
	FileType              string `json:"ftype"`
	HashMd5               string `json:"md5"`
	HashSha256            string `json:"sha256"`
	LXDHashSha256         string `json:"combined_sha256"`
	LXDHashSha256RootXz   string `json:"combined_rootxz_sha256"`
	LXDHashSha256SquashFs string `json:"combined_squashfs_sha256"`
	Size                  int64  `json:"size"`
	DeltaBase             string `json:"delta_base"`
}

Jump to

Keyboard shortcuts

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