lxd

package module
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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Remotes:       DefaultRemotes,
	DefaultRemote: "local",
	Aliases:       map[string]string{},
}
View Source
var DefaultRemotes = map[string]RemoteConfig{
	"images":       ImagesRemote,
	"local":        LocalRemote,
	"ubuntu":       UbuntuRemote,
	"ubuntu-daily": UbuntuDailyRemote}
View Source
var ImagesRemote = RemoteConfig{
	Addr:     "https://images.linuxcontainers.org",
	Public:   true,
	Protocol: "simplestreams"}
View Source
var (
	// LXDErrors are special errors; the client library hoists error codes
	// to these errors internally so that user code can compare against
	// them. We probably shouldn't hoist BadRequest or InternalError, since
	// LXD passes an error string along which is more informative than
	// whatever static error message we would put here.
	LXDErrors = map[int]error{
		http.StatusNotFound: fmt.Errorf("not found"),
	}
)
View Source
var LocalRemote = RemoteConfig{
	Addr:   "unix://",
	Static: true,
	Public: false}
View Source
var StaticRemotes = map[string]RemoteConfig{
	"local":        LocalRemote,
	"ubuntu":       UbuntuRemote,
	"ubuntu-daily": UbuntuDailyRemote}
View Source
var UbuntuDailyRemote = RemoteConfig{
	Addr:     "https://cloud-images.ubuntu.com/daily",
	Static:   true,
	Public:   true,
	Protocol: "simplestreams"}
View Source
var UbuntuRemote = RemoteConfig{
	Addr:     "https://cloud-images.ubuntu.com/releases",
	Static:   true,
	Public:   true,
	Protocol: "simplestreams"}

Functions

func GetLocalLXDErr

func GetLocalLXDErr(err error) error

GetLocalLXDErr determines whether or not an error is likely due to a local LXD configuration issue, and if so, returns the underlying error. GetLocalLXDErr can be used to provide customized error messages to help the user identify basic system issues, e.g. LXD daemon not running.

Returns syscall.ENOENT, syscall.ECONNREFUSED or syscall.EACCES when a local LXD configuration issue is detected, nil otherwise.

func HoistResponse

func HoistResponse(r *http.Response, rtype api.ResponseType) (*api.Response, error)

HoistResponse hoists a regular http response into a response of type rtype or returns a golang error.

func ParseResponse

func ParseResponse(r *http.Response) (*api.Response, error)

ParseResponse parses a lxd style response out of an http.Response. Note that this does _not_ automatically convert error responses to golang errors. To do that, use ParseError. Internal client library uses should probably use HoistResponse, unless they are interested in accessing the underlying Error response (e.g. to inspect the error code).

func SaveConfig

func SaveConfig(c *Config, fname string) error

SaveConfig writes the provided configuration to the config file.

func WebsocketDial

func WebsocketDial(dialer websocket.Dialer, url string) (*websocket.Conn, error)

WebsocketDial attempts to dial a websocket to a LXD instance, parsing LXD-style errors and returning them as go errors.

Types

type Client

type Client struct {
	BaseURL     string
	BaseWSURL   string
	Config      Config
	Name        string
	Remote      *RemoteConfig
	Transport   string
	Certificate string

	Http http.Client
	// contains filtered or unexported fields
}

Client can talk to a LXD daemon.

func NewClient

func NewClient(config *Config, remote string) (*Client, error)

NewClient returns a new LXD client.

func NewClientFromInfo

func NewClientFromInfo(info ConnectInfo) (*Client, error)

NewClientFromInfo returns a new LXD client.

func (*Client) Action

func (c *Client) Action(name string, action shared.ContainerAction, timeout int, force bool, stateful bool) (*api.Response, error)

func (*Client) AddMyCertToServer

func (c *Client) AddMyCertToServer(pwd string) error

func (*Client) Addresses

func (c *Client) Addresses() ([]string, error)

func (*Client) AmTrusted

func (c *Client) AmTrusted() bool

func (*Client) ApplyProfile

func (c *Client) ApplyProfile(container, profile string) (*api.Response, error)

func (*Client) AsyncWaitMeta

func (c *Client) AsyncWaitMeta(resp *api.Response) (map[string]interface{}, error)

func (*Client) CertificateAdd

func (c *Client) CertificateAdd(cert *x509.Certificate, name string) error

func (*Client) CertificateList

func (c *Client) CertificateList() ([]api.Certificate, error)

func (*Client) CertificateRemove

func (c *Client) CertificateRemove(fingerprint string) error

func (*Client) ContainerDeviceAdd

func (c *Client) ContainerDeviceAdd(container, devname, devtype string, props []string) (*api.Response, error)

func (*Client) ContainerDeviceDelete

func (c *Client) ContainerDeviceDelete(container, devname string) (*api.Response, error)

func (*Client) ContainerInfo

func (c *Client) ContainerInfo(name string) (*api.Container, error)

func (*Client) ContainerListDevices

func (c *Client) ContainerListDevices(container string) ([]string, error)

func (*Client) ContainerState

