Version: v3.0.0+incompatible Latest Latest

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

Go to latest
Published: Sep 6, 2015 License: Apache-2.0 Imports: 21 Imported by: 75




View Source
const (
	NodeHealthUp   = "up"
	NodeHealthDown = "down"


View Source
var (
	ErrAccountExists              = errors.New("account already exists")
	ErrAccountDoesNotExist        = errors.New("account does not exist")
	ErrRoleDoesNotExist           = errors.New("role does not exist")
	ErrNodeDoesNotExist           = errors.New("node does not exist")
	ErrServiceKeyDoesNotExist     = errors.New("service key does not exist")
	ErrInvalidAuthToken           = errors.New("invalid auth token")
	ErrExtensionDoesNotExist      = errors.New("extension does not exist")
	ErrWebhookKeyDoesNotExist     = errors.New("webhook key does not exist")
	ErrRegistryDoesNotExist       = errors.New("registry does not exist")
	ErrConsoleSessionDoesNotExist = errors.New("console session does not exist")


This section is empty.


type DefaultManager

type DefaultManager struct {
	// contains filtered or unexported fields

func (DefaultManager) Account

func (m DefaultManager) Account(username string) (*auth.Account, error)

func (DefaultManager) Accounts

func (m DefaultManager) Accounts() ([]*auth.Account, error)

func (DefaultManager) AddRegistry

func (m DefaultManager) AddRegistry(registry *shipyard.Registry) error

func (DefaultManager) Authenticate

func (m DefaultManager) Authenticate(username, password string) (bool, error)

func (DefaultManager) ChangePassword

func (m DefaultManager) ChangePassword(username, password string) error

func (DefaultManager) ConsoleSession

func (m DefaultManager) ConsoleSession(token string) (*shipyard.ConsoleSession, error)

func (DefaultManager) Container

func (DefaultManager) CreateConsoleSession

func (m DefaultManager) CreateConsoleSession(c *shipyard.ConsoleSession) error

func (DefaultManager) DeleteAccount

func (m DefaultManager) DeleteAccount(account *auth.Account) error

func (DefaultManager) DeleteWebhookKey

func (m DefaultManager) DeleteWebhookKey(id string) error

func (DefaultManager) DockerClient

func (m DefaultManager) DockerClient() *dockerclient.DockerClient

func (DefaultManager) Events

func (m DefaultManager) Events(limit int) ([]*shipyard.Event, error)

func (DefaultManager) GetAuthenticator

func (m DefaultManager) GetAuthenticator() auth.Authenticator

func (DefaultManager) NewAuthToken

func (m DefaultManager) NewAuthToken(username string, userAgent string) (*auth.AuthToken, error)

func (DefaultManager) NewServiceKey

func (m DefaultManager) NewServiceKey(description string) (*auth.ServiceKey, error)

func (DefaultManager) NewWebhookKey

func (m DefaultManager) NewWebhookKey(image string) (*dockerhub.WebhookKey, error)

func (DefaultManager) Node

func (m DefaultManager) Node(name string) (*shipyard.Node, error)

func (DefaultManager) Nodes

func (m DefaultManager) Nodes() ([]*shipyard.Node, error)

func (DefaultManager) PurgeEvents

func (m DefaultManager) PurgeEvents() error

func (DefaultManager) Registries

func (m DefaultManager) Registries() ([]*shipyard.Registry, error)

func (DefaultManager) Registry

func (m DefaultManager) Registry(name string) (*shipyard.Registry, error)

func (DefaultManager) RemoveConsoleSession

func (m DefaultManager) RemoveConsoleSession(c *shipyard.ConsoleSession) error

func (DefaultManager) RemoveRegistry

func (m DefaultManager) RemoveRegistry(registry *shipyard.Registry) error

func (DefaultManager) RemoveServiceKey

func (m DefaultManager) RemoveServiceKey(key string) error

func (DefaultManager) Role

func (m DefaultManager) Role(name string) (*auth.ACL, error)

func (DefaultManager) Roles

func (m DefaultManager) Roles() ([]*auth.ACL, error)

func (DefaultManager) SaveAccount

func (m DefaultManager) SaveAccount(account *auth.Account) error

func (DefaultManager) SaveEvent

func (m DefaultManager) SaveEvent(event *shipyard.Event) error

func (DefaultManager) SaveServiceKey

func (m DefaultManager) SaveServiceKey(key *auth.ServiceKey) error

func (DefaultManager) SaveWebhookKey

func (m DefaultManager) SaveWebhookKey(key *dockerhub.WebhookKey) error

func (DefaultManager) ScaleContainer

func (m DefaultManager) ScaleContainer(id string, numInstances int) ScaleResult

func (DefaultManager) ServiceKey

func (m DefaultManager) ServiceKey(key string) (*auth.ServiceKey, error)

func (DefaultManager) ServiceKeys

func (m DefaultManager) ServiceKeys() ([]*auth.ServiceKey, error)

func (DefaultManager) Store

func (m DefaultManager) Store() *sessions.CookieStore

func (DefaultManager) StoreKey

func (m DefaultManager) StoreKey() string

func (DefaultManager) ValidateConsoleSessionToken

func (m DefaultManager) ValidateConsoleSessionToken(containerId string, token string) bool

func (DefaultManager) VerifyAuthToken

func (m DefaultManager) VerifyAuthToken(username, token string) error

func (DefaultManager) VerifyServiceKey

func (m DefaultManager) VerifyServiceKey(key string) error

func (DefaultManager) WebhookKey

func (m DefaultManager) WebhookKey(key string) (*dockerhub.WebhookKey, error)

func (DefaultManager) WebhookKeys

func (m DefaultManager) WebhookKeys() ([]*dockerhub.WebhookKey, error)

type EventHandler

type EventHandler struct {
	Manager Manager

func (*EventHandler) Handle

func (h *EventHandler) Handle(e *dockerclient.Event) error

type Manager

type Manager interface {
	Accounts() ([]*auth.Account, error)
	Account(username string) (*auth.Account, error)
	Authenticate(username, password string) (bool, error)
	GetAuthenticator() auth.Authenticator
	SaveAccount(account *auth.Account) error
	DeleteAccount(account *auth.Account) error
	Roles() ([]*auth.ACL, error)
	Role(name string) (*auth.ACL, error)
	Store() *sessions.CookieStore
	StoreKey() string
	Container(id string) (*dockerclient.ContainerInfo, error)
	ScaleContainer(id string, numInstances int) ScaleResult
	SaveServiceKey(key *auth.ServiceKey) error
	RemoveServiceKey(key string) error
	SaveEvent(event *shipyard.Event) error
	Events(limit int) ([]*shipyard.Event, error)
	PurgeEvents() error
	ServiceKey(key string) (*auth.ServiceKey, error)
	ServiceKeys() ([]*auth.ServiceKey, error)
	NewAuthToken(username string, userAgent string) (*auth.AuthToken, error)
	VerifyAuthToken(username, token string) error
	VerifyServiceKey(key string) error
	NewServiceKey(description string) (*auth.ServiceKey, error)
	ChangePassword(username, password string) error
	WebhookKey(key string) (*dockerhub.WebhookKey, error)
	WebhookKeys() ([]*dockerhub.WebhookKey, error)
	NewWebhookKey(image string) (*dockerhub.WebhookKey, error)
	SaveWebhookKey(key *dockerhub.WebhookKey) error
	DeleteWebhookKey(id string) error
	DockerClient() *dockerclient.DockerClient

	Nodes() ([]*shipyard.Node, error)
	Node(name string) (*shipyard.Node, error)

	AddRegistry(registry *shipyard.Registry) error
	RemoveRegistry(registry *shipyard.Registry) error
	Registries() ([]*shipyard.Registry, error)
	Registry(name string) (*shipyard.Registry, error)

	CreateConsoleSession(c *shipyard.ConsoleSession) error
	RemoveConsoleSession(c *shipyard.ConsoleSession) error
	ConsoleSession(token string) (*shipyard.ConsoleSession, error)
	ValidateConsoleSessionToken(containerId, token string) bool

func NewManager

func NewManager(addr string, database string, authKey string, client *dockerclient.DockerClient, disableUsageInfo bool, authenticator auth.Authenticator) (Manager, error)

type ScaleResult

type ScaleResult struct {
	Scaled []string
	Errors []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL