cmd

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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
	}
)
View Source
var (
	// AcceptCmd is root for various `accept ...` commands
	AcceptCmd = &cobra.Command{
		Use:   "accept",
		Short: "Accept invites",
		Run:   ShowUsage,
	}
)
View Source
var (
	// AddCmd is root for various `add ...` commands
	AddCmd = &cobra.Command{
		Use:   "add",
		Short: "Add resources",
		Run:   ShowUsage,
	}
)
View Source
var (
	// BackupCmd is root for various `backup ...` commands
	BackupCmd = &cobra.Command{
		Use:   "backup",
		Short: "Backup commands",
		Run:   ShowUsage,
	}
)
View Source
var (
	// CreateCmd is root for various `create ...` commands
	CreateCmd = &cobra.Command{
		Use:   "create",
		Short: "Create resources",
		Run:   ShowUsage,
	}
)
View Source
var (
	// DeleteCmd is root for various `delete ...` commands
	DeleteCmd = &cobra.Command{
		Use:   "delete",
		Short: "Delete resources",
		Run:   ShowUsage,
	}
)
View Source
var (
	// GenerateCmd is root for various `generate ...` commands
	GenerateCmd = &cobra.Command{
		Use:                "generate-docs",
		Short:              "Generate output",
		Run:                generateMarkdownRun,
		DisableAutoGenTag:  true,
		DisableSuggestions: true,
	}
)
View Source
var (
	// GetCmd is root for various `get ...` commands
	GetCmd = &cobra.Command{
		Use:   "get",
		Short: "Get information",
		Run:   ShowUsage,
	}
)
View Source
var (
	// GetServerCmd is based for other commands
	GetServerCmd = &cobra.Command{
		Use:   "server",
		Short: "Get server information",
		Run:   ShowUsage,
	}
)
View Source
var (
	// ListArangoDBCmd is based for other commands
	ListArangoDBCmd = &cobra.Command{
		Use:   "arangodb",
		Short: "List ArangoDB information",
		Run:   ShowUsage,
	}
)
View Source
var (
	// ListCmd is root for various `list ...` commands
	ListCmd = &cobra.Command{
		Use:   "list",
		Short: "List resources",
		Run:   ShowUsage,
	}
)
View Source
var (
	// ListEffectiveCmd is based for other commands
	ListEffectiveCmd = &cobra.Command{
		Use:   "effective",
		Short: "List effective information",
		Run:   ShowUsage,
	}
)
View Source
var (
	// ListServersCmd is based for other commands
	ListServersCmd = &cobra.Command{
		Use:   "servers",
		Short: "List servers information",
		Run:   ShowUsage,
	}
)
View Source
var (
	// LoginCmd is used to login using an API key
	LoginCmd = &cobra.Command{
		Use: "login",
		Run: ShowUsage,
	}
)
View Source
var (
	// RejectCmd is root for various `reject ...` commands
	RejectCmd = &cobra.Command{
		Use:   "reject",
		Short: "Reject invites",
		Run:   ShowUsage,
	}
)
View Source
var (
	// RevokeCmd is root for various `revoke ...` commands
	RevokeCmd = &cobra.Command{
		Use:   "revoke",
		Short: "Revoke keys & tokens",
		Run:   ShowUsage,
	}
)
View Source
var (
	// UpdateCmd is root for various `update ...` commands
	UpdateCmd = &cobra.Command{
		Use:   "update",
		Short: "Update resources",
		Run:   ShowUsage,
	}
)
View Source
var (
	// WaitCmd is root for various `wait ...` commands
	WaitCmd = &cobra.Command{
		Use:   "wait",
		Short: "Wait for a status change",
		Run:   ShowUsage,
	}
)

Functions

func ContextWithToken

func ContextWithToken() context.Context

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 DefaultURL

func DefaultURL() string

DefaultURL returns the default value for a URL

func InitCommand

func InitCommand(parent, cmd *cobra.Command, flagInit func(c *cobra.Command, f *flag.FlagSet))

InitCommand adds the given command to the given parent and called the flag initialization function.

func MustCheckNumberOfArgs

func MustCheckNumberOfArgs(args []string, expectedNumberOfArgs int)

MustCheckNumberOfArgs compares the number of arguments with the expected number of arguments. If there is a difference a fatal error is raised.

func MustDialAPI

func MustDialAPI() *grpc.ClientConn

MustDialAPI dials the ArangoDB Oasis API

func OptOption

func OptOption(key, value string, args []string, argIndex int) (string, int)

OptOption returns given value if not empty. Returns: option-value, number-of-args-used(0|argIndex+1)

func ReqOption

func ReqOption(key, value string, args []string, argIndex int) (string, int)

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

func ShowUsage

func ShowUsage(cmd *cobra.Command, args []string)

ShowUsage shows usage of the given command on stdout.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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