loader

package
v0.0.0-...-ee7ecfe Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

加载json配置文件

no-watching

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string)

func LoadJson

func LoadJson(path string, data interface{})

配置装载器

Types

type Loader

type Loader struct {
}

func (*Loader) Get

func (l *Loader) Get(table string, row uint32, fieldname string) (interface{}, error)

获取配置数据 @params table 表名 @params rowname 行名 @params fieldname 列名

func (*Loader) GetCorrelation

func (l *Loader) GetCorrelation(table string, row uint32, fieldname string) (interface{}, error)

获取关联配置数据 @params table 表名 @params rowname 行名 @params fieldname 列名(也就是相关联的表的主键)

func (*Loader) GetFloat64

func (l *Loader) GetFloat64(data interface{}, err error) (float64, error)

数据类型转换

func (*Loader) GetString

func (l *Loader) GetString(data interface{}, err error) (string, error)

数据类型转换

func (*Loader) GetTableLen

func (l *Loader) GetTableLen(table string) (int, error)

获取表的长度 @params table 表名

func (*Loader) GetTableRow

func (l *Loader) GetTableRow(table string, row uint32) (interface{}, error)

获取表的行数据 @params table 表名

func (*Loader) GetUint32

func (l *Loader) GetUint32(data interface{}, err error) (uint32, error)

数据类型转换

Jump to

Keyboard shortcuts

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