Documentation ¶
Index ¶
- func DefaultFormat(interface{}) func(interface{}) interface{}
- func DefaultHandler(source map[string]interface{}) map[string]interface{}
- func OptionsetsFormat(db *xorm.Engine) func(interface{}) func(interface{}) interface{}
- type Client
- type DB
- type Formatter
- type Report
- type ServiceContext
- type Store
- type XClient
- type XDB
- func (x *XDB) GetOptions(db *xorm.Engine, keys ...string) (map[string]map[string]interface{}, error)
- func (x *XDB) InAdmin(db *xorm.Engine, userId string, role ...string) bool
- func (x *XDB) InRole(db *xorm.Engine, userId string, role ...string) bool
- func (x *XDB) PageSearch(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, ...) (*types.PageList, error)
- func (x *XDB) Persist(db *xorm.Session, ids ...string) (int64, error)
- func (x *XDB) PersistFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
- func (x *XDB) Remove(db *xorm.Session, ids ...string) (int64, error)
- func (x *XDB) RemoveFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
- func (x *XDB) TreeSearch(db *xorm.Engine, controller, api, table string, q map[string]interface{}, ...) (interface{}, error)
- type XReport
- func (x *XReport) Check(request *http.Request) bool
- func (x *XReport) PageExport(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, ...) (*types.ExportInfo, error)
- func (x *XReport) ParseExcel(r io.Reader, sheet interface{}, header ...[]map[string]interface{}) ([]map[string]string, error)
- func (svc *XReport) SetOptionsetsFormat(funk func(interface{}) func(interface{}) interface{})
- type Xlsx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFormat ¶
func DefaultFormat(interface{}) func(interface{}) interface{}
DefaultFormat defined
func DefaultHandler ¶
DefaultHandler defined
func OptionsetsFormat ¶
OptionsetsFormat defiend
Types ¶
type Client ¶ added in v1.2.12
type Client interface { // Get returns *HttpRequest with GET method. Get(url string) *client.HttpRequest // Post returns *HttpRequest with POST method. Post(url string) *client.HttpRequest // Put returns *HttpRequest with PUT method. Put(url string) *client.HttpRequest // Delete returns *HttpRequest DELETE method. Delete(url string) *client.HttpRequest // Head returns *HttpRequest with HEAD method. Head(url string) *client.HttpRequest }
XClient defined TODO
type DB ¶ added in v1.2.12
type DB interface { PageSearch(*xorm.Engine, string, string, string, map[string]interface{}, ...Formatter) (*types.PageList, error) TreeSearch(*xorm.Engine, string, string, string, map[string]interface{}, ...Formatter) (interface{}, error) GetOptions(*xorm.Engine, ...string) (map[string]map[string]interface{}, error) InRole(*xorm.Engine, string, ...string) bool InAdmin(*xorm.Engine, string, ...string) bool Persist(db *xorm.Session, ids ...string) (int64, error) PersistFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error) Remove(db *xorm.Session, ids ...string) (int64, error) RemoveFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error) }
DB defined TODO
type Report ¶ added in v1.2.12
type Report interface { Check(*http.Request) bool PageExport(*xorm.Engine, string, string, string, map[string]interface{}, ...Formatter) (*types.ExportInfo, error) ParseExcel(r io.Reader, sheet interface{}, header ...[]map[string]interface{}) ([]map[string]string, error) SetOptionsetsFormat(func(interface{}) func(interface{}) interface{}) }
Report defined TODO
type ServiceContext ¶ added in v1.2.12
ServiceContext defined TODO
func NewServiceContext ¶ added in v1.2.12
func NewServiceContext(cache persistence.CacheStore) *ServiceContext
NewServiceContext defined TODO ====================================================================== ====================================================================== ======================================================================
type Store ¶ added in v1.2.12
type Store interface { Get(key string, value interface{}) error Set(key string, value interface{}, expire time.Duration) error Add(key string, value interface{}, expire time.Duration) error Replace(key string, data interface{}, expire time.Duration) error Delete(key string) error Increment(key string, data uint64) (uint64, error) Decrement(key string, data uint64) (uint64, error) Flush() error }
Store defined TODO
type XClient ¶ added in v1.2.12
type XClient struct{}
XClient defined TODO
func (*XClient) Delete ¶ added in v1.2.12
func (x *XClient) Delete(url string) *client.HttpRequest
Delete returns *HttpRequest DELETE method.
func (*XClient) Get ¶ added in v1.2.12
func (x *XClient) Get(url string) *client.HttpRequest
XClient defined TODO ====================================================================== ====================================================================== ====================================================================== Get returns *HttpRequest with GET method.
func (*XClient) Head ¶ added in v1.2.12
func (x *XClient) Head(url string) *client.HttpRequest
Head returns *HttpRequest with HEAD method.
type XDB ¶ added in v1.2.12
type XDB struct{}
XDB defined TODO
func (*XDB) GetOptions ¶ added in v1.2.12
func (x *XDB) GetOptions(db *xorm.Engine, keys ...string) (map[string]map[string]interface{}, error)
GetOptions defined TODO
func (*XDB) InRole ¶ added in v1.2.12
XDB defined TODO ====================================================================== ====================================================================== ====================================================================== InRole defined TODO
func (*XDB) PageSearch ¶ added in v1.2.12
func (x *XDB) PageSearch(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, formatters ...Formatter) (*types.PageList, error)
PageSearch defined TODO
func (*XDB) PersistFile ¶ added in v1.2.12
func (x *XDB) PersistFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
PersistFile defined TODO
type XReport ¶ added in v1.2.12
type XReport struct {
// contains filtered or unexported fields
}
XReport defined TODO
func (*XReport) Check ¶ added in v1.2.12
XReport defined TODO ====================================================================== ====================================================================== ====================================================================== Check defined TODO
func (*XReport) PageExport ¶ added in v1.2.12
func (x *XReport) PageExport(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, formatters ...Formatter) (*types.ExportInfo, error)
PageExport defined TODO
func (*XReport) ParseExcel ¶ added in v1.2.12
func (x *XReport) ParseExcel(r io.Reader, sheet interface{}, header ...[]map[string]interface{}) ([]map[string]string, error)
ParseExcel defined TODO
func (*XReport) SetOptionsetsFormat ¶ added in v1.2.12
func (svc *XReport) SetOptionsetsFormat(funk func(interface{}) func(interface{}) interface{})
SetOptionsetsFormat definedTODO
type Xlsx ¶
type Xlsx struct { SheetIndex interface{} FileName string SheetName string Header []map[string]interface{} TmplPath string Format func(interface{}) func(interface{}) interface{} Handler func(map[string]interface{}) map[string]interface{} // contains filtered or unexported fields }
Xlsx defined TODO