command

package
v0.0.0-...-a09fd22 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHome

func DefaultHome() string

func Hidden

func Hidden(cmd *cobra.Command) *cobra.Command

Types

type App

type App struct {
	context.Context

	Home   string
	Format string
	Raw    bool

	Config  Config
	Storage *storage.Gorm
	Client  *bigstruct.Client
}

func (*App) Close

func (app *App) Close() (err error)

func (*App) DefaultConfig

func (app *App) DefaultConfig() Config

func (*App) DefaultFormat

func (app *App) DefaultFormat(cmd *cobra.Command, format string)

func (*App) DefaultHome

func (app *App) DefaultHome(cmd *cobra.Command, home string)

func (*App) Init

func (app *App) Init(*cobra.Command, []string) error

func (*App) Register

func (app *App) Register(f *pflag.FlagSet)

func (*App) Render

func (app *App) Render(v interface{}) (err error)

type Builder

type Builder struct {
	Import string
	Prefix string
	Values []string
	Types  []string
	Codec  big.Codec
}

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (big.Fields, error)

func (*Builder) Register

func (b *Builder) Register(cmd *cobra.Command)

type CobraFunc

type CobraFunc func(*cobra.Command, []string) error

func PrintHelp

func PrintHelp(w io.Writer) CobraFunc

type Config

type Config struct {
	Backend Endpoint `yaml:"backend,omitempty"`
}

func (*Config) FromYAML

func (c *Config) FromYAML(s types.YAML) error

func (Config) Validate

func (c Config) Validate() error

func (Config) YAML

func (c Config) YAML() types.YAML

type Endpoint

type Endpoint struct {
	URI string `yaml:"uri,omitempty"`
}

func (Endpoint) Validate

func (e Endpoint) Validate() error

type Meta

type Meta []string

func (Meta) Object

func (m Meta) Object() model.Object

func (*Meta) Register

func (m *Meta) Register(cmd *cobra.Command)

func (Meta) Strings

func (m Meta) Strings() []string

type Ref

type Ref bigstruct.Ref

func (Ref) Ref

func (r Ref) Ref() bigstruct.Ref

func (*Ref) Set

func (r *Ref) Set(ref string) error

func (Ref) String

func (r Ref) String() string

func (Ref) Type

func (r Ref) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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