cli

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingOrgID = fmt.Errorf(requiredF, flag.OrgID)

Functions

func DeploymentStatus added in v1.0.0

func DeploymentStatus(baseURL, projectID string) string

Types

type DeleteOpts added in v1.0.0

type DeleteOpts struct {
	Entry   string
	Confirm bool
	// contains filtered or unexported fields
}

DeleteOpts options required when deleting a resource. A command can compose this struct and then safely rely on the methods Prompt, or Delete to manage the interactions with the user

func NewDeleteOpts added in v1.0.0

func NewDeleteOpts(successMsg, failMsg string) *DeleteOpts

func (*DeleteOpts) Delete added in v1.0.0

func (opts *DeleteOpts) Delete(d interface{}, a ...string) error

Delete deletes a resource not associated to a project, it expects a callback that should perform the deletion from the store.

func (*DeleteOpts) FailMessage added in v1.0.0

func (opts *DeleteOpts) FailMessage() string

FailMessage gets the set fail message or the default value

func (*DeleteOpts) Prompt added in v1.0.0

func (opts *DeleteOpts) Prompt() error

Prompt confirms that the resource should be deleted

func (*DeleteOpts) SuccessMessage added in v1.0.0

func (opts *DeleteOpts) SuccessMessage() string

SuccessMessage gets the set success message or the default value

type DownloaderOpts added in v1.0.0

type DownloaderOpts struct {
	Out string
	Fs  afero.Fs
}

DownloaderOpts options required when deleting a resource. A command can compose this struct and then safely rely on the methods Prompt, or Delete to manage the interactions with the user

func (*DownloaderOpts) NewWriteCloser added in v1.0.0

func (opts *DownloaderOpts) NewWriteCloser() (io.WriteCloser, error)

func (*DownloaderOpts) OnError added in v1.0.0

func (opts *DownloaderOpts) OnError(f io.Closer) error

type GlobalOpts added in v1.0.0

type GlobalOpts struct {
	OrgID     string
	ProjectID string
}

func (*GlobalOpts) ConfigOrgID added in v1.0.0

func (opts *GlobalOpts) ConfigOrgID() string

ConfigOrgID returns the organization id. If the id is empty, it caches it after querying config.

func (*GlobalOpts) ConfigProjectID added in v1.0.0

func (opts *GlobalOpts) ConfigProjectID() string

ConfigProjectID returns the project id. If the id is empty, it caches it after querying config.

func (*GlobalOpts) PreRunE added in v1.0.0

func (opts *GlobalOpts) PreRunE(cbs ...cmdOpt) error

PreRunE is a function to call before running the command, this will validate the project ID and call any additional function pass as a callback

type ListOpts added in v1.0.0

type ListOpts struct {
	PageNum      int
	ItemsPerPage int
}

func (*ListOpts) NewListOptions added in v1.0.0

func (opts *ListOpts) NewListOptions() *mongodbatlas.ListOptions

type MetricsOpts added in v1.0.0

type MetricsOpts struct {
	ListOpts
	Granularity     string
	Period          string
	Start           string
	End             string
	MeasurementType []string
}

func (*MetricsOpts) NewProcessMetricsListOptions added in v1.0.0

func (opts *MetricsOpts) NewProcessMetricsListOptions() *atlas.ProcessMeasurementListOptions

Jump to

Keyboard shortcuts

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