config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLineConfig

type CommandLineConfig struct {
	Config
	// contains filtered or unexported fields
}

CommandLineConfig implements CommandLineConfigurator interface

func NewCommandLineConfig

func NewCommandLineConfig(sourceFlag, outputFlag string) *CommandLineConfig

func (*CommandLineConfig) Init

func (c *CommandLineConfig) Init(conf interface{}) error

func (*CommandLineConfig) SetCommandLineFlags

func (c *CommandLineConfig) SetCommandLineFlags(flagSet *flag.FlagSet)

type CommandLineConfigurator

type CommandLineConfigurator interface {
	Configurator
	SetCommandLineFlags(*flag.FlagSet)
}

type Config

type Config struct {
	// source of config, must be a filename or http URL
	SourceOfConfig string `json:"-" xml:"-" cli:"config-source" usage:"source of config, filename or http URL"`
	// output of config, exit process if non-empty
	OutputOfConfig string `json:"-" xml:"-" cli:"config-output" usage:"output of config, exit process if non-empty"`
}

Config implements Configurator interface

func (*Config) Init

func (c *Config) Init(conf interface{}) error

type Configurator

type Configurator interface {
	Init(conf interface{}) error
}

Jump to

Keyboard shortcuts

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