func (c *Client) ContainerState(name string) (*api.ContainerState, error)

func (*Client) CopyImage

func (c *Client) CopyImage(image string, dest *Client, copy_aliases bool, aliases []string, public bool, autoUpdate bool, progressHandler func(progress string)) error

func (*Client) Delete

func (c *Client) Delete(name string) (*api.Response, error)

func (*Client) DeleteAlias

func (c *Client) DeleteAlias(alias string) error

func (*Client) DeleteImage

func (c *Client) DeleteImage(image string) error

func (*Client) Exec

func (c *Client) Exec(name string, cmd []string, env map[string]string,
	stdin io.ReadCloser, stdout io.WriteCloser,
	stderr io.WriteCloser, controlHandler func(*Client, *websocket.Conn),
	width int, height int) (int, error)

Exec runs a command inside the LXD container. For "interactive" use such as `lxc exec ...`, one should pass a controlHandler that talks over the control socket and handles things like SIGWINCH. If running non-interactive, passing a nil controlHandler will cause Exec to return when all of the command output is sent to the output buffers.

func (*Client) ExportImage

func (c *Client) ExportImage(image string, target string) (string, error)

func (*Client) GetAlias

func (c *Client) GetAlias(alias string) string

func (*Client) GetContainerConfig

func (c *Client) GetContainerConfig(container string) ([]string, error)

* return string array representing a container's full configuration

func (*Client) GetImageInfo

func (c *Client) GetImageInfo(image string) (*api.Image, error)

func (*Client) GetLog

func (c *Client) GetLog(container string, log string) (io.Reader, error)

func (*Client) GetMigrationSourceWS

func (c *Client) GetMigrationSourceWS(container string) (*api.Response, error)

func (*Client) GetOperation

func (c *Client) GetOperation(url string) (*api.Operation, error)

func (*Client) GetProfileConfig

func (c *Client) GetProfileConfig(profile string) (map[string]string, error)

func (*Client) GetServerConfig

func (c *Client) GetServerConfig() (*api.Response, error)

func (*Client) GetServerConfigString

func (c *Client) GetServerConfigString() ([]string, error)

func (*Client) ImageFromContainer

func (c *Client) ImageFromContainer(cname string, public bool, aliases []string, properties map[string]string) (string, error)

func (*Client) Init

func (c *Client) Init(name string, imgremote string, image string, profiles *[]string, config map[string]string, ephem bool) (*api.Response, error)

Init creates a container from either a fingerprint or an alias; you must provide at least one.

func (*Client) IsAlias

func (c *Client) IsAlias(alias string) (bool, error)

func (*Client) IsPublic

func (c *Client) IsPublic() bool

func (*Client) ListAliases

func (c *Client) ListAliases() ([]api.ImageAliasesEntry, error)

func (*Client) ListContainers

func (c *Client) ListContainers() ([]api.Container, error)

func (*Client) ListImages

func (c *Client) ListImages() ([]api.Image, error)

func (*Client) ListProfiles

func (c *Client) ListProfiles() ([]string, error)

func (*Client) ListSnapshots

func (c *Client) ListSnapshots(container string) ([]api.ContainerSnapshot, error)

func (*Client) LocalCopy

func (c *Client) LocalCopy(source string, name string, config map[string]string, profiles []string, ephemeral bool) (*api.Response, error)

func (*Client) MigrateFrom

func (c *Client) MigrateFrom(name string, operation string, certificate string, secrets map[string]string, architecture string, config map[string]string, devices map[string]map[string]string, profiles []string, baseImage string, ephemeral bool) (*api.Response, error)

func (*Client) Monitor

func (c *Client) Monitor(types []string, handler func(interface{}), done chan bool) error

func (*Client) PostAlias

func (c *Client) PostAlias(alias string, desc string, target string) error

func (*Client) PostImage

func (c *Client) PostImage(imageFile string, rootfsFile string, properties []string, public bool, aliases []string, progressHandler func(int64, int64)) (string, error)

func (*Client) PostImageURL

func (c *Client) PostImageURL(imageFile string, properties []string, public bool, aliases []string, progressHandler func(progress string)) (string, error)

func (*Client) ProfileConfig

func (c *Client) ProfileConfig(name string) (*api.Profile, error)

func (*Client) ProfileCopy

func (c *Client) ProfileCopy(name, newname string, dest *Client) error

func (*Client) ProfileCreate

func (c *Client) ProfileCreate(p string) error

func (*Client) ProfileDelete

func (c *Client) ProfileDelete(p string) error

func (*Client) ProfileDeviceAdd

func (c *Client) ProfileDeviceAdd(profile, devname, devtype string, props []string) (*api.Response, error)

func (*Client) ProfileDeviceDelete

func (c *Client) ProfileDeviceDelete(profile, devname string) (*api.Response, error)

func (*Client) ProfileListDevices

func (c *Client) ProfileListDevices(profile string) ([]string, error)

func (*Client) PullFile

func (c *Client) PullFile(container string, p string) (int64, int64, int, io.ReadCloser, error)

