Documentation ¶
Index ¶
- Variables
- func NewAction() map[string]Hooks
- func OptionWhereInit(db *gorm.DB, i interface{}) *gorm.DB
- func Order(dbs *gorm.DB, order map[string]interface{}, orderString string) *gorm.DB
- func RegsterHooks(options ...ResiterHooksOption)
- type Action
- type Grom
- func (g *Grom) ResiterAction(where string, hk HooksWhere)
- func (g *Grom) ResiterHooks(where string, hk Hooks)
- func (g *Grom) SeparatorDefualt(option *HooksOption) bool
- func (g *Grom) Where(db *gorm.DB, i interface{}) *gorm.DB
- func (g *Grom) WhereAction(option *HooksOption) bool
- func (g *Grom) WhereSeparator(option *HooksOption) *gorm.DB
- type GromInterface
- type Hooks
- type HooksOption
- type HooksWhere
- type ResiterHooksOption
Constants ¶
This section is empty.
Variables ¶
View Source
var Resiter []ResiterHooksOption
Functions ¶
func RegsterHooks ¶
func RegsterHooks(options ...ResiterHooksOption)
Types ¶
type Grom ¶
type Grom struct { Hooks []Hooks HooksList map[string]Hooks WhereList []string HooksWhere map[string]HooksWhere }
func (*Grom) ResiterAction ¶
func (g *Grom) ResiterAction(where string, hk HooksWhere)
func (*Grom) ResiterHooks ¶
*@Author Administrator *@Date 21/4/2021 13:22 *@desc
func (*Grom) SeparatorDefualt ¶
func (g *Grom) SeparatorDefualt(option *HooksOption) bool
func (*Grom) WhereAction ¶
func (g *Grom) WhereAction(option *HooksOption) bool
func (*Grom) WhereSeparator ¶
func (g *Grom) WhereSeparator(option *HooksOption) *gorm.DB
type GromInterface ¶
type GromInterface interface { ResiterHooks(where string, hk Hooks) ResiterAction(where string, hk HooksWhere) Where(db *gorm.DB, i interface{}) *gorm.DB }
func NewGorm ¶
func NewGorm() GromInterface
type Hooks ¶
type Hooks func(option *HooksOption) *gorm.DB
type HooksOption ¶
type HooksWhere ¶
type HooksWhere func(option *HooksOption) bool
type ResiterHooksOption ¶
type ResiterHooksOption struct { Hooks Hooks Action HooksWhere Where string }
Click to show internal directories.
Click to hide internal directories.