Config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 3 Imported by: 4

README

配置说明:

配置数据,在于方便读取,数据安全,可便捷于开发和非开发人员操作

数据加载过程中,需要数据正确性保障,以及对于非正常数据的警告提示,正常加载数据到内存

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseJson2Cache

func ParseJson2Cache(obj ICommonConfig, data interface{}, filename string)

purpose: parse json to related config module. param 1: config module. param 2: config read list. param 3: file name.

Types

type ICommonConfig

type ICommonConfig interface {
	ComfireAct(data interface{}) (errlist []string)
	DataRWAct(data interface{}) (errlist []string)
}

all config module inherit interface.

type TConfig

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

common load config module.

func (*TConfig) After

func (this *TConfig) After() (errlist []string)

if data right, then load data to related config data..

func (*TConfig) Before

func (this *TConfig) Before() (errlist []string)

comfire data right or not before load config.

type TJsonParseTool

type TJsonParseTool struct {
}

func NewJsonParseTool

func NewJsonParseTool() *TJsonParseTool

func (*TJsonParseTool) Parse

func (this *TJsonParseTool) Parse(jsonName string, data interface{}) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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