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 Cache
- type Db
- type Export
- type Formatter
- type Http
- type Svc
- type SvcHepler
- func (svc *SvcHepler) Check(ctx *gin.Context) bool
- func (svc *SvcHepler) Delete(url string) *http.HttpRequest
- func (svc *SvcHepler) Get(url string) *http.HttpRequest
- func (svc *SvcHepler) GetCache(key string, v interface{}) error
- func (svc *SvcHepler) GetOptions(db *xorm.Engine, keys ...string) (map[string]map[string]interface{}, error)
- func (svc *SvcHepler) Head(url string) *http.HttpRequest
- func (svc *SvcHepler) InAdmin(db *xorm.Engine, userId string, role ...string) bool
- func (svc *SvcHepler) InRole(db *xorm.Engine, userId string, role ...string) bool
- func (svc *SvcHepler) PageExport(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, ...) (*types.ExportInfo, error)
- func (svc *SvcHepler) PageSearch(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, ...) (*types.PageList, error)
- func (svc *SvcHepler) ParseExcel(r io.Reader, sheet interface{}, header ...[]map[string]interface{}) ([]map[string]string, error)
- func (svc *SvcHepler) Persist(db *xorm.Session, ids ...string) (int64, error)
- func (svc *SvcHepler) PersistFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
- func (svc *SvcHepler) Post(url string) *http.HttpRequest
- func (svc *SvcHepler) Put(url string) *http.HttpRequest
- func (svc *SvcHepler) Remove(db *xorm.Session, ids ...string) (int64, error)
- func (svc *SvcHepler) RemoveFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
- func (svc *SvcHepler) SetCache(key string, v interface{}, expire time.Duration) error
- func (svc *SvcHepler) SetOptionsetsFormat(funk func(interface{}) func(interface{}) interface{})
- func (svc *SvcHepler) TreeSearch(db *xorm.Engine, controller, api, table string, q map[string]interface{}, ...) (interface{}, error)
- 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 Cache ¶
type Cache interface { SetCache(key string, v interface{}, expire time.Duration) error GetCache(key string, v interface{}) error }
Cache defined TODO
type Db ¶
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 Export ¶
type Export interface { Check(*gin.Context) 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{}) }
Export defined TODO
type Http ¶
type Http interface { // Get returns *HttpRequest with GET method. Get(url string) *http.HttpRequest // Post returns *HttpRequest with POST method. Post(url string) *http.HttpRequest // Put returns *HttpRequest with PUT method. Put(url string) *http.HttpRequest // Delete returns *HttpRequest DELETE method. Delete(url string) *http.HttpRequest // Head returns *HttpRequest with HEAD method. Head(url string) *http.HttpRequest }
Http defined TODO
type SvcHepler ¶
type SvcHepler struct {
// contains filtered or unexported fields
}
SvcHepler defined TODO
func (*SvcHepler) Delete ¶
func (svc *SvcHepler) Delete(url string) *http.HttpRequest
Delete returns *HttpRequest DELETE method.
func (*SvcHepler) Get ¶
func (svc *SvcHepler) Get(url string) *http.HttpRequest
Get returns *HttpRequest with GET method.
func (*SvcHepler) GetOptions ¶
func (svc *SvcHepler) GetOptions(db *xorm.Engine, keys ...string) (map[string]map[string]interface{}, error)
GetOptions defined TODO
func (*SvcHepler) Head ¶
func (svc *SvcHepler) Head(url string) *http.HttpRequest
Head returns *HttpRequest with HEAD method.
func (*SvcHepler) PageExport ¶
func (svc *SvcHepler) PageExport(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, formatters ...Formatter) (*types.ExportInfo, error)
PageExport defined TODO
func (*SvcHepler) PageSearch ¶
func (svc *SvcHepler) PageSearch(db *xorm.Engine, ctr, api, table string, params map[string]interface{}, formatters ...Formatter) (*types.PageList, error)
PageSearch defined TODO
func (*SvcHepler) ParseExcel ¶ added in v1.2.3
func (svc *SvcHepler) ParseExcel(r io.Reader, sheet interface{}, header ...[]map[string]interface{}) ([]map[string]string, error)
ParseExcel defined TODO
func (*SvcHepler) PersistFile ¶
func (svc *SvcHepler) PersistFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
PersistFile defined TODO
func (*SvcHepler) Post ¶
func (svc *SvcHepler) Post(url string) *http.HttpRequest
Post returns *HttpRequest with POST method.
func (*SvcHepler) Put ¶
func (svc *SvcHepler) Put(url string) *http.HttpRequest
Put returns *HttpRequest with PUT method.
func (*SvcHepler) RemoveFile ¶
func (svc *SvcHepler) RemoveFile(db *xorm.Session, cb func([]types.SysAttachment) error, ids ...string) (int64, error)
RemoveFile defined TODO
func (*SvcHepler) SetOptionsetsFormat ¶
func (svc *SvcHepler) 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
Click to show internal directories.
Click to hide internal directories.