config

package
v0.0.0-...-6060d2f Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configer

type Configer interface {
	Init(mode ModeType, path, configName, host, meta string) error
	Register(key string, config interface{})
}

type ModeType

type ModeType string

ModeType 模式类型

const (
	Development ModeType = "development"
	Test        ModeType = "test"
	Production  ModeType = "production"
)

模式常量

func (ModeType) IsValid

func (m ModeType) IsValid() bool

IsValid 判定模式是否可用

type TomlConfig

type TomlConfig struct {
	C map[string]interface{}
	// contains filtered or unexported fields
}

Config 公共配置

func NewTomlConfig

func NewTomlConfig() *TomlConfig

func (*TomlConfig) Init

func (c *TomlConfig) Init(mode ModeType, path, configName, host, meta string) error

func (*TomlConfig) Register

func (c *TomlConfig) Register(key string, conf interface{})

Jump to

Keyboard shortcuts

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