with

package
v3.0.0-...-c77a060 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account

func Account(flagName string) func(*app.Context) error

Account gets an account name from a flag, then the account details from the API, then stitches it to the context

func Auth

func Auth(c *app.Context) (err error)

Auth makes sure authentication has been successfully completed, attempting it if necessary.

func Definitions

func Definitions(c *app.Context) (err error)

Definitions gets the Definitions from the brain and attaches them to the app.Context.

func Disc

func Disc(vmFlagName, discFlagName string) func(*app.Context) error

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

func EnsureAuth(client lib.Client, config config.Manager) error

EnsureAuth authenticates with the Bytemark authentication server, prompting for credentials if necessary.

func Group

func Group(flagName string) func(*app.Context) error

Group gets a GroupName from a flag, then gets the named Group from the brain and attaches it to the app.Context.

func Privilege

func Privilege(flagName string) func(*app.Context) error

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

func RequiredFlags(flagNames ...string) func(*app.Context) error

RequiredFlags makes sure that the named flags are not their zero-values. (or that VirtualMachineName / GroupName flags have the full complement of values needed)

func User

func User(flagName string) func(*app.Context) error

User gets a username from the given flag, then gets the corresponding User from the brain, and attaches it to the app.Context.

func VirtualMachine

func VirtualMachine(flagName string) func(*app.Context) error

VirtualMachine gets a VirtualMachineName from a flag, then gets the named VirtualMachine from the brain and attaches it to the app.Context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL