config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Service string
	Consul  Consul
	DNS     DNS
}

func Load

func Load(args, environ []string) (cfg *Config, err error)

type Consul

type Consul struct {
	Addr   string
	Scheme string
}

type DNS

type DNS struct {
	Backend string
	Porkbun Porkbun
}

type FlagSet

type FlagSet struct {
	flag.FlagSet
	// contains filtered or unexported fields
}

-- FlagSet

func NewFlagSet

func NewFlagSet(name string, errorHandling flag.ErrorHandling) *FlagSet

func (*FlagSet) IsSet

func (f *FlagSet) IsSet(name string) bool

IsSet returns true if a variable was set via any mechanism.

func (*FlagSet) ParseFlags

func (f *FlagSet) ParseFlags(args, environ, prefixes []string, p *properties.Properties) error

ParseFlags parses command line arguments and provides fallback values from environment variables and config file values. Environment variables are case-insensitive and can have either of the provided prefixes.

func (*FlagSet) StringSliceVar

func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string)

type Porkbun

type Porkbun struct {
	APIKey       string
	SecretAPIKey string
	Domain       string
	Name         string
}

Jump to

Keyboard shortcuts

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