gcfgx

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterDefault added in v0.4.2

type AdapterDefault struct {
	// contains filtered or unexported fields
}

func NewAdapterDefault added in v0.4.2

func NewAdapterDefault(adapter gcfg.Adapter, fallbacks ...gcfg.Adapter) *AdapterDefault

func (*AdapterDefault) Available added in v0.4.2

func (a *AdapterDefault) Available(ctx context.Context, resource ...string) (ok bool)

func (*AdapterDefault) Data added in v0.4.2

func (a *AdapterDefault) Data(ctx context.Context) (data map[string]interface{}, err error)

func (*AdapterDefault) Get added in v0.4.2

func (a *AdapterDefault) Get(ctx context.Context, pattern string) (value interface{}, err error)

type Config

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

func Instance added in v0.2.0

func Instance(name ...string) *Config

func New

func New(config *gcfg.Config) *Config

func (*Config) GetWithCmdAndEnv added in v0.3.2

func (c *Config) GetWithCmdAndEnv(ctx context.Context, pattern string, def ...interface{}) (*gvar.Var, error)

func (*Config) MustData

func (c *Config) MustData(ctx context.Context) map[string]interface{}

func (*Config) MustGet

func (c *Config) MustGet(ctx context.Context, pattern string, def ...interface{}) *gvar.Var

func (*Config) MustGetWithCmd

func (c *Config) MustGetWithCmd(ctx context.Context, pattern string, def ...interface{}) *gvar.Var

func (*Config) MustGetWithCmdAndEnv added in v0.3.2

func (c *Config) MustGetWithCmdAndEnv(ctx context.Context, pattern string, def ...interface{}) *gvar.Var

func (*Config) MustGetWithEnv

func (c *Config) MustGetWithEnv(ctx context.Context, pattern string, def ...interface{}) *gvar.Var

func (*Config) SetErrorFn

func (c *Config) SetErrorFn(errorFn func(ctx context.Context, format string, v ...interface{})) *Config

func (*Config) SetErrorLogger

func (c *Config) SetErrorLogger(logger *glog.Logger) *Config

Jump to

Keyboard shortcuts

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