lib

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(file, pass string) error

func Encrypt

func Encrypt(file, pass string) error

func GetSwiftClient

func GetSwiftClient(opts SwiftAuthOpts) (*gophercloud.ServiceClient, error)

func SwiftCreateContainer

func SwiftCreateContainer(client *gophercloud.ServiceClient, name string, create, archive bool) error

Types

type ErrObjectDoesNotExist

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

func (ErrObjectDoesNotExist) Error

func (e ErrObjectDoesNotExist) Error() string

type LXDConfig

type LXDConfig struct {
	Config          *lxd_config.Config
	RemoteName      string
	ConfigDirectory string
}

func NewLXDConfig

func NewLXDConfig(c LXDConfig) (LXDConfig, error)

func (LXDConfig) GetContainerServer

func (r LXDConfig) GetContainerServer() (lxd.ContainerServer, error)

func (LXDConfig) GetImageServer

func (r LXDConfig) GetImageServer() (lxd.ImageServer, error)

type LXDDownloadOpts

type LXDDownloadOpts struct {
	Name        string
	TmpDir      string
	Fingerprint string
}

type LXDDownloadResult

type LXDDownloadResult struct {
	MetaFilename   string
	RootfsFilename string
}

func LXDDownloadImage

func LXDDownloadImage(lxdConfig LXDConfig, opts LXDDownloadOpts) (*LXDDownloadResult, error)

This is a loose re-implementation of lxc image export: https://github.com/lxc/lxd/blob/master/lxc/image.go This will download an image to a temporary directory.

type LXDImportOpts

type LXDImportOpts struct {
	Aliases        []string
	Name           string
	MetaFilename   string
	RootfsFilename string
	TmpDir         string
}

type LXDImportResult

type LXDImportResult struct {
	Fingerprint string
}

func LXDImportImage

func LXDImportImage(lxdConfig LXDConfig, opts LXDImportOpts) (*LXDImportResult, error)

This is a loose re-implementation of "lxc import". https://github.com/lxc/lxd/blob/master/lxc/image.go

type LXDPublishOpts

type LXDPublishOpts struct {
	Name                 string
	Stop                 bool
	Properties           *map[string]string
	CompressionAlgorithm string
}

type LXDPublishResult

type LXDPublishResult struct {
	Fingerprint string
}

func LXDPublishImage

func LXDPublishImage(lxdConfig LXDConfig, opts LXDPublishOpts) (*LXDPublishResult, error)

The following is a loose re-implementation of `lxc publish`. https://github.com/lxc/lxd/blob/master/lxc/publish.go This will create an image out of a container. If the container is ephemeral, it will temporarily be made non-ephemeral. If the container is running, it will temporarily be stopped.

type SwiftAuthOpts

type SwiftAuthOpts struct {
	DomainID         string
	DomainName       string
	IdentityEndpoint string
	Password         string
	TenantID         string
	TenantName       string
	TokenID          string
	Username         string
	UserID           string
	RegionName       string
	CACert           string
	Insecure         bool
	Swauth           bool
}

type SwiftDownloadOpts

type SwiftDownloadOpts struct {
	Filename         string
	ObjectName       string
	StorageContainer string
}

type SwiftDownloadResult

type SwiftDownloadResult struct {
	Headers *objects.DownloadHeader
}

type SwiftUploadOpts

type SwiftUploadOpts struct {
	SourceName       string
	StorageContainer string
	ObjectName       string
}

type SwiftUploadResults

type SwiftUploadResults struct {
	Headers *objects.CreateHeader
}

func SwiftUploadObject

func SwiftUploadObject(client *gophercloud.ServiceClient, opts SwiftUploadOpts) (*SwiftUploadResults, error)

Jump to

Keyboard shortcuts

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