Documentation ¶
Index ¶
- type ApplicationExistError
- type ApplicationNotFoundError
- type Broker
- func (br *Broker) CreateUser(user userdb.User, password string) (err error)
- func (br *Broker) GetUser(username string) (userdb.User, error)
- func (br *Broker) NewUserBroker(user userdb.User, ctx context.Context) *UserBroker
- func (br *Broker) RemoveUser(username string) (err error)
- func (br *Broker) StartContainers(ctx context.Context, containers []*container.Container) error
- type NamespaceNotEmptyError
- type NoNamespaceError
- type ScalingError
- type UserBroker
- func (br *UserBroker) AddHost(name, host string) error
- func (br *UserBroker) CreateApplication(opts container.CreateOptions, tags []string) (app *userdb.Application, containers []*container.Container, err error)
- func (br *UserBroker) CreateNamespace(namespace string) (err error)
- func (br *UserBroker) CreateServices(opts container.CreateOptions, tags []string) (containers []*container.Container, err error)
- func (br *UserBroker) Download(name string) (io.ReadCloser, error)
- func (br *UserBroker) Dump(name string) (io.ReadCloser, error)
- func (br *UserBroker) GetApplications() (apps map[string]*userdb.Application, err error)
- func (br *UserBroker) GetInstalledPlugins(category manifest.Category) (plugins []*manifest.Plugin)
- func (br *UserBroker) GetPluginInfo(tag string) (plugin *manifest.Plugin, err error)
- func (br *UserBroker) GetUserPlugins(category manifest.Category) (plugins []*manifest.Plugin)
- func (br *UserBroker) InstallPlugin(ar io.Reader) error
- func (br *UserBroker) Namespace() string
- func (br *UserBroker) Refresh() error
- func (br *UserBroker) RemoveApplication(name string) (err error)
- func (br *UserBroker) RemoveHost(name, host string) error
- func (br *UserBroker) RemoveNamespace(force bool) (err error)
- func (br *UserBroker) RemovePlugin(tag string) error
- func (br *UserBroker) RemoveService(name, service string) (err error)
- func (br *UserBroker) RestartApplication(name string) error
- func (br *UserBroker) Restore(name string, source io.Reader) error
- func (br *UserBroker) ScaleApplication(name string, num int) ([]*container.Container, error)
- func (br *UserBroker) StartApplication(name string) error
- func (br *UserBroker) StopApplication(name string) error
- func (br *UserBroker) Upload(name string, content io.Reader, binary bool, logger io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationExistError ¶
type ApplicationExistError struct {
Name, Namespace string
}
func (ApplicationExistError) Error ¶
func (e ApplicationExistError) Error() string
func (ApplicationExistError) HTTPErrorStatusCode ¶
func (e ApplicationExistError) HTTPErrorStatusCode() int
type ApplicationNotFoundError ¶
type ApplicationNotFoundError string
func (ApplicationNotFoundError) Error ¶
func (e ApplicationNotFoundError) Error() string
func (ApplicationNotFoundError) HTTPErrorStatusCode ¶
func (e ApplicationNotFoundError) HTTPErrorStatusCode() int
type Broker ¶
type Broker struct { container.DockerClient Users *userdb.UserDatabase Authz *auth.Authenticator SCM scm.SCM Hub *hub.PluginHub }
Broker maintains all external services.
func (*Broker) CreateUser ¶
func (*Broker) NewUserBroker ¶
func (*Broker) RemoveUser ¶
type NamespaceNotEmptyError ¶
type NamespaceNotEmptyError string
func (NamespaceNotEmptyError) Error ¶
func (e NamespaceNotEmptyError) Error() string
func (NamespaceNotEmptyError) HTTPErrorStatusCode ¶
func (e NamespaceNotEmptyError) HTTPErrorStatusCode() int
type NoNamespaceError ¶
type NoNamespaceError string
func (NoNamespaceError) Error ¶
func (e NoNamespaceError) Error() string
func (NoNamespaceError) HTTPErrorStatusCode ¶
func (e NoNamespaceError) HTTPErrorStatusCode() int
type ScalingError ¶
type ScalingError int
func (ScalingError) Error ¶
func (e ScalingError) Error() string
func (ScalingError) HTTPErrorStatusCode ¶
func (e ScalingError) HTTPErrorStatusCode() int
type UserBroker ¶
UserBroker performs user specific operations.
func (*UserBroker) AddHost ¶
func (br *UserBroker) AddHost(name, host string) error
func (*UserBroker) CreateApplication ¶
func (br *UserBroker) CreateApplication(opts container.CreateOptions, tags []string) (app *userdb.Application, containers []*container.Container, err error)
func (*UserBroker) CreateNamespace ¶
func (br *UserBroker) CreateNamespace(namespace string) (err error)
func (*UserBroker) CreateServices ¶
func (br *UserBroker) CreateServices(opts container.CreateOptions, tags []string) (containers []*container.Container, err error)
func (*UserBroker) Download ¶
func (br *UserBroker) Download(name string) (io.ReadCloser, error)
Download application repository as a archive file.
func (*UserBroker) Dump ¶
func (br *UserBroker) Dump(name string) (io.ReadCloser, error)
func (*UserBroker) GetApplications ¶
func (br *UserBroker) GetApplications() (apps map[string]*userdb.Application, err error)
func (*UserBroker) GetInstalledPlugins ¶
func (br *UserBroker) GetInstalledPlugins(category manifest.Category) (plugins []*manifest.Plugin)
GetInstalledPlugins returns all installed plugins, include user and system plugins.
func (*UserBroker) GetPluginInfo ¶
func (br *UserBroker) GetPluginInfo(tag string) (plugin *manifest.Plugin, err error)
GetPluginInfo returns a installed plugin meta data.
func (*UserBroker) GetUserPlugins ¶
func (br *UserBroker) GetUserPlugins(category manifest.Category) (plugins []*manifest.Plugin)
GetUserPlugins returns a list of user defined plugins.
func (*UserBroker) InstallPlugin ¶
func (br *UserBroker) InstallPlugin(ar io.Reader) error
InstallPlugin installs a user defined plugin.
func (*UserBroker) Namespace ¶
func (br *UserBroker) Namespace() string
func (*UserBroker) Refresh ¶
func (br *UserBroker) Refresh() error
func (*UserBroker) RemoveApplication ¶
func (br *UserBroker) RemoveApplication(name string) (err error)
func (*UserBroker) RemoveHost ¶
func (br *UserBroker) RemoveHost(name, host string) error
func (*UserBroker) RemoveNamespace ¶
func (br *UserBroker) RemoveNamespace(force bool) (err error)
func (*UserBroker) RemovePlugin ¶
func (br *UserBroker) RemovePlugin(tag string) error
RemovePlugin removes a user defined plugin.
func (*UserBroker) RemoveService ¶
func (br *UserBroker) RemoveService(name, service string) (err error)
func (*UserBroker) RestartApplication ¶
func (br *UserBroker) RestartApplication(name string) error
func (*UserBroker) ScaleApplication ¶
Scale application by adding or removing containers in the application.
func (*UserBroker) StartApplication ¶
func (br *UserBroker) StartApplication(name string) error
func (*UserBroker) StopApplication ¶
func (br *UserBroker) StopApplication(name string) error
Click to show internal directories.
Click to hide internal directories.