Documentation ¶
Index ¶
- func NewEnvironment() *cli.Environment
- func NewTestServer(cluster Cluster) *httptest.Server
- type Cluster
- type Context
- func (ctx *Context) Cluster() (*config.Cluster, error)
- func (ctx *Context) Clusters() ([]*config.Cluster, error)
- func (ctx *Context) Logger() *logrus.Logger
- func (ctx *Context) LoggerHook() *logrustest.Hook
- func (ctx *Context) SetCluster(cluster *config.Cluster)
- func (ctx *Context) SetClusters(clusters []*config.Cluster)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnvironment ¶
func NewEnvironment() *cli.Environment
NewEnvironment returns an environment which acts as a "black hole".
func NewTestServer ¶
NewTestServer creates a new HTTP test server based on a Cluster.
Types ¶
type Cluster ¶
type Cluster struct { Version string LoginProviders login.Providers AuthChallenge string Links []*linker.Link }
Cluster is the mock definition for a DC/OS cluster.
type Context ¶
Context is an api.Context which can be mocked.
func NewContext ¶
func NewContext(environment *cli.Environment) *Context
NewContext returns a new mock context.
func (*Context) LoggerHook ¶
func (ctx *Context) LoggerHook() *logrustest.Hook
LoggerHook returns the logger hook.
func (*Context) SetCluster ¶
SetCluster sets the current CLI cluster.
func (*Context) SetClusters ¶
SetClusters sets the CLI clusters.
Click to show internal directories.
Click to hide internal directories.