config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDisabled = false
)

Variables

View Source
var (
	ErrUserIDRequired             = errors.New("cloudflare user id is required")
	ErrTokenRequired              = errors.New("cloudflare token is required")
	ErrPrefixRequired             = errors.New("cloudflare prefix is required")
	ErrUpstreamRootDomainRequired = errors.New("cloudflare upstream root domain is required")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Disabled           bool   `mapstructure:"disabled"`
	UserID             string `mapstructure:"user_id"`
	Token              string `mapstructure:"token"`
	Prefix             string `mapstructure:"prefix"`
	UpstreamRootDomain string `mapstructure:"upstream_root_domain"`
}

func New

func New() *Config

func (*Config) GenerateOptions

func (c *Config) GenerateOptions(logName string) (*cloudflare.Options, error)

func (*Config) RootPersistentFlags

func (c *Config) RootPersistentFlags(flags *pflag.FlagSet)

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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