common

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 defines a command line interpreter

func NewCLI

func NewCLI(name, help string) *CLI

NewCLI creates a new CLI with the given name and help message

func (*CLI) Command

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

Command adds a new top-level command to the CLI

func (*CLI) Run

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

Run makes the CLI process the arguments and executes the command(s) with the flag(s)

type CLICommand

type CLICommand func(Config) error

CLICommand defines a command that is added to the CLI via an external consumer.

type Config

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

Config aggregates configuration of TLS and signing

func ConfigFromFile

func ConfigFromFile(file string) (Config, error)

ConfigFromFile loads the given file and converts it to a Config

func (Config) ToFile

func (c Config) ToFile(file string) error

ToFile writes the config into a file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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