Documentation ¶
Index ¶
- Constants
- func NewSuperCommand() cmd.Command
- type DestroyCommand
- type DestroyEnvironmentAPI
- type EnvGetConstraintsCommand
- type EnvSetConstraintsCommand
- type GetCommand
- type GetEnvironmentAPI
- type JenvCommand
- type RetryProvisioningAPI
- type RetryProvisioningCommand
- type SetCommand
- type SetEnvironmentAPI
- type ShareCommand
- type ShareEnvironmentAPI
- type UnsetCommand
- type UnsetEnvironmentAPI
- type UnshareCommand
- type UnshareEnvironmentAPI
- type UserInfo
- type UsersAPI
- type UsersCommand
Constants ¶
const ListCommandDoc = `List all users with access to the current environment`
Variables ¶
This section is empty.
Functions ¶
func NewSuperCommand ¶
NewSuperCommand creates the environment supercommand and registers the subcommands that it supports.
Types ¶
type DestroyCommand ¶
type DestroyCommand struct { envcmd.EnvCommandBase // contains filtered or unexported fields }
DestroyCommand destroys the specified environment.
func (*DestroyCommand) Info ¶
func (c *DestroyCommand) Info() *cmd.Info
Info implements Command.Info.
func (*DestroyCommand) Init ¶
func (c *DestroyCommand) Init(args []string) error
Init implements Command.Init.
func (*DestroyCommand) Run ¶
func (c *DestroyCommand) Run(ctx *cmd.Context) error
Run implements Command.Run
func (*DestroyCommand) SetFlags ¶
func (c *DestroyCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type DestroyEnvironmentAPI ¶
DestroyEnvironmentAPI defines the methods on the environmentmanager API that the destroy command calls. It is exported for mocking in tests.
type EnvGetConstraintsCommand ¶
type EnvGetConstraintsCommand struct {
common.GetConstraintsCommand
}
EnvGetConstraintsCommand shows the constraints for an environment. It is just a wrapper for the common GetConstraintsCommand and enforces that no service arguments are passed in.
func (*EnvGetConstraintsCommand) Info ¶
func (c *EnvGetConstraintsCommand) Info() *cmd.Info
func (*EnvGetConstraintsCommand) Init ¶
func (c *EnvGetConstraintsCommand) Init(args []string) error
type EnvSetConstraintsCommand ¶
type EnvSetConstraintsCommand struct {
common.SetConstraintsCommand
}
EnvSetConstraintsCommand sets the constraints for an environment. It is just a wrapper for the common SetConstraintsCommand and enforces that no service arguments are passed in.
func (*EnvSetConstraintsCommand) Info ¶
func (c *EnvSetConstraintsCommand) Info() *cmd.Info
func (*EnvSetConstraintsCommand) Init ¶
func (c *EnvSetConstraintsCommand) Init(args []string) (err error)
func (*EnvSetConstraintsCommand) SetFlags ¶
func (c *EnvSetConstraintsCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags overrides SetFlags for SetConstraintsCommand since that will register a flag to specify the service.
type GetCommand ¶
type GetCommand struct { envcmd.EnvCommandBase // contains filtered or unexported fields }
GetCommand is able to output either the entire environment or the requested value in a format of the user's choosing.
func (*GetCommand) Info ¶
func (c *GetCommand) Info() *cmd.Info
func (*GetCommand) Init ¶
func (c *GetCommand) Init(args []string) (err error)
func (*GetCommand) SetFlags ¶
func (c *GetCommand) SetFlags(f *gnuflag.FlagSet)
type GetEnvironmentAPI ¶
type JenvCommand ¶
type JenvCommand struct { cmd.CommandBase // contains filtered or unexported fields }
JenvCommand imports the given Juju generated jenv file into the local JUJU_HOME environments directory.
func (*JenvCommand) Info ¶
func (c *JenvCommand) Info() *cmd.Info
func (*JenvCommand) Init ¶
func (c *JenvCommand) Init(args []string) error
type RetryProvisioningAPI ¶
type RetryProvisioningAPI interface { Close() error RetryProvisioning(machines ...names.MachineTag) ([]params.ErrorResult, error) }
RetryProvisioningAPI defines methods on the client API that the retry-provisioning command calls.
type RetryProvisioningCommand ¶
type RetryProvisioningCommand struct { envcmd.EnvCommandBase Machines []names.MachineTag // contains filtered or unexported fields }
RetryProvisioningCommand updates machines' error status to tell the provisoner that it should try to re-provision the machine.
func (*RetryProvisioningCommand) Info ¶
func (c *RetryProvisioningCommand) Info() *cmd.Info
func (*RetryProvisioningCommand) Init ¶
func (c *RetryProvisioningCommand) Init(args []string) error
type SetCommand ¶
type SetCommand struct { envcmd.EnvCommandBase // contains filtered or unexported fields }
func (*SetCommand) Info ¶
func (c *SetCommand) Info() *cmd.Info
func (*SetCommand) Init ¶
func (c *SetCommand) Init(args []string) (err error)
type SetEnvironmentAPI ¶
type ShareCommand ¶
ShareCommand represents the command to share an environment with a user(s).
func (*ShareCommand) Init ¶
func (c *ShareCommand) Init(args []string) (err error)
type ShareEnvironmentAPI ¶
type ShareEnvironmentAPI interface {}
ShareEnvironmentAPI defines the API functions used by the environment share command.
type UnsetCommand ¶
type UnsetCommand struct { envcmd.EnvCommandBase // contains filtered or unexported fields }
func (*UnsetCommand) Info ¶
func (c *UnsetCommand) Info() *cmd.Info
func (*UnsetCommand) Init ¶
func (c *UnsetCommand) Init(args []string) (err error)
type UnsetEnvironmentAPI ¶
type UnshareCommand ¶
UnshareCommand unshares an environment with the given user(s).
func (*UnshareCommand) Info ¶
func (c *UnshareCommand) Info() *cmd.Info
func (*UnshareCommand) Init ¶
func (c *UnshareCommand) Init(args []string) (err error)
type UnshareEnvironmentAPI ¶
type UnshareEnvironmentAPI interface {}
UnshareEnvironmentAPI defines the API functions used by the environment unshare command.
type UserInfo ¶
type UserInfo struct { Username string `yaml:"user-name" json:"user-name"` DateCreated string `yaml:"date-created" json:"date-created"` LastConnection string `yaml:"last-connection" json:"last-connection"` }
UserInfo defines the serialization behaviour of the user information.
type UsersAPI ¶
type UsersAPI interface { Close() error EnvironmentUserInfo() ([]params.EnvUserInfo, error) }
UsersAPI defines the methods on the client API that the users command calls.
type UsersCommand ¶
type UsersCommand struct { envcmd.EnvCommandBase // contains filtered or unexported fields }
UsersCommand shows all the users with access to the current environment.
func (*UsersCommand) Run ¶
func (c *UsersCommand) Run(ctx *cmd.Context) (err error)
Run implements Command.Run.
func (*UsersCommand) SetFlags ¶
func (c *UsersCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.