func (*Client) PushFile

func (c *Client) PushFile(container string, p string, gid int, uid int, mode string, buf io.ReadSeeker) error

func (*Client) PutImageInfo

func (c *Client) PutImageInfo(name string, p api.ImagePut) error

func (*Client) PutProfile

func (c *Client) PutProfile(name string, profile api.ProfilePut) error

func (*Client) Rename

func (c *Client) Rename(name string, newName string) (*api.Response, error)

func (*Client) RestoreSnapshot

func (c *Client) RestoreSnapshot(container string, snapshotName string, stateful bool) (*api.Response, error)

func (*Client) ServerStatus

func (c *Client) ServerStatus() (*api.Server, error)

func (*Client) SetContainerConfig

func (c *Client) SetContainerConfig(container, key, value string) error

func (*Client) SetProfileConfigItem

func (c *Client) SetProfileConfigItem(profile, key, value string) error

func (*Client) SetServerConfig

func (c *Client) SetServerConfig(key string, value string) (*api.Response, error)

func (*Client) Snapshot

func (c *Client) Snapshot(container string, snapshotName string, stateful bool) (*api.Response, error)

func (*Client) SnapshotInfo

func (c *Client) SnapshotInfo(snapName string) (*api.ContainerSnapshot, error)

func (*Client) UpdateContainerConfig

func (c *Client) UpdateContainerConfig(container string, st api.ContainerPut) error

func (*Client) UpdateServerConfig

func (c *Client) UpdateServerConfig(ss api.ServerPut) (*api.Response, error)

func (*Client) WaitFor

func (c *Client) WaitFor(waitURL string) (*api.Operation, error)

Wait for an operation

func (*Client) WaitForSuccess

func (c *Client) WaitForSuccess(waitURL string) error

func (*Client) WaitForSuccessOp

func (c *Client) WaitForSuccessOp(waitURL string) (*api.Operation, error)

func (*Client) Websocket

func (c *Client) Websocket(operation string, secret string) (*websocket.Conn, error)

type Config

type Config struct {
	// DefaultRemote holds the remote daemon name from the Remotes map
	// that the client should communicate with by default.
	// If empty it defaults to "local".
	DefaultRemote string `yaml:"default-remote"`

	// Remotes defines a map of remote daemon names to the details for
	// communication with the named daemon.
	// The implicit "local" remote is always available and communicates
	// with the local daemon over a unix socket.
	Remotes map[string]RemoteConfig `yaml:"remotes"`

	// Command line aliases for `lxc`
	Aliases map[string]string `yaml:"aliases"`

	// This is the path to the config directory, so the client can find
	// previously stored server certs, give good error messages, and save
	// new server certs, etc.
	//
	// We don't need to store it, because of course once we've loaded this
	// structure we already know where it is :)
	ConfigDir string `yaml:"-"`
}

Config holds settings to be used by a client or daemon.

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig reads the configuration from the config path; if the path does not exist, it returns a default configuration.

func (*Config) ConfigPath

func (c *Config) ConfigPath(file string) string

func (*Config) ParseRemote

func (c *Config) ParseRemote(raw string) string

func (*Config) ParseRemoteAndContainer

func (c *Config) ParseRemoteAndContainer(raw string) (string, string)

func (*Config) ServerCertPath

func (c *Config) ServerCertPath(name string) string

type ConnectInfo

type ConnectInfo struct {
	// Name is a simple identifier for the remote server. In 'lxc' it is
	// the name used to lookup the address and other information in the
	// config.yml file.
	Name string
	// RemoteConfig is the information about the Remote that we are
	// connecting to. This includes information like if the remote is
	// Public and/or Static.
	RemoteConfig RemoteConfig
	// ClientPEMCert is the PEM encoded bytes of the client's certificate.
	// If Addr indicates a Unix socket, the certificate and key bytes will
	// not be used.
	ClientPEMCert string
	// ClientPEMKey is the PEM encoded private bytes of the client's key associated with its certificate
	ClientPEMKey string
	// ServerPEMCert is the PEM encoded server certificate that we are
	// connecting to. It can be the empty string if we do not know the
	// server's certificate yet.
	ServerPEMCert string
}

ConnectInfo contains the information we need to connect to a specific LXD server

type RemoteConfig

type RemoteConfig struct {
	Addr     string `yaml:"addr"`
	Public   bool   `yaml:"public"`
	Protocol string `yaml:"protocol,omitempty"`
	Static   bool   `yaml:"-"`
}

RemoteConfig holds details for communication with a remote daemon.

Directories

Path Synopsis
Package lxd implements a client for the LXD API Overview This package lets you connect to LXD daemons or SimpleStream image servers over a Unix socket or HTTPs.
Package lxd implements a client for the LXD API Overview This package lets you connect to LXD daemons or SimpleStream image servers over a Unix socket or HTTPs.
dist
src/github.com/dustinkirkland/golang-petname
Package petname is a library for generating human-readable, random names for objects (e.g.
Package petname is a library for generating human-readable, random names for objects (e.g.
src/github.com/go-stack/stack
Package stack implements utilities to capture, manipulate, and format call stacks.
Package stack implements utilities to capture, manipulate, and format call stacks.
src/github.com/golang/protobuf/_conformance
conformance implements the conformance test subprocess protocol as documented in conformance.proto.
conformance implements the conformance test subprocess protocol as documented in conformance.proto.
src/github.com/golang/protobuf/_conformance/conformance_proto
Package conformance is a generated protocol buffer package.
Package conformance is a generated protocol buffer package.
src/github.com/golang/protobuf/descriptor
Package descriptor provides functions for obtaining protocol buffer descriptors for generated Go types.
Package descriptor provides functions for obtaining protocol buffer descriptors for generated Go types.
src/github.com/golang/protobuf/jsonpb
Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
src/github.com/golang/protobuf/jsonpb/jsonpb_test_proto
Package jsonpb is a generated protocol buffer package.
Package jsonpb is a generated protocol buffer package.
src/github.com/golang/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
src/github.com/golang/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
src/github.com/golang/protobuf/protoc-gen-go/descriptor
Package descriptor is a generated protocol buffer package.
Package descriptor is a generated protocol buffer package.
src/github.com/golang/protobuf/protoc-gen-go/generator
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
src/github.com/golang/protobuf/protoc-gen-go/grpc
Package grpc outputs gRPC service descriptions in Go code.
Package grpc outputs gRPC service descriptions in Go code.
src/github.com/golang/protobuf/protoc-gen-go/plugin
Package plugin_go is a generated protocol buffer package.
Package plugin_go is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes
Package ptypes contains code for interacting with well-known types.
Package ptypes contains code for interacting with well-known types.
src/github.com/golang/protobuf/ptypes/any
Package any is a generated protocol buffer package.
Package any is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes/duration
Package duration is a generated protocol buffer package.
Package duration is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes/empty
Package empty is a generated protocol buffer package.
Package empty is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes/struct
Package structpb is a generated protocol buffer package.
Package structpb is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes/timestamp
Package timestamp is a generated protocol buffer package.
Package timestamp is a generated protocol buffer package.
src/github.com/golang/protobuf/ptypes/wrappers
Package wrappers is a generated protocol buffer package.
Package wrappers is a generated protocol buffer package.
src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
src/github.com/gorilla/mux
Package mux implements a request router and dispatcher.
Package mux implements a request router and dispatcher.
src/github.com/gorilla/websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
Package websocket implements the WebSocket protocol defined in RFC 6455.
src/github.com/gorilla/websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
Command server is a test server for the Autobahn WebSockets Test Suite.
src/github.com/gosexy/gettext
Package gettext provides bindings for GNU Gettext.
Package gettext provides bindings for GNU Gettext.
src/github.com/inconshreveable/log15
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
src/github.com/inconshreveable/log15/term
Package term provides utilities for working with terminals.
Package term provides utilities for working with terminals.
src/github.com/juju/go4/bytereplacer
Package bytereplacer provides a utility for replacing parts of byte slices.
Package bytereplacer provides a utility for replacing parts of byte slices.
src/github.com/juju/go4/cloud/cloudlaunch
Package cloudlaunch helps binaries run themselves on The Cloud, copying themselves to GCE.
Package cloudlaunch helps binaries run themselves on The Cloud, copying themselves to GCE.
src/github.com/juju/go4/cloud/google/gceutil
Package gceutil provides utility functions to help with instances on Google Compute Engine.
Package gceutil provides utility functions to help with instances on Google Compute Engine.
src/github.com/juju/go4/cloud/google/gcsutil
Package gcsutil provides tools for accessing Google Cloud Storage until they can be completely replaced by google.golang.org/cloud/storage.
Package gcsutil provides tools for accessing Google Cloud Storage until they can be completely replaced by google.golang.org/cloud/storage.
src/github.com/juju/go4/ctxutil
Package ctxutil contains golang.org/x/net/context related utilities.
Package ctxutil contains golang.org/x/net/context related utilities.
src/github.com/juju/go4/errorutil
Package errorutil helps make better error messages.
Package errorutil helps make better error messages.
src/github.com/juju/go4/fault
Package fault handles fault injection for testing.
Package fault handles fault injection for testing.
src/github.com/juju/go4/jsonconfig
Package jsonconfig defines a helper type for JSON objects to be used for configuration.
Package jsonconfig defines a helper type for JSON objects to be used for configuration.
src/github.com/juju/go4/legal
Package legal provides in-process storage for compiled-in licenses.
Package legal provides in-process storage for compiled-in licenses.
src/github.com/juju/go4/lock
Package lock is a file locking library.
Package lock is a file locking library.
src/github.com/juju/go4/net/throttle
Package throttle provides a net.Listener that returns artificially-delayed connections for testing real-world connectivity.
Package throttle provides a net.Listener that returns artificially-delayed connections for testing real-world connectivity.
src/github.com/juju/go4/oauthutil
Package oauthutil contains OAuth 2 related utilities.
Package oauthutil contains OAuth 2 related utilities.
src/github.com/juju/go4/osutil
Package osutil contains os level functions.
Package osutil contains os level functions.
src/github.com/juju/go4/readerutil
Package readerutil contains io.Reader types.
Package readerutil contains io.Reader types.
src/github.com/juju/go4/strutil
Package strutil contains string and byte processing functions.
Package strutil contains string and byte processing functions.
src/github.com/juju/go4/syncutil
Package syncutil provides various concurrency mechanisms.
Package syncutil provides various concurrency mechanisms.
src/github.com/juju/go4/syncutil/singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
src/github.com/juju/go4/syncutil/syncdebug
Package syncdebug contains facilities for debugging synchronization problems.
Package syncdebug contains facilities for debugging synchronization problems.
src/github.com/juju/go4/types
Package types provides various common types.
Package types provides various common types.
src/github.com/juju/go4/wkfs
Package wkfs implements the pluggable "well-known filesystem" abstraction layer.
Package wkfs implements the pluggable "well-known filesystem" abstraction layer.
src/github.com/juju/go4/wkfs/gcs
Package gcs registers a Google Cloud Storage filesystem at the well-known /gcs/ filesystem path if the current machine is running on Google Compute Engine.
Package gcs registers a Google Cloud Storage filesystem at the well-known /gcs/ filesystem path if the current machine is running on Google Compute Engine.
src/github.com/juju/go4/writerutil
Package writerutil contains io.Writer types.
Package writerutil contains io.Writer types.
src/github.com/juju/httprequest
Package httprequest provides functionality for unmarshaling HTTP request parameters into a struct type.
Package httprequest provides functionality for unmarshaling HTTP request parameters into a struct type.
src/github.com/juju/loggo
[godoc-link-here] Module level logging for Go This package provides an alternative to the standard library log package.
[godoc-link-here] Module level logging for Go This package provides an alternative to the standard library log package.
src/github.com/juju/persistent-cookiejar
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
src/github.com/julienschmidt/httprouter
Package httprouter is a trie based high performance HTTP request router.
Package httprouter is a trie based high performance HTTP request router.
src/github.com/mattn/go-isatty
Package isatty implements interface to isatty
Package isatty implements interface to isatty
src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
src/github.com/olekukonko/tablewriter
Create & Generate text based table
Create & Generate text based table
src/github.com/pborman/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
src/github.com/rogpeppe/fastuuid
Package fastuuid provides fast UUID generation of 192 bit universally unique identifiers.
Package fastuuid provides fast UUID generation of 192 bit universally unique identifiers.
src/github.com/stretchr/testify
Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend.
Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend.
src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
src/github.com/stretchr/testify/http
Package http DEPRECATED USE net/http/httptest
Package http DEPRECATED USE net/http/httptest
src/github.com/stretchr/testify/mock
Package mock provides a system by which it is possible to mock your objects and verify calls are happening as expected.
Package mock provides a system by which it is possible to mock your objects and verify calls are happening as expected.
src/github.com/stretchr/testify/require
Package require implements the same assertions as the `assert` package but stops test execution when a test fails.
Package require implements the same assertions as the `assert` package but stops test execution when a test fails.
src/github.com/stretchr/testify/suite
Package suite contains logic for creating testing suite structs and running the methods on those structs as tests.
Package suite contains logic for creating testing suite structs and running the methods on those structs as tests.
src/github.com/syndtr/gocapability/capability
Package capability provides utilities for manipulating POSIX capabilities.
Package capability provides utilities for manipulating POSIX capabilities.
src/golang.org/x/crypto/acme
Package acme provides an implementation of the Automatic Certificate Management Environment (ACME) spec.
Package acme provides an implementation of the Automatic Certificate Management Environment (ACME) spec.
src/golang.org/x/crypto/acme/autocert
Package autocert provides automatic access to certificates from Let's Encrypt and any other ACME-based CA.
Package autocert provides automatic access to certificates from Let's Encrypt and any other ACME-based CA.
src/golang.org/x/crypto/bcrypt
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
src/golang.org/x/crypto/blake2b
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
src/golang.org/x/crypto/blake2s
Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xs.
Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xs.
src/golang.org/x/crypto/blowfish
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
src/golang.org/x/crypto/bn256
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
src/golang.org/x/crypto/cast5
Package cast5 implements CAST5, as defined in RFC 2144.
Package cast5 implements CAST5, as defined in RFC 2144.
src/golang.org/x/crypto/chacha20poly1305
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
src/golang.org/x/crypto/chacha20poly1305/internal/chacha20
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
src/golang.org/x/crypto/cryptobyte
Package cryptobyte contains types that help with parsing and constructing length-prefixed, binary messages, including ASN.1 DER.
Package cryptobyte contains types that help with parsing and constructing length-prefixed, binary messages, including ASN.1 DER.
src/golang.org/x/crypto/cryptobyte/asn1
Package asn1 contains supporting types for parsing and building ASN.1 messages with the cryptobyte package.
Package asn1 contains supporting types for parsing and building ASN.1 messages with the cryptobyte package.
src/golang.org/x/crypto/curve25519
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
src/golang.org/x/crypto/ed25519
Package ed25519 implements the Ed25519 signature algorithm.
Package ed25519 implements the Ed25519 signature algorithm.
src/golang.org/x/crypto/hkdf
Package hkdf implements the HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869.
Package hkdf implements the HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869.
src/golang.org/x/crypto/md4
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
src/golang.org/x/crypto/nacl/auth
Package auth authenticates a message using a secret key.
Package auth authenticates a message using a secret key.
src/golang.org/x/crypto/nacl/box
Package box authenticates and encrypts small messages using public-key cryptography.
Package box authenticates and encrypts small messages using public-key cryptography.
src/golang.org/x/crypto/nacl/secretbox
Package secretbox encrypts and authenticates small messages.
Package secretbox encrypts and authenticates small messages.
src/golang.org/x/crypto/ocsp
Package ocsp parses OCSP responses as specified in RFC 2560.
Package ocsp parses OCSP responses as specified in RFC 2560.
src/golang.org/x/crypto/openpgp
Package openpgp implements high level operations on OpenPGP messages.
Package openpgp implements high level operations on OpenPGP messages.
src/golang.org/x/crypto/openpgp/armor
Package armor implements OpenPGP ASCII Armor, see RFC 4880.
Package armor implements OpenPGP ASCII Armor, see RFC 4880.
src/golang.org/x/crypto/openpgp/clearsign
Package clearsign generates and processes OpenPGP, clear-signed data.
Package clearsign generates and processes OpenPGP, clear-signed data.
src/golang.org/x/crypto/openpgp/elgamal
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," IEEE Transactions on Information Theory, v.
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," IEEE Transactions on Information Theory, v.
src/golang.org/x/crypto/openpgp/errors
Package errors contains common error types for the OpenPGP packages.
Package errors contains common error types for the OpenPGP packages.
src/golang.org/x/crypto/openpgp/packet
Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880.
Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880.
src/golang.org/x/crypto/openpgp/s2k
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1.
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1.
src/golang.org/x/crypto/otr
Package otr implements the Off The Record protocol as specified in http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
Package otr implements the Off The Record protocol as specified in http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
src/golang.org/x/crypto/pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
src/golang.org/x/crypto/pkcs12
Package pkcs12 implements some of PKCS#12.
Package pkcs12 implements some of PKCS#12.
src/golang.org/x/crypto/pkcs12/internal/rc2
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.
Package rc2 implements the RC2 cipher https://www.ietf.org/rfc/rfc2268.txt http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf This code is licensed under the MIT license.
src/golang.org/x/crypto/poly1305
Package poly1305 implements Poly1305 one-time message authentication code as specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
Package poly1305 implements Poly1305 one-time message authentication code as specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
src/golang.org/x/crypto/ripemd160
Package ripemd160 implements the RIPEMD-160 hash algorithm.
Package ripemd160 implements the RIPEMD-160 hash algorithm.
src/golang.org/x/crypto/salsa20
Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
src/golang.org/x/crypto/salsa20/salsa
Package salsa provides low-level access to functions in the Salsa family.
Package salsa provides low-level access to functions in the Salsa family.
src/golang.org/x/crypto/scrypt
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
src/golang.org/x/crypto/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
src/golang.org/x/crypto/ssh/agent
Package agent implements the ssh-agent protocol, and provides both a client and a server.
Package agent implements the ssh-agent protocol, and provides both a client and a server.
src/golang.org/x/crypto/ssh/knownhosts
Package knownhosts implements a parser for the OpenSSH known_hosts host key database.
Package knownhosts implements a parser for the OpenSSH known_hosts host key database.
src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
src/golang.org/x/crypto/ssh/test
This package contains integration tests for the golang.org/x/crypto/ssh package.
This package contains integration tests for the golang.org/x/crypto/ssh package.
src/golang.org/x/crypto/twofish
Package twofish implements Bruce Schneier's Twofish encryption algorithm.
Package twofish implements Bruce Schneier's Twofish encryption algorithm.
src/golang.org/x/crypto/xtea
Package xtea implements XTEA encryption, as defined in Needham and Wheeler's 1997 technical report, "Tea extensions."
Package xtea implements XTEA encryption, as defined in Needham and Wheeler's 1997 technical report, "Tea extensions."
src/golang.org/x/crypto/xts
Package xts implements the XTS cipher mode as specified in IEEE P1619/D16.
Package xts implements the XTS cipher mode as specified in IEEE P1619/D16.
src/golang.org/x/net/bpf
Package bpf implements marshaling and unmarshaling of programs for the Berkeley Packet Filter virtual machine, and provides a Go implementation of the virtual machine.
Package bpf implements marshaling and unmarshaling of programs for the Berkeley Packet Filter virtual machine, and provides a Go implementation of the virtual machine.
src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
src/golang.org/x/net/dict
Package dict implements the Dictionary Server Protocol as defined in RFC 2229.
Package dict implements the Dictionary Server Protocol as defined in RFC 2229.
src/golang.org/x/net/dns/dnsmessage
Package dnsmessage provides a mostly RFC 1035 compliant implementation of DNS message packing and unpacking.
Package dnsmessage provides a mostly RFC 1035 compliant implementation of DNS message packing and unpacking.
src/golang.org/x/net/html
Package html implements an HTML5-compliant tokenizer and parser.
Package html implements an HTML5-compliant tokenizer and parser.
src/golang.org/x/net/html/atom
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
src/golang.org/x/net/html/charset
Package charset provides common text encodings for HTML documents.
Package charset provides common text encodings for HTML documents.
src/golang.org/x/net/http2
Package http2 implements the HTTP/2 protocol.
Package http2 implements the HTTP/2 protocol.
src/golang.org/x/net/http2/h2i
The h2i command is an interactive HTTP/2 console.
The h2i command is an interactive HTTP/2 console.
src/golang.org/x/net/http2/hpack
Package hpack implements HPACK, a compression format for efficiently representing HTTP header fields in the context of HTTP/2.
Package hpack implements HPACK, a compression format for efficiently representing HTTP header fields in the context of HTTP/2.
src/golang.org/x/net/icmp
Package icmp provides basic functions for the manipulation of messages used in the Internet Control Message Protocols, ICMPv4 and ICMPv6.
Package icmp provides basic functions for the manipulation of messages used in the Internet Control Message Protocols, ICMPv4 and ICMPv6.
src/golang.org/x/net/idna
Package idna implements IDNA2008 using the compatibility processing defined by UTS (Unicode Technical Standard) #46, which defines a standard to deal with the transition from IDNA2003.
Package idna implements IDNA2008 using the compatibility processing defined by UTS (Unicode Technical Standard) #46, which defines a standard to deal with the transition from IDNA2003.
src/golang.org/x/net/internal/iana
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
src/golang.org/x/net/internal/nettest
Package nettest provides utilities for network testing.
Package nettest provides utilities for network testing.
src/golang.org/x/net/internal/socket
Package socket provides a portable interface for socket system calls.
Package socket provides a portable interface for socket system calls.
src/golang.org/x/net/internal/timeseries
Package timeseries implements a time series structure for stats collection.
Package timeseries implements a time series structure for stats collection.
src/golang.org/x/net/ipv4
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
src/golang.org/x/net/ipv6
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
src/golang.org/x/net/lex/httplex
Package httplex contains rules around lexical matters of various HTTP-related specifications.
Package httplex contains rules around lexical matters of various HTTP-related specifications.
src/golang.org/x/net/nettest
Package nettest provides utilities for network testing.
Package nettest provides utilities for network testing.
src/golang.org/x/net/netutil
Package netutil provides network utility functions, complementing the more common ones in the net package.
Package netutil provides network utility functions, complementing the more common ones in the net package.
src/golang.org/x/net/proxy
Package proxy provides support for a variety of protocols to proxy network data.
Package proxy provides support for a variety of protocols to proxy network data.
src/golang.org/x/net/publicsuffix
Package publicsuffix provides a public suffix list based on data from http://publicsuffix.org/.
Package publicsuffix provides a public suffix list based on data from http://publicsuffix.org/.
src/golang.org/x/net/route
Package route provides basic functions for the manipulation of packet routing facilities on BSD variants.
Package route provides basic functions for the manipulation of packet routing facilities on BSD variants.
src/golang.org/x/net/trace
Package trace implements tracing of requests and long-lived objects.
Package trace implements tracing of requests and long-lived objects.
src/golang.org/x/net/webdav
Package webdav provides a WebDAV server implementation.
Package webdav provides a WebDAV server implementation.
src/golang.org/x/net/webdav/internal/xml
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
src/golang.org/x/net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
src/golang.org/x/net/xsrftoken
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
src/golang.org/x/sys/unix
Package unix contains an interface to the low-level operating system primitives.
Package unix contains an interface to the low-level operating system primitives.
src/golang.org/x/sys/windows/svc
Package svc provides everything required to build Windows service.
Package svc provides everything required to build Windows service.
src/golang.org/x/sys/windows/svc/debug
Package debug provides facilities to execute svc.Handler on console.
Package debug provides facilities to execute svc.Handler on console.
src/golang.org/x/sys/windows/svc/eventlog
Package eventlog implements access to Windows event log.
Package eventlog implements access to Windows event log.
src/golang.org/x/sys/windows/svc/example
Example service program that beeps.
Example service program that beeps.
src/golang.org/x/sys/windows/svc/mgr
Package mgr can be used to manage Windows service programs.
Package mgr can be used to manage Windows service programs.
src/gopkg.in/errgo.v1
The errgo package provides a way to create and diagnose errors.
The errgo package provides a way to create and diagnose errors.
src/gopkg.in/flosch/pongo2.v3
A Django-syntax like template-engine Blog posts about pongo2 (including introduction and migration): https://www.florian-schlachter.de/?tag=pongo2 Complete documentation on the template language: https://docs.djangoproject.com/en/dev/topics/templates/ Try out pongo2 live in the pongo2 playground: https://www.florian-schlachter.de/pongo2/ Make sure to read README.md in the repository as well.
A Django-syntax like template-engine Blog posts about pongo2 (including introduction and migration): https://www.florian-schlachter.de/?tag=pongo2 Complete documentation on the template language: https://docs.djangoproject.com/en/dev/topics/templates/ Try out pongo2 live in the pongo2 playground: https://www.florian-schlachter.de/pongo2/ Make sure to read README.md in the repository as well.
src/gopkg.in/inconshreveable/log15.v2
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
src/gopkg.in/lxc/go-lxc.v2
Package lxc provides Go Bindings for LXC (Linux Containers) C API.
Package lxc provides Go Bindings for LXC (Linux Containers) C API.
src/gopkg.in/macaroon-bakery.v2-unstable/bakery
The bakery package layers on top of the macaroon package, providing a transport and store-agnostic way of using macaroons to assert client capabilities.
The bakery package layers on top of the macaroon package, providing a transport and store-agnostic way of using macaroons to assert client capabilities.
src/gopkg.in/macaroon-bakery.v2-unstable/bakery/checkers
The checkers package provides some standard first-party caveat checkers and some primitives for combining them.
The checkers package provides some standard first-party caveat checkers and some primitives for combining them.
src/gopkg.in/macaroon-bakery.v2-unstable/bakery/example
This example demonstrates three components: - A target service, representing a web server that wishes to use macaroons for authorization.
This example demonstrates three components: - A target service, representing a web server that wishes to use macaroons for authorization.
src/gopkg.in/macaroon-bakery.v2-unstable/bakery/internal/macaroonpb
Package macaroonpb is an internal package that allows us to hide the internal serialization details of macaroon ids.
Package macaroonpb is an internal package that allows us to hide the internal serialization details of macaroon ids.
src/gopkg.in/macaroon-bakery.v2-unstable/bakery/mgorootkeystore
Package mgorootkeystore provides an implementation of bakery.RootKeyStore that uses MongoDB as a persistent store.
Package mgorootkeystore provides an implementation of bakery.RootKeyStore that uses MongoDB as a persistent store.
src/gopkg.in/macaroon-bakery.v2-unstable/bakerytest
Package bakerytest provides test helper functions for the bakery.
Package bakerytest provides test helper functions for the bakery.
src/gopkg.in/macaroon-bakery.v2-unstable/httpbakery/agent
Package agent enables non-interactive (agent) login using macaroons.
Package agent enables non-interactive (agent) login using macaroons.
src/gopkg.in/macaroon-bakery.v2-unstable/httpbakery/form
Package form enables interactive login without using a web browser.
Package form enables interactive login without using a web browser.
src/gopkg.in/macaroon-bakery.v2-unstable/internal/httputil
Package httputil holds utility functions related to net/http.
Package httputil holds utility functions related to net/http.
src/gopkg.in/macaroon.v2-unstable
The macaroon package implements macaroons as described in the paper "Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud" (http://theory.stanford.edu/~ataly/Papers/macaroons.pdf) See the macaroon bakery packages at http://godoc.org/gopkg.in/macaroon-bakery.v1 for higher level services and operations that use macaroons.
The macaroon package implements macaroons as described in the paper "Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud" (http://theory.stanford.edu/~ataly/Papers/macaroons.pdf) See the macaroon bakery packages at http://godoc.org/gopkg.in/macaroon-bakery.v1 for higher level services and operations that use macaroons.
src/gopkg.in/retry.v1
Package retry provides a framework for retrying actions.
Package retry provides a framework for retrying actions.
src/gopkg.in/tomb.v2
The tomb package handles clean goroutine tracking and termination.
The tomb package handles clean goroutine tracking and termination.
src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
lxc
lxd
* * This file is a bit funny.
* * This file is a bit funny.
db
db/query
Package query implements helpers around database/sql to execute various kinds of very common SQL queries.
Package query implements helpers around database/sql to execute various kinds of very common SQL queries.
db/schema
Package schema offers utilities to create and maintain a database schema.
Package schema offers utilities to create and maintain a database schema.
sys
lxd-bridge
That this code needs to exist is kind of dumb, but I'm not sure how else to do it.
That this code needs to exist is kind of dumb, but I'm not sure how else to do it.
api
Package api contains Go structs for all LXD API objects Overview This package has Go structs for every API object, all the various structs are named after the object they represent and some variations of those structs exist for initial object creation, object update and object retrieval.
Package api contains Go structs for all LXD API objects Overview This package has Go structs for every API object, all the various structs are named after the object they represent and some variations of those structs exist for initial object creation, object update and object retrieval.
cmd
gnuflag
Package gnuflag implements command-line flag parsing in the GNU style.
Package gnuflag implements command-line flag parsing in the GNU style.
subtest
Package subtest provides a backwards-compatible way to run subtests.
Package subtest provides a backwards-compatible way to run subtests.
test

Jump to

Keyboard shortcuts

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