Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSubCommand ¶
func RegisterSubCommand(newCommand func(CharmstoreSpec) cmd.Command)
RegisterSubCommand adds the provided func to the set of those that will be called when the juju command runs. Each returned command will be registered with the identified "juju" sub-supercommand.
Types ¶
type CharmstoreSpec ¶
type CharmstoreSpec interface { // Connect connects to the specified charm store. Connect(ctx *cmd.Context) (charmstore.Client, io.Closer, error) }
CharmstoreSpec provides the functionality needed to open a charm store client.
type Command ¶
type Command struct {
cmd.SuperCommand
}
Command is the top-level command wrapping all charm functionality.
func NewSuperCommand ¶
func NewSuperCommand() *Command
NewSuperCommand returns a new charm super-command.
type CommandBase ¶
type CommandBase struct { // TODO(ericsnow) This should be a modelcmd.ModelCommandBase. cmd.CommandBase // contains filtered or unexported fields }
CommandBase is the type that should be embedded in "juju charm" sub-commands.
func NewCommandBase ¶
func NewCommandBase(spec CharmstoreSpec) *CommandBase
NewCommandBase returns a new CommandBase.
func (*CommandBase) Connect ¶
func (c *CommandBase) Connect(ctx *cmd.Context) (charmstore.Client, io.Closer, error)
Connect implements CommandBase.
Click to show internal directories.
Click to hide internal directories.