util

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 added in v0.1.3

func GenerateMAC() (net.HardwareAddr, error)

Generate a MAC address.

func HomePath

func HomePath() string

func ID

func ID() string

func IsDirectIOSupported added in v0.1.3

func IsDirectIOSupported(path string) bool

func IsRemoteImage

func IsRemoteImage(name string) bool

func ListImagesRemote

func ListImagesRemote(search string)

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(path string) *FileInfo

func (*FileInfo) String

func (f *FileInfo) String() string

type FilesInfo

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

type ImageInfo added in v0.1.3

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() *Query

type Repo

type Repo struct {
	Path string
}

func NewRepo

func NewRepo() *Repo

func (*Repo) DefaultImage

func (r *Repo) DefaultImage() string

func (*Repo) DownloadFile

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

func (*Repo) DownloadImage

func (r *Repo) DownloadImage(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 added in v0.1.3

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