Documentation ¶
Index ¶
- func Add(table string, value interface{})
- func EqualList(table string, key string, value interface{}) interface{}
- func EqualOne(table string, key string, value interface{}) interface{}
- func List(table string) interface{}
- func Or(table string, params map[string]interface{}, out interface{}) error
- type DataConfigComponent
- func (d *DataConfigComponent) CheckFileName(fileNames string, text []byte) error
- func (d *DataConfigComponent) GetFirst(index *IndexObject, params ...interface{}) interface{}
- func (d *DataConfigComponent) GetIndexList(index *IndexObject, params ...interface{}) interface{}
- func (d *DataConfigComponent) GetList(tableName string) interface{}
- func (d *DataConfigComponent) Init()
- func (d *DataConfigComponent) RegisterModel(models ...IConfigModel) error
- func (d *DataConfigComponent) RegisterService(service IConfigService)
- func (d *DataConfigComponent) Reload(fileName string, text []byte) error
- type IConfigModel
- type IConfigService
- type IDataConfig
- type IDataParse
- type IDataSource
- type IndexObject
- type Json
- type LocalSource
- type Storage
- type Xml
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataConfigComponent ¶
type DataConfigComponent struct { cherryInterfaces.BaseComponent // contains filtered or unexported fields }
func NewComponent ¶
func NewComponent() *DataConfigComponent
func (*DataConfigComponent) CheckFileName ¶
func (d *DataConfigComponent) CheckFileName(fileNames string, text []byte) error
func (*DataConfigComponent) GetFirst ¶
func (d *DataConfigComponent) GetFirst(index *IndexObject, params ...interface{}) interface{}
func (*DataConfigComponent) GetIndexList ¶
func (d *DataConfigComponent) GetIndexList(index *IndexObject, params ...interface{}) interface{}
func (*DataConfigComponent) GetList ¶
func (d *DataConfigComponent) GetList(tableName string) interface{}
func (*DataConfigComponent) Init ¶
func (d *DataConfigComponent) Init()
func (*DataConfigComponent) RegisterModel ¶
func (d *DataConfigComponent) RegisterModel(models ...IConfigModel) error
func (*DataConfigComponent) RegisterService ¶
func (d *DataConfigComponent) RegisterService(service IConfigService)
type IConfigModel ¶
type IConfigModel interface { FileName() string Init() }
type IConfigService ¶
type IConfigService interface { Clean(typ interface{}) Init(dataConfig IDataConfig) }
type IDataConfig ¶
type IDataConfig interface { GetFirst(index *IndexObject, params ...interface{}) interface{} GetList(tableName string) interface{} GetIndexList(index *IndexObject, params ...interface{}) interface{} Reload(fileName string, text []byte) error CheckFileName(fileName string, text []byte) error RegisterModel(models ...IConfigModel) error RegisterService(service IConfigService) }
type IDataParse ¶
type IDataSource ¶
type IndexObject ¶
func Build ¶
func Build(tableName string, indexKey ...string) *IndexObject
func NewIndex ¶
func NewIndex(tableName, key string) *IndexObject
func (*IndexObject) String ¶
func (i *IndexObject) String() string
type LocalSource ¶
type LocalSource struct {
// contains filtered or unexported fields
}
func (*LocalSource) Destroy ¶
func (l *LocalSource) Destroy()
func (*LocalSource) GetConfigNames ¶
func (l *LocalSource) GetConfigNames() []string
func (*LocalSource) GetContent ¶
func (l *LocalSource) GetContent(fileName string) ([]byte, error)
func (*LocalSource) Init ¶
func (l *LocalSource) Init()
func (*LocalSource) Name ¶
func (l *LocalSource) Name() string
func (*LocalSource) SetParse ¶
func (l *LocalSource) SetParse(parse IDataParse)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.