Documentation ¶
Index ¶
- Variables
- type MockManager
- func (m MockManager) Account(username string) (*auth.Account, error)
- func (m MockManager) Accounts() ([]*auth.Account, error)
- func (m MockManager) AddRegistry(registry *shipyard.Registry) error
- func (m MockManager) Authenticate(username, password string) (bool, error)
- func (m MockManager) ChangePassword(username, password string) error
- func (m MockManager) ConsoleSession(token string) (*shipyard.ConsoleSession, error)
- func (m MockManager) Container(id string) (*dockerclient.ContainerInfo, error)
- func (m MockManager) CreateConsoleSession(c *shipyard.ConsoleSession) error
- func (m MockManager) DeleteAccount(account *auth.Account) error
- func (m MockManager) DeleteRepository(name string) error
- func (m MockManager) DeleteWebhookKey(id string) error
- func (m MockManager) DockerClient() *dockerclient.DockerClient
- func (m MockManager) Events(limit int) ([]*shipyard.Event, error)
- func (m MockManager) GetAuthenticator() auth.Authenticator
- func (m MockManager) NewAuthToken(username, userAgent string) (*auth.AuthToken, error)
- func (m MockManager) NewServiceKey(description string) (*auth.ServiceKey, error)
- func (m MockManager) NewWebhookKey(image string) (*dockerhub.WebhookKey, error)
- func (m MockManager) Node(name string) (*shipyard.Node, error)
- func (m MockManager) Nodes() ([]*shipyard.Node, error)
- func (m MockManager) PurgeEvents() error
- func (m MockManager) Registries() ([]*shipyard.Registry, error)
- func (m MockManager) Registry(name string) (*shipyard.Registry, error)
- func (m MockManager) RemoveConsoleSession(c *shipyard.ConsoleSession) error
- func (m MockManager) RemoveRegistry(registry *shipyard.Registry) error
- func (m MockManager) RemoveServiceKey(key string) error
- func (m MockManager) Repositories() ([]*registry.Repository, error)
- func (m MockManager) Repository(name string) (*registry.Repository, error)
- func (m MockManager) Role(name string) (*auth.ACL, error)
- func (m MockManager) Roles() ([]*auth.ACL, error)
- func (m MockManager) SaveAccount(account *auth.Account) error
- func (m MockManager) SaveEvent(event *shipyard.Event) error
- func (m MockManager) SaveServiceKey(key *auth.ServiceKey) error
- func (m MockManager) SaveWebhookKey(key *dockerhub.WebhookKey) error
- func (m MockManager) ScaleContainer(id string, numInstances int) manager.ScaleResult
- func (m MockManager) ServiceKey(key string) (*auth.ServiceKey, error)
- func (m MockManager) ServiceKeys() ([]*auth.ServiceKey, error)
- func (m MockManager) Store() *sessions.CookieStore
- func (m MockManager) StoreKey() string
- func (m MockManager) ValidateConsoleSessionToken(containerId, token string) bool
- func (m MockManager) VerifyAuthToken(username, token string) error
- func (m MockManager) VerifyServiceKey(key string) error
- func (m MockManager) WebhookKey(key string) (*dockerhub.WebhookKey, error)
- func (m MockManager) WebhookKeys() ([]*dockerhub.WebhookKey, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TestContainerId = "1234567890abcdefg" TestContainerName = "test-container" TestContainerImage = "test-image" TestRegistry = &shipyard.Registry{ ID: "0", Name: "test-registry", Addr: "http://localhost:5000", } TestRepository = ®istry.Repository{} TestContainerInfo = &dockerclient.ContainerInfo{ Id: TestContainerId, Created: string(time.Now().UnixNano()), Name: TestContainerName, Image: TestContainerImage, } TestNode = &shipyard.Node{ ID: "0", Name: "testnode", Addr: "tcp://127.0.0.1:3375", } TestAccount = &auth.Account{ ID: "0", Username: "testuser", Password: "test", } TestEvent = &shipyard.Event{ Type: "test-event", ContainerInfo: TestContainerInfo, Message: "test message", Tags: []string{"test-tag"}, } TestServiceKey = &auth.ServiceKey{ Key: "test-key", Description: "Test Key", } TestWebhookKey = &dockerhub.WebhookKey{ ID: "1234", Image: "ehazlett/test", Key: "abcdefg", } TestConsoleSession = &shipyard.ConsoleSession{ ID: "0", ContainerID: "abcdefg", Token: "1234567890", } )
Functions ¶
This section is empty.
Types ¶
type MockManager ¶
type MockManager struct{}
func (MockManager) AddRegistry ¶
func (m MockManager) AddRegistry(registry *shipyard.Registry) error
func (MockManager) Authenticate ¶
func (m MockManager) Authenticate(username, password string) (bool, error)
func (MockManager) ChangePassword ¶
func (m MockManager) ChangePassword(username, password string) error
func (MockManager) ConsoleSession ¶
func (m MockManager) ConsoleSession(token string) (*shipyard.ConsoleSession, error)
func (MockManager) Container ¶
func (m MockManager) Container(id string) (*dockerclient.ContainerInfo, error)
func (MockManager) CreateConsoleSession ¶
func (m MockManager) CreateConsoleSession(c *shipyard.ConsoleSession) error
func (MockManager) DeleteAccount ¶
func (m MockManager) DeleteAccount(account *auth.Account) error
func (MockManager) DeleteRepository ¶
func (m MockManager) DeleteRepository(name string) error
func (MockManager) DeleteWebhookKey ¶
func (m MockManager) DeleteWebhookKey(id string) error
func (MockManager) DockerClient ¶
func (m MockManager) DockerClient() *dockerclient.DockerClient
func (MockManager) GetAuthenticator ¶
func (m MockManager) GetAuthenticator() auth.Authenticator
func (MockManager) NewAuthToken ¶
func (m MockManager) NewAuthToken(username, userAgent string) (*auth.AuthToken, error)
func (MockManager) NewServiceKey ¶
func (m MockManager) NewServiceKey(description string) (*auth.ServiceKey, error)
func (MockManager) NewWebhookKey ¶
func (m MockManager) NewWebhookKey(image string) (*dockerhub.WebhookKey, error)
func (MockManager) PurgeEvents ¶
func (m MockManager) PurgeEvents() error
func (MockManager) Registries ¶
func (m MockManager) Registries() ([]*shipyard.Registry, error)
func (MockManager) Registry ¶
func (m MockManager) Registry(name string) (*shipyard.Registry, error)
func (MockManager) RemoveConsoleSession ¶
func (m MockManager) RemoveConsoleSession(c *shipyard.ConsoleSession) error
func (MockManager) RemoveRegistry ¶
func (m MockManager) RemoveRegistry(registry *shipyard.Registry) error
func (MockManager) RemoveServiceKey ¶
func (m MockManager) RemoveServiceKey(key string) error
func (MockManager) Repositories ¶
func (m MockManager) Repositories() ([]*registry.Repository, error)
func (MockManager) Repository ¶
func (m MockManager) Repository(name string) (*registry.Repository, error)
func (MockManager) SaveAccount ¶
func (m MockManager) SaveAccount(account *auth.Account) error
func (MockManager) SaveServiceKey ¶
func (m MockManager) SaveServiceKey(key *auth.ServiceKey) error
func (MockManager) SaveWebhookKey ¶
func (m MockManager) SaveWebhookKey(key *dockerhub.WebhookKey) error
func (MockManager) ScaleContainer ¶
func (m MockManager) ScaleContainer(id string, numInstances int) manager.ScaleResult
func (MockManager) ServiceKey ¶
func (m MockManager) ServiceKey(key string) (*auth.ServiceKey, error)
func (MockManager) ServiceKeys ¶
func (m MockManager) ServiceKeys() ([]*auth.ServiceKey, error)
func (MockManager) Store ¶
func (m MockManager) Store() *sessions.CookieStore
func (MockManager) StoreKey ¶
func (m MockManager) StoreKey() string
func (MockManager) ValidateConsoleSessionToken ¶
func (m MockManager) ValidateConsoleSessionToken(containerId, token string) bool
func (MockManager) VerifyAuthToken ¶
func (m MockManager) VerifyAuthToken(username, token string) error
func (MockManager) VerifyServiceKey ¶
func (m MockManager) VerifyServiceKey(key string) error
func (MockManager) WebhookKey ¶
func (m MockManager) WebhookKey(key string) (*dockerhub.WebhookKey, error)
func (MockManager) WebhookKeys ¶
func (m MockManager) WebhookKeys() ([]*dockerhub.WebhookKey, error)
Click to show internal directories.
Click to hide internal directories.