common

package
v0.0.0-...-fbe82ab Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

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

cli定义命令行解释器

func NewCLI

func NewCLI(name, help string) *CLI

new cli创建具有给定名称和帮助消息的新cli

func (*CLI) Command

func (cli *CLI) Command(name, help string, onCommand CLICommand) *kingpin.CmdClause

命令将新的顶级命令添加到CLI

func (*CLI) Run

func (cli *CLI) Run(args []string)

run使cli处理参数并执行带有标志的命令

type CLICommand

type CLICommand func(Config) error

cli command定义添加到cli的命令 通过外部消费者。

type Config

type Config struct {
	Version      int
	TLSConfig    comm.Config
	SignerConfig signer.Config
}

配置聚合TLS和签名的配置

func ConfigFromFile

func ConfigFromFile(file string) (Config, error)

configFromFile加载给定的文件并将其转换为config

func (Config) ToFile

func (c Config) ToFile(file string) error

tofile将配置写入文件

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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