cli

package
v0.0.0-...-62531ef Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParseError errors.String = "failed to parse command line arguments"
	ParseErr   errors.String = "failed to parse command line arguments"
)

Variables

View Source
var DefaultParser = ParseConfig{
	// contains filtered or unexported fields
}
View Source
var OsFS = fs.OS()
View Source
var PlotCmdFiles = map[string][]string{
	"pwr": []string{"pix_sigma0", "pix_gamma0", "sbi_pwr", "cc", "rmli", "mli"},
	"SLC": []string{"slc", "rslc"},
	"mph": []string{"sbi", "sm", "diff", "lookup", "lt"},
	"hgt": []string{"hgt", "rdc"},
}

Functions

func IsDefaultStreamValue

func IsDefaultStreamValue(s string) (b bool)

func IsFile

func IsFile(fsys fs.FS, s string) (b bool, err error)

func Reader

func Reader(s string) (r io.ReadCloser, err error)

func SetupGammaCli

func SetupGammaCli(c *cli.Cli)

func Writer

func Writer(s string) (w io.WriteCloser, err error)

Types

type Coder

type Coder int
const (
	CoderJSON Coder = iota
)

func (Coder) GetDecoder

func (c Coder) GetDecoder() (d Decoder)

type Context

type Context struct {
	Logger        io.Writer
	GammaCommands settings.Commands
}

func (*Context) Set

func (c *Context) Set(s string) (err error)

type ContextConfig

type ContextConfig struct {
	Logfile   string          `json:"logfile" toml:"logfile"`
	GammaPath string          `json:"gamma_dir" toml:"gamma_dir"`
	Executor  ExecutorPayload `json:"executor" toml:"executor"`
}

type Decoder

type Decoder interface {
	Decode(io.Reader, interface{}) error
}

type ExecutorPayload

type ExecutorPayload struct {
	Tag  string `json:"type" toml:"type"`
	Data []byte `json:"data" toml:"data"`
}

type InvalidInStreamArgument

type InvalidInStreamArgument struct {
	Argument string
}

func (InvalidInStreamArgument) Error

func (i InvalidInStreamArgument) Error() (s string)

type JSONCoder

type JSONCoder struct{}

func (JSONCoder) Decode

func (JSONCoder) Decode(r io.Reader, v interface{}) (err error)

type JsonRPC

type JsonRPC struct {
	// contains filtered or unexported fields
}

func (JsonRPC) Run

func (j JsonRPC) Run() (err error)

func (*JsonRPC) SetCli

func (j *JsonRPC) SetCli(c *cli.Cli)

type MetaFile

type MetaFile struct {
	Meta string
}

func (*MetaFile) SetCli

func (m *MetaFile) SetCli(c *cli.Cli)

type ParseConfig

type ParseConfig struct {
	// contains filtered or unexported fields
}

func (ParseConfig) Parse

func (p ParseConfig) Parse(pp PathOrPayload, v interface{}) (err error)

func (ParseConfig) ParseStringPayload

func (p ParseConfig) ParseStringPayload(s string, v interface{}) (err error)

type PathOrPayload

type PathOrPayload struct {
	// contains filtered or unexported fields
}

func (*PathOrPayload) Set

func (p *PathOrPayload) Set(s string) (err error)

type Plotter

type Plotter struct {
	plot.RasArgs
	Infile   string
	PlotMode string
}

Jump to

Keyboard shortcuts

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