Documentation ¶
Index ¶
- Variables
- func ContextWithToken() context.Context
- func DefaultCACertificate() string
- func DefaultDeployment() string
- func DefaultFormat() string
- func DefaultGroup() string
- func DefaultIPWhitelist() string
- func DefaultOrganization() string
- func DefaultOrganizationInvite() string
- func DefaultProject() string
- func DefaultProvider() string
- func DefaultRegion() string
- func DefaultRole() string
- func DefaultURL() string
- func InitCommand(parent, cmd *cobra.Command, flagInit func(c *cobra.Command, f *flag.FlagSet))
- func MustCheckNumberOfArgs(args []string, expectedNumberOfArgs int)
- func MustDialAPI() *grpc.ClientConn
- func OptOption(key, value string, args []string, argIndex int) (string, int)
- func ReqOption(key, value string, args []string, argIndex int) (string, int)
- func SetVersion(releaseVersion string)
- func ShowUsage(cmd *cobra.Command, args []string)
Constants ¶
This section is empty.
Variables ¶
var ( // RootCmd is the root (and only) command of this service RootCmd = &cobra.Command{ Use: "oasisctl", Short: "ArangoDB Oasis", Long: "ArangoDB Oasis. The Managed Cloud for ArangoDB", Run: ShowUsage, PersistentPreRun: rootCmdPersistentPreRun, } CLILog = zerolog.New(zerolog.ConsoleWriter{ Out: os.Stderr, NoColor: !supportsColor(), }).With().Timestamp().Logger() RootArgs struct { Format format.Options // contains filtered or unexported fields } )
var ( // AcceptCmd is root for various `accept ...` commands AcceptCmd = &cobra.Command{ Use: "accept", Short: "Accept invites", Run: ShowUsage, } )
var ( // AddCmd is root for various `add ...` commands AddCmd = &cobra.Command{ Use: "add", Short: "Add resources", Run: ShowUsage, } )
var ( // BackupCmd is root for various `backup ...` commands BackupCmd = &cobra.Command{ Use: "backup", Short: "Backup commands", Run: ShowUsage, } )
var ( // CreateCmd is root for various `create ...` commands CreateCmd = &cobra.Command{ Use: "create", Short: "Create resources", Run: ShowUsage, } )
var ( // DeleteCmd is root for various `delete ...` commands DeleteCmd = &cobra.Command{ Use: "delete", Short: "Delete resources", Run: ShowUsage, } )
var ( // GenerateCmd is root for various `generate ...` commands GenerateCmd = &cobra.Command{ Use: "generate-docs", Short: "Generate output", Run: generateMarkdownRun, DisableAutoGenTag: true, DisableSuggestions: true, } )
var ( // GetCmd is root for various `get ...` commands GetCmd = &cobra.Command{ Use: "get", Short: "Get information", Run: ShowUsage, } )
var ( // GetServerCmd is based for other commands GetServerCmd = &cobra.Command{ Use: "server", Short: "Get server information", Run: ShowUsage, } )
var ( // ListArangoDBCmd is based for other commands ListArangoDBCmd = &cobra.Command{ Use: "arangodb", Short: "List ArangoDB information", Run: ShowUsage, } )
var ( // ListCmd is root for various `list ...` commands ListCmd = &cobra.Command{ Use: "list", Short: "List resources", Run: ShowUsage, } )
var ( // ListEffectiveCmd is based for other commands ListEffectiveCmd = &cobra.Command{ Use: "effective", Short: "List effective information", Run: ShowUsage, } )
var ( // ListServersCmd is based for other commands ListServersCmd = &cobra.Command{ Use: "servers", Short: "List servers information", Run: ShowUsage, } )
var ( // LoginCmd is used to login using an API key LoginCmd = &cobra.Command{ Use: "login", Run: ShowUsage, } )
var ( // RejectCmd is root for various `reject ...` commands RejectCmd = &cobra.Command{ Use: "reject", Short: "Reject invites", Run: ShowUsage, } )
var ( // RevokeCmd is root for various `revoke ...` commands RevokeCmd = &cobra.Command{ Use: "revoke", Short: "Revoke keys & tokens", Run: ShowUsage, } )
var ( // UpdateCmd is root for various `update ...` commands UpdateCmd = &cobra.Command{ Use: "update", Short: "Update resources", Run: ShowUsage, } )
var ( // WaitCmd is root for various `wait ...` commands WaitCmd = &cobra.Command{ Use: "wait", Short: "Wait for a status change", Run: ShowUsage, } )
Functions ¶
func ContextWithToken ¶
ContextWithToken returns a context with access token in it.
func DefaultCACertificate ¶
func DefaultCACertificate() string
DefaultCACertificate returns the default value for a CA certificate identifier
func DefaultDeployment ¶
func DefaultDeployment() string
DefaultDeployment returns the default value for a deployment identifier
func DefaultFormat ¶
func DefaultFormat() string
DefaultFormat returns the default value for the output format
func DefaultGroup ¶
func DefaultGroup() string
DefaultGroup returns the default value for a group identifier
func DefaultIPWhitelist ¶
func DefaultIPWhitelist() string
DefaultIPWhitelist returns the default value for an IP whitelist identifier
func DefaultOrganization ¶
func DefaultOrganization() string
DefaultOrganization returns the default value for an organization identifier
func DefaultOrganizationInvite ¶
func DefaultOrganizationInvite() string
DefaultOrganizationInvite returns the default value for an organization-invite identifier
func DefaultProject ¶
func DefaultProject() string
DefaultProject returns the default value for a project identifier
func DefaultProvider ¶
func DefaultProvider() string
DefaultProvider returns the default value for a provider identifier
func DefaultRegion ¶
func DefaultRegion() string
DefaultRegion returns the default value for a region identifier
func DefaultRole ¶
func DefaultRole() string
DefaultRole returns the default value for a role identifier
func InitCommand ¶
InitCommand adds the given command to the given parent and called the flag initialization function.
func MustCheckNumberOfArgs ¶
MustCheckNumberOfArgs compares the number of arguments with the expected number of arguments. If there is a difference a fatal error is raised.
func OptOption ¶
OptOption returns given value if not empty. Returns: option-value, number-of-args-used(0|argIndex+1)
func ReqOption ¶
ReqOption returns given value if not empty. Fails with clear error message when not set. Returns: option-value, number-of-args-used(0|argIndex+1)
func SetVersion ¶
func SetVersion(releaseVersion string)
SetVersion must be called at bootstrap to pass the current build version
Types ¶
This section is empty.