cmd

package
v0.0.0-...-29c3169 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const MaxInterval = time.Minute * 2

Variables

This section is empty.

Functions

func InitTracing

func InitTracing(name string, cauth *auth.ClientAuth) (func(), error)

Types

type APIConfig

type APIConfig struct {
	Name string
	API  struct {
		Key    string `default:""`
		Secret string `default:"" `
	}

	StateDir string `default:"." flag:"state-dir" usage:"Directory for storing state"`
	Debug    bool   `usage:"Enable debug logging"`
	// contains filtered or unexported fields
}

func (*APIConfig) Flags

func (cfg *APIConfig) Flags() *flag.FlagSet

func (*APIConfig) Load

func (cfg *APIConfig) Load(args []string) error

type CLI

type CLI struct {
	Config *APIConfig
}

func NewCLI

func NewCLI() *CLI

func (*CLI) ClientAuth

func (cli *CLI) ClientAuth(ctx context.Context) (*auth.ClientAuth, error)

func (*CLI) RootCmd

func (cli *CLI) RootCmd() *cobra.Command

func (*CLI) Run

func (cli *CLI) Run(fn func(cmd *cobra.Command) error) func(*cobra.Command, []string) error

type SetConfig

type SetConfig interface {
	SetConfig(cfg *pb.Config)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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