common

package
v0.0.0-...-b066e35 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericRun

func GenericRun(o Runnable, cmd *cobra.Command, args []string)

func GetFullName

func GetFullName(parentName, name string) string

Types

type CommonOptions

type CommonOptions struct {
	Context *config.Context
}

func NewCommonOptions

func NewCommonOptions() *CommonOptions

func (*CommonOptions) InitContext

func (cc *CommonOptions) InitContext() (err error)

type DatedOptions

type DatedOptions struct {
	*CommonOptions
	// contains filtered or unexported fields
}

func NewDatedOptions

func NewDatedOptions() *DatedOptions

func (*DatedOptions) AddDateFlags

func (do *DatedOptions) AddDateFlags(cmd *cobra.Command)

func (*DatedOptions) CompleteDate

func (do *DatedOptions) CompleteDate() error

func (*DatedOptions) GetDate

func (do *DatedOptions) GetDate() time.Time

type Runnable

type Runnable interface {
	Complete(name string, cmd *cobra.Command, args []string) error
	Validate() error
	Run() error
}

Jump to

Keyboard shortcuts

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