cli

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GenerateAliases

func GenerateAliases(use string, extra ...string) []string

GenerateAliases return aliases for use such that they are: a version all lower case, a version with dashes, a singular versions with the same rules.

Types

type OrgOpts

type OrgOpts struct {
	PreRunOpts
	OrgID string
}

func (*OrgOpts) AddOrgOptFlags

func (opts *OrgOpts) AddOrgOptFlags(cmd *cobra.Command)

func (*OrgOpts) ConfigOrgID

func (opts *OrgOpts) ConfigOrgID() string

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

func (*OrgOpts) ValidateOrgID

func (opts *OrgOpts) ValidateOrgID() error

ValidateOrgID validates orgID.

type OutputOpts

type OutputOpts struct {
	Template  string
	OutWriter io.Writer
	Output    string
}

func (*OutputOpts) ConfigOutput

func (opts *OutputOpts) ConfigOutput() string

ConfigOutput returns the output format. If the format is empty, it caches it after querying config.

func (*OutputOpts) ConfigWriter

func (opts *OutputOpts) ConfigWriter() io.Writer

ConfigWriter returns the io.Writer. If the writer is nil, it defaults to os.Stdout and caches it.

func (*OutputOpts) Print

func (opts *OutputOpts) Print(o any) error

Print will evaluate the defined format and try to parse it accordingly outputting to the set writer.

type PreRunOpts

type PreRunOpts struct {
}

func (*PreRunOpts) PreRunE

func (*PreRunOpts) PreRunE(cbs ...prerun.CmdOpt) error

type ProjectOpts

type ProjectOpts struct {
	PreRunOpts
	ProjectID string
}

func (*ProjectOpts) AddProjectOptsFlags

func (opts *ProjectOpts) AddProjectOptsFlags(cmd *cobra.Command)

func (*ProjectOpts) ConfigProjectID

func (opts *ProjectOpts) ConfigProjectID() string

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

func (*ProjectOpts) ValidateProjectID

func (opts *ProjectOpts) ValidateProjectID() error

ValidateProjectID validates projectID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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