util

package
v0.0.0-...-71f76d9 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2016 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

func Connect

func Connect(network, path string) (net.Conn, error)

func ConnectAndWait

func ConnectAndWait(network, path string) (net.Conn, error)

func CopyFile

func CopyFile(src, dst string) *exec.Cmd

func FileInfoHeader

func FileInfoHeader() string

func GenerateMAC

func GenerateMAC() (net.HardwareAddr, error)

Generate a MAC address.

func HomePath

func HomePath() string

func ID

func ID() string

func IsDirectIOSupported

func IsDirectIOSupported(path string) bool

func IsRemoteImage

func IsRemoteImage(repo_url, name string) (bool, error)

func ListImagesRemote

func ListImagesRemote(repo_url string, search string) error

func ParseMemSize

func ParseMemSize(memory string) (int64, error)

func RawTerm

func RawTerm() error

func ResetTerm

func ResetTerm()

func SearchInstance

func SearchInstance(name string) (instanceName, instancePlatform string)

Types

type Contents

type Contents struct {
	Key          string
	LastModified string
	Size         int
	StorageClass string
}

type FileInfo

type FileInfo struct {
	Namespace   string
	Name        string
	Description string
	Version     string
	Created     string
}

func MakeFileInfo

func MakeFileInfo(path, ns, name string) *FileInfo

func RemoteFileInfo

func RemoteFileInfo(repo_url string, path string) *FileInfo

func (*FileInfo) String

func (f *FileInfo) String() string

type FilesInfo

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

type ImageInfo

type ImageInfo struct {
	FormatVersion string `yaml:"format_version"`
	Version       string
	Created       string
	Description   string
	Build         string
}

type Query

type Query struct {
	ContentsList []Contents `xml:"Contents"`
}

func QueryRemote

func QueryRemote(repo_url string) (*Query, error)

type Repo

type Repo struct {
	URL  string
	Path string
}

func NewRepo

func NewRepo(url string) *Repo

func (*Repo) DefaultImage

func (r *Repo) DefaultImage() string

func (*Repo) DownloadFile

func (r *Repo) DownloadFile(repo_url string, name string) error

func (*Repo) DownloadImage

func (r *Repo) DownloadImage(repo_url, hypervisor string, path string) error

func (*Repo) ImageExists

func (r *Repo) ImageExists(hypervisor, image string) bool

func (*Repo) ImagePath

func (r *Repo) ImagePath(hypervisor string, image string) string

func (*Repo) ImportImage

func (r *Repo) ImportImage(imageName string, file string, version string, created string, description string, build string) error

func (*Repo) ListImages

func (r *Repo) ListImages()

func (*Repo) PullImage

func (r *Repo) PullImage(image string) error

func (*Repo) RemoveImage

func (r *Repo) RemoveImage(image string) error

Jump to

Keyboard shortcuts

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