cmd

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetRoot

func GetRoot() *cobra.Command

GetRoot returns the root command

func NewAuthCmd

func NewAuthCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewInitCmd

func NewInitCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewPushCmd

func NewPushCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewVersionCmd

func NewVersionCmd() *cobra.Command

Types

type AuthCmd

type AuthCmd struct {
	*flags.GlobalFlags
}

InitCmd holds the required data for the init cmd

func (*AuthCmd) Run

func (cmd *AuthCmd) Run(cobraCmd *cobra.Command, args []string) error

type InitCmd

type InitCmd struct {
	*flags.GlobalFlags

	// command flags
	Reconfigure bool
}

InitCmd holds the required data for the init cmd

func (*InitCmd) Run

func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) error

type PushCmd

type PushCmd struct {
	*flags.GlobalFlags

	// command flags
	NumberOfWorkers int
	DryRunMode      bool
}

PushCmd holds the required data for the push cmd

func (*PushCmd) Run

func (cmd *PushCmd) Run(cobraCmd *cobra.Command, args []string) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(command *cobra.Command, args []string) error
Example
cmd := &VersionCmd{}
_ = cmd.Run(nil, nil)
Output:

gphotos-uploader-cli v0.0.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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