config

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFile

func NewFile(options ...Option) configx.Conf

Types

type Config

type Config struct {
	ConfigsDir ConfigsDir
	ConfigName ConfigName
	Type       ConfigType
	Logger     logx.Logger
	*viper.Viper
}

func (*Config) Load

func (c *Config) Load() error

func (*Config) SetConfigxPath

func (c *Config) SetConfigxPath(in string)

func (*Config) Watch

func (c *Config) Watch() bool

type ConfigName

type ConfigName string

type ConfigType

type ConfigType string

type ConfigsDir

type ConfigsDir string

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithConfigName

func WithConfigName(ConfigName ConfigName) Option

func WithConfigType

func WithConfigType(ConfigType ConfigType) Option

func WithConfigsDir

func WithConfigsDir(ConfigsDir ConfigsDir) Option

Jump to

Keyboard shortcuts

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