cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute builds the default root command and invokes it with os.Args

func NewCmdConfig

func NewCmdConfig(s printers.IOStreams) *cobra.Command

func NewCmdConfigGet

func NewCmdConfigGet(s printers.IOStreams) *cobra.Command

func NewCmdConfigSetup

func NewCmdConfigSetup(s printers.IOStreams) *cobra.Command

func NewCmdGet added in v0.1.0

func NewCmdGet(ioStreams printers.IOStreams) *cobra.Command

func NewCmdMerge added in v0.1.0

func NewCmdMerge(ioStreams printers.IOStreams) *cobra.Command

func NewCmdMergeFiles added in v0.1.0

func NewCmdMergeFiles(ioStreams printers.IOStreams) *cobra.Command

func NewCmdMergeFolder added in v0.1.0

func NewCmdMergeFolder(ioStreams printers.IOStreams) *cobra.Command

func NewCmdSync added in v0.1.0

func NewCmdSync(ioStreams printers.IOStreams) *cobra.Command

func NewCmdVersion

func NewCmdVersion(ioStreams printers.IOStreams) *cobra.Command

func NewRootCmd

func NewRootCmd(ioStreams printers.IOStreams) *cobra.Command

NewRootCmd creates the 'root' command and configures it's nested children

Types

type ConfigGetOptions

type ConfigGetOptions struct {
	*printers.PrinterOptions
	Values *app.Config
}

func NewConfigGetOptions

func NewConfigGetOptions(s printers.IOStreams) *ConfigGetOptions

func (*ConfigGetOptions) Complete

func (o *ConfigGetOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*ConfigGetOptions) Run

func (o *ConfigGetOptions) Run() error

Run the command

func (*ConfigGetOptions) Validate

func (o *ConfigGetOptions) Validate() error

Validate the options

type ConfigSetupOptions

type ConfigSetupOptions struct {
	*printers.PrinterOptions
	Config *app.Config
}

func NewConfigSetupOptions

func NewConfigSetupOptions(s printers.IOStreams) *ConfigSetupOptions

func (*ConfigSetupOptions) Complete

func (o *ConfigSetupOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*ConfigSetupOptions) Run

func (o *ConfigSetupOptions) Run() error

Run the command

func (*ConfigSetupOptions) Validate

func (o *ConfigSetupOptions) Validate() error

Validate the options

type GetOptions added in v0.1.0

type GetOptions struct {
	*printers.PrinterOptions
	provider.Options
	SupportedProviders map[string]provider.NewProviderFn
	Key                string
	Recursive          bool
}

func NewGetOptions added in v0.1.0

func NewGetOptions(ioStreams printers.IOStreams) *GetOptions

func (*GetOptions) Complete added in v0.1.0

func (o *GetOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*GetOptions) Run added in v0.1.0

func (o *GetOptions) Run() error

Run the command

func (*GetOptions) Validate added in v0.1.0

func (o *GetOptions) Validate() error

Validate the options

type MergeFilesOptions added in v0.1.0

type MergeFilesOptions struct {
	*printers.PrinterOptions
	Source      []byte
	Destination []byte
	Debug       bool
}

func NewMergeFilesOptions added in v0.1.0

func NewMergeFilesOptions(ioStreams printers.IOStreams) *MergeFilesOptions

func (*MergeFilesOptions) Complete added in v0.1.0

func (o *MergeFilesOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MergeFilesOptions) Run added in v0.1.0

func (o *MergeFilesOptions) Run() error

Run the command

func (*MergeFilesOptions) Validate added in v0.1.0

func (o *MergeFilesOptions) Validate() error

Validate the options

type MergeFolderOptions added in v0.1.0

type MergeFolderOptions struct {
	*printers.PrinterOptions
	cfgset.MergeOptions
	OutDir string
}

func NewMergeFolderOptions added in v0.1.0

func NewMergeFolderOptions(ioStreams printers.IOStreams) *MergeFolderOptions

func (*MergeFolderOptions) Complete added in v0.1.0

func (o *MergeFolderOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*MergeFolderOptions) Run added in v0.1.0

func (o *MergeFolderOptions) Run() error

Run the command

func (*MergeFolderOptions) Validate added in v0.1.0

func (o *MergeFolderOptions) Validate() error

Validate the options

type RootCmdOptions added in v0.1.0

type RootCmdOptions struct {
	printers.IOStreams
	Verbose bool
}

RootCmdOptions is a struct to support version command

func NewRootCmdOptions added in v0.1.0

func NewRootCmdOptions(ioStreams printers.IOStreams) *RootCmdOptions

NewRootCmdOptions returns initialized RootCmdOptions

func (*RootCmdOptions) Complete added in v0.1.0

func (o *RootCmdOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*RootCmdOptions) Run added in v0.1.0

func (o *RootCmdOptions) Run() error

Run the command

func (*RootCmdOptions) Validate added in v0.1.0

func (o *RootCmdOptions) Validate() error

Validate the options

type SyncKeyResult added in v0.1.0

type SyncKeyResult struct {
	Key         string  `json:"key,omitempty"`
	NewValue    string  `json:"new_value"`
	OldValue    *string `json:"old_value,omitempty"`
	ActionTaken string  `json:"action_taken"`
}

type SyncProviderOptions added in v0.1.0

type SyncProviderOptions struct {
	*printers.PrinterOptions
	cfgset.MergeOptions
	provider.Options
	SupportedProviders map[string]provider.NewProviderFn
	KeyPrefix          string
	DryRun             bool
}

func NewSyncProviderOptions added in v0.1.0

func NewSyncProviderOptions(ioStreams printers.IOStreams) *SyncProviderOptions

func (*SyncProviderOptions) Complete added in v0.1.0

func (o *SyncProviderOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*SyncProviderOptions) Run added in v0.1.0

func (o *SyncProviderOptions) Run() error

Run the command

func (*SyncProviderOptions) Validate added in v0.1.0

func (o *SyncProviderOptions) Validate() error

Validate the options

type VersionOptions

type VersionOptions struct {
	*printers.PrinterOptions
	VersionDetails *version.DetailStruct
}

func NewVersionOptions

func NewVersionOptions(ioStreams printers.IOStreams) *VersionOptions

func (*VersionOptions) Complete

func (o *VersionOptions) Complete(cmd *cobra.Command, args []string) error

Complete the options

func (*VersionOptions) Run

func (o *VersionOptions) Run() error

Run the command

func (*VersionOptions) Validate

func (o *VersionOptions) Validate() error

Validate the options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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