Documentation
¶
Index ¶
- func Account(flagName string) func(*app.Context) error
- func Auth(c *app.Context) (err error)
- func Definitions(c *app.Context) (err error)
- func Disc(vmFlagName, discFlagName string) func(*app.Context) error
- func EnsureAuth(client lib.Client, config config.Manager) error
- func Group(flagName string) func(*app.Context) error
- func Privilege(flagName string) func(*app.Context) error
- func RequiredFlags(flagNames ...string) func(*app.Context) error
- func User(flagName string) func(*app.Context) error
- func VirtualMachine(flagName string) func(*app.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Account ¶
Account gets an account name from a flag, then the account details from the API, then stitches it to the context
func Auth ¶
Auth makes sure authentication has been successfully completed, attempting it if necessary.
func Definitions ¶
Definitions gets the Definitions from the brain and attaches them to the app.Context.
func Disc ¶
Disc gets a VirtualMachineName from a flag and a disc from another, then gets the named Disc from the brain and attaches it to the app.Context.
func EnsureAuth ¶
EnsureAuth authenticates with the Bytemark authentication server, prompting for credentials if necessary.
func Group ¶
Group gets a GroupName from a flag, then gets the named Group from the brain and attaches it to the app.Context.
func Privilege ¶
Privilege gets the named PrivilegeFlag from the context, then resolves its target to an ID if needed to create a brain.Privilege, then attaches that to the context
func RequiredFlags ¶
RequiredFlags makes sure that the named flags are not their zero-values. (or that VirtualMachineName / GroupName flags have the full complement of values needed)
Types ¶
This section is empty.