util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2014 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigExists

func ConfigExists(filename string) bool

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 HomePath

func HomePath() string

func ID

func ID() string

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 Config

type Config struct {
	Base    string
	RpmBase *RpmPackage "rpm-base"
	Cmdline string
	Build   string
	Files   map[string]string
	Rootfs  string
}

func ParseConfig

func ParseConfig(data []byte) (*Config, error)

func ReadConfig

func ReadConfig(filename string) (*Config, error)

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 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) ListImages

func (r *Repo) ListImages()

func (*Repo) PullImage

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

func (*Repo) PushImage

func (r *Repo) PushImage(imageName string, file string) error

func (*Repo) RemoveImage

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

type RpmPackage

type RpmPackage struct {
	Name    string
	Version string
	Release string
	Arch    string
}

func (*RpmPackage) Download

func (p *RpmPackage) Download() error

func (*RpmPackage) Filename

func (p *RpmPackage) Filename() string

func (*RpmPackage) URL

func (p *RpmPackage) URL() string

Jump to

Keyboard shortcuts

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