cli

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PaginationSizeDefault, PaginationPageDefault int32

Functions

func Display added in v0.1.24

func Display(cmd *cobra.Command, v any, prettyFormatter FormatFn) error

Display formats the given value 'v' using format specified as value for --format flag and writes to STDOUT. If --format=pretty/human, custom-formatter passed will be used.

func Execute

func Execute(ctx context.Context)

func GoFormat added in v0.1.24

func GoFormat(w io.Writer, v any) error

GoFormat outputs 'v' formatted using pp package.

func JSONFormat added in v0.1.24

func JSONFormat(w io.Writer, v any) error

JSONFormat outputs 'v' formatted as indented JSON.

func TOMLFormat added in v0.1.24

func TOMLFormat(w io.Writer, v any) error

TOMLFormat outputs 'v' formatted as per TOML spec.

func YAMLFormat added in v0.1.24

func YAMLFormat(w io.Writer, v any) error

YAMLFormat outputs 'v' formatted as per YAML spec.

Types

type Config

type Config struct {
	Log       logger.LogConfig `mapstructure:"log"`
	Syncer    syncerConf       `mapstructure:"syncer"`
	Service   serveConfig      `mapstructure:"service"`
	PGConnStr string           `mapstructure:"pg_conn_str" default:"postgres://postgres@localhost:5432/entropy?sslmode=disable"`
	Telemetry telemetry.Config `mapstructure:"telemetry"`
}

Config contains the application configuration.

type FormatFn added in v0.1.24

type FormatFn func(w io.Writer, v any) error

type RunEFunc

type RunEFunc func(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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