api

package
v0.0.0-...-511b1a1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mux *http.ServeMux, juju JujuParams, lxd LXDParams, svc SvcParams) error

Register registers the API handlers in the given mux.

Types

type JujuParams

type JujuParams struct {
	// Addrs holds the addresses of the current Juju controller.
	Addrs []string
	// Cert holds the controller CA certificate in PEM format.
	Cert string
}

JujuParams holds parameters for interacting with the Juju controller.

type LXDParams

type LXDParams struct {
	// ImageName holds the name of the LXD image to use.
	ImageName string
	// LXDSocketPath holds the path to the LXD unix socket.
	LXDSocketPath string
	// Profiles holds the LXD profile names.
	Profiles []string `yaml:"profiles"`
}

LXDParams holds parameters used for creating LXD containers.

type SvcParams

type SvcParams struct {
	// AllowedUsers holds a list of names of users allowed to use the service.
	AllowedUsers []string
	// SessionDuration holds time duration before expiring container sessions.
	SessionDuration time.Duration
	// WelcomeMessage optionally holds an initial welcome message for users.
	WelcomeMessage string
}

SvcParams holds parameters used for configuring and running the service.

Jump to

Keyboard shortcuts

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