appconfig

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

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

AppConfig 配置模块

func (*AppConfig) AsModule

func (conf *AppConfig) AsModule() ipakku.Opts

AsModule 作为一个模块加载

func (*AppConfig) GetConfig

func (conf *AppConfig) GetConfig(key string) (res utypes.Object)

GetConfig 读取key的value信息, 返回 Object 对象, 里面的值可能是string或者map

func (*AppConfig) ScanAndAutoConfig added in v0.0.3

func (conf *AppConfig) ScanAndAutoConfig(ptr interface{}) error

ScanAndAutoConfig 扫描带有@autoconfig标签的字段, 并完成其配置

func (*AppConfig) ScanAndAutoValue added in v0.0.3

func (conf *AppConfig) ScanAndAutoValue(configPrefix string, ptr interface{}) error

ScanAndAutoValue 扫描带有@autovalue标签的字段, 并完成其配置

func (*AppConfig) SetConfig

func (conf *AppConfig) SetConfig(key string, value interface{}) error

SetConfig 设置值

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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