Versions in this module Expand all Collapse all v0 v0.9.1 Apr 30, 2019 v0.9.0 Apr 29, 2019 Changes in this version + var DataDir string = filepath.Dir(util.AppDataDir("9", false)) + var Log = cl.NewSubSystem("cmd/config", ll.DEFAULT) + var NetParams = map[string]*nine.Params + var Networks = []string + var Valid = struct{ ... } + func BackgroundColor() tcell.Color + func CleanAndExpandPath(path, datadir string) string + func Conf(args []string, tokens Tokens, app *App) int + func Copy(args []string, tokens Tokens, app *App) int + func Create(args []string, tokens Tokens, app *App) int + func Ctl(args []string, tokens Tokens, app *App) int + func DimColor() tcell.Color + func EnsureDir(fileName string) bool + func FileExists(filePath string) bool + func GUI(args []string, tokens Tokens, app *App) int + func GenAddr(name string, port int) func(r *Row, in interface{}) bool + func GenAddrs(name string, port int) func(r *Row, in interface{}) bool + func GenCA(args []string, tokens Tokens, app *App) int + func GenCerts(args []string, tokens Tokens, app *App) int + func Help(args []string, tokens Tokens, app *App) int + func List(args []string, tokens Tokens, app *App) int + func MainColor() tcell.Color + func MakeConfig(c *App) (out *nine.Config) + func MinUint32(a, b uint32) uint32 + func Mine(args []string, tokens Tokens, app *App) int + func New(args []string, tokens Tokens, app *App) int + func Node(args []string, tokens Tokens, app *App) int + func NormalizeAddress(addr, defaultPort string) string + func NormalizeAddresses(addrs []string, defaultPort string) []string + func PrelightColor() tcell.Color + func RemoveDuplicateAddresses(addrs []string) []string + func Run(args []string, tokens Tokens, app *App) int + func Shell(args []string, tokens Tokens, app *App) int + func Test(args []string, tokens Tokens, app *App) int + func TestHandler(args []string, tokens Tokens, app *App) int + func TextColor() tcell.Color + func UseLogger(logger *cl.SubSystem) + func Wallet(args []string, tokens Tokens, app *App) int + type App struct + About string + Cats Cats + Commands Commands + Config *nine.Config + Default func(ctx *App) int + Name string + Tagline string + Version func() string + func NewApp(name string, g ...AppGenerator) (out *App) + func (app *App) Parse(args []string) int + func (app *App) ParseCLI(args []string) (cmd *Command, tokens Tokens) + func (app *App) SaveConfig() + func (r *App) MarshalJSON() ([]byte, error) + func (r *App) UnmarshalJSON(data []byte) error + type AppGenerator func(ctx *App) + func About(ver string) AppGenerator + func Cmd(name string, g ...CommandGenerator) AppGenerator + func DefaultRunner(fn func(ctx *App) int) AppGenerator + func Group(name string, g ...CatGenerator) AppGenerator + func Tagline(ver string) AppGenerator + func Version(ver string) AppGenerator + type AppGenerators []AppGenerator + func (r *AppGenerators) RunAll(app *App) + type Cat map[string]*Row + func (r Cat) GetSortedKeys() (out []string) + type CatGenerator func(ctx *Cat) + func Addr(name string, defPort int, g ...RowGenerator) CatGenerator + func Addrs(name string, defPort int, g ...RowGenerator) CatGenerator + func Algo(name string, g ...RowGenerator) CatGenerator + func Dir(name string, g ...RowGenerator) CatGenerator + func Duration(name string, g ...RowGenerator) CatGenerator + func Enable(name string, g ...RowGenerator) CatGenerator + func Enabled(name string, g ...RowGenerator) CatGenerator + func File(name string, g ...RowGenerator) CatGenerator + func Float(name string, g ...RowGenerator) CatGenerator + func Int(name string, g ...RowGenerator) CatGenerator + func Level(g ...RowGenerator) CatGenerator + func Net(name string, g ...RowGenerator) CatGenerator + func Port(name string, g ...RowGenerator) CatGenerator + func Tag(name string, g ...RowGenerator) CatGenerator + func Tags(name string, g ...RowGenerator) CatGenerator + type CatGenerators []CatGenerator + func (r *CatGenerators) RunAll(cat Cat) + type CatJSON map[string]Line + func (r *CatJSON) GetSortedKeys() (out []string) + type Cats map[string]Cat + func (r *Cats) Bool(cat, item string) (out *bool) + func (r *Cats) Duration(cat, item string) (out *time.Duration) + func (r *Cats) Float(cat, item string) (out *float64) + func (r *Cats) GetSortedKeys() (out []string) + func (r *Cats) Int(cat, item string) (out *int) + func (r *Cats) Map(cat, item string) (out *nine.Mapstringstring) + func (r *Cats) Str(cat, item string) (out *string) + func (r *Cats) Tags(cat, item string) (out *[]string) + type CatsJSON map[string]CatJSON + func (r *CatsJSON) GetSortedKeys() (out []string) + type Command struct + Detail string + Handler CommandHandler + Name string + Opts Optional + Pattern string + Precedent Precedent + RE *regexp.Regexp + Short string + type CommandGenerator func(ctx *Command) + func Detail(usage string) CommandGenerator + func Handler(hnd func(args []string, tokens Tokens, app *App) int) CommandGenerator + func Opts(opts ...string) CommandGenerator + func Pattern(patt string) CommandGenerator + func Precs(precs ...string) CommandGenerator + func Short(usage string) CommandGenerator + type CommandGenerators []CommandGenerator + func (r *CommandGenerators) RunAll() *Command + type CommandHandler func(args []string, tokens Tokens, app *App) int + type Commands map[string]*Command + func (r *Commands) GetSortedKeys() (out []string) + type Iface struct + Data *interface{} + func NewIface() *Iface + func (i *Iface) Get() interface{} + func (i *Iface) Put(in interface{}) *Iface + type Line struct + Default interface{} + Max int + Min int + Usage string + Value interface{} + type Optional []string + type Precedent []string + type Row struct + App *App + Default *Iface + Get func() interface{} + Init func(*Row) + Max *Iface + Min *Iface + Name string + Opts []string + Put func(interface{}) bool + String string + Type string + Usage string + Validate func(*Row, interface{}) bool + Value *Iface + func (r *Row) Bool() bool + func (r *Row) Duration() time.Duration + func (r *Row) Float() float64 + func (r *Row) Int() int + func (r *Row) Tag() string + func (r *Row) Tags() []string + type RowGenerator func(ctx *Row) + func Default(in interface{}) RowGenerator + func Max(max int) RowGenerator + func Min(min int) RowGenerator + func RandomString(n int) RowGenerator + func Usage(usage string) RowGenerator + type RowGenerators []RowGenerator + func (r *RowGenerators) RunAll(row *Row) + type Token struct + Cmd Command + Value string + type Tokens map[string]Token + func (r *Tokens) GetSortedKeys() (out []string)