config

package
v0.0.0-...-df6d72d Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indent

func Indent(text string, level int) string

Types

type Config

type Config struct {
	Telemetry *telemetry.Config `yaml:"telemetry" validate:"required"`
	API       *api.Config       `yaml:"api" validate:"required"`
	Routers   routers.Config    `yaml:"routers" validate:"required"`
}

Config is a general top-level Glide configuration

func DefaultConfig

func DefaultConfig() *Config

type Expander

type Expander struct{}

Expander finds special directives like ${env:ENV_VAR} in the config file and fill them with actual values

func (*Expander) Expand

func (e *Expander) Expand(content []byte) []byte

type Provider

type Provider struct {
	Config *Config
	// contains filtered or unexported fields
}

Provider reads, collects, validates and process config files

func NewProvider

func NewProvider() *Provider

NewProvider creates a instance of Config Provider

func (*Provider) Get

func (p *Provider) Get() *Config

func (*Provider) GetStr

func (p *Provider) GetStr() string

func (*Provider) Load

func (p *Provider) Load(configPath string) (*Provider, error)

func (*Provider) LoadDotEnv

func (p *Provider) LoadDotEnv(envPath string) error

func (*Provider) Start

func (p *Provider) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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