Versions in this module Expand all Collapse all v1 v1.1.3 Jul 17, 2024 v1.1.2 Jul 17, 2024 Changes in this version type Service + func NewDaoService(dao IDao) *Service + func NewModelService(model IModel) *Service + func (s *Service) GetModel() IModel v1.1.1 Jul 17, 2024 v1.1.0 Jul 17, 2024 Changes in this version + var Versions = g.Map type IService + GetModel func() IModel type JoinOp + Dao IDao type Service + Model IModel v1.0.2 Jul 6, 2024 v1.0.1 Jul 6, 2024 v1.0.0 Jul 6, 2024 Changes in this version + var CacheEPS = gcache.New() + var CacheManager = gcache.New() + var Config = coreconfig.Config + var File = corefile.NewFile + var FuncMap = make(map[string]coreFunc) + var GetCfgWithDefault = coreconfig.GetCfgWithDefault + var GormDBS = make(map[string]*gorm.DB) + var I18n = gi18n.New() + var IsRedisMode = false + var ModelInfo = make(map[string][]*ColumnInfo) + var ProcessFlag = guid.S() + var RunMode = "dev" + var Version = g.Map + func ClusterRunFunc(ctx g.Ctx, funcstring string) (err error) + func CreateTable(model IModel) error + func DBM(m IModel) *gdb.Model + func FillInitData(ctx g.Ctx, moduleName string, model IModel) + func GDBM(m IModel) *gdb.Model + func GetFunc(name string) coreFunc + func GetVersions(name string) interface + func InitDB(group string) (*gorm.DB, error) + func ListenFunc(ctx g.Ctx) + func MiddlewareHandlerResponse(r *ghttp.Request) + func NewInit() + func RegisterController(c IController) + func RegisterControllerSimple(c IControllerSimple) + func RegisterFunc(name string, f coreFunc) + func RunFunc(ctx g.Ctx, funcstring string) (err error) + func SetVersions(name string, v string) + type AddReq struct + type BaseRes struct + Code int + Data interface{} + Message string + func Fail(message string) *BaseRes + func Ok(data interface{}) *BaseRes + type Claims struct + IsRefresh bool + PasswordVersion *int32 + RoleIds []string + UserId string + Username string + type ColumnInfo struct + Comment string + Length string + Nullable bool + PropertyName string + Type string + type Controller struct + Api g.ArrayStr + Prefix string + Service IService + func (c *Controller) Add(ctx context.Context, req *AddReq) (res *BaseRes, err error) + func (c *Controller) Delete(ctx context.Context, req *DeleteReq) (res *BaseRes, err error) + func (c *Controller) Info(ctx context.Context, req *InfoReq) (res *BaseRes, err error) + func (c *Controller) List(ctx context.Context, req *ListReq) (res *BaseRes, err error) + func (c *Controller) Page(ctx context.Context, req *PageReq) (res *BaseRes, err error) + func (c *Controller) Update(ctx context.Context, req *UpdateReq) (res *BaseRes, err error) + type ControllerSimple struct + Prefix string + type DefaultHandlerResponse struct + Code int + Data interface{} + Message string + type DeleteReq struct + Ids []int + type IController interface + Add func(ctx context.Context, req *AddReq) (res *BaseRes, err error) + Delete func(ctx context.Context, req *DeleteReq) (res *BaseRes, err error) + Info func(ctx context.Context, req *InfoReq) (res *BaseRes, err error) + List func(ctx context.Context, req *ListReq) (res *BaseRes, err error) + Page func(ctx context.Context, req *PageReq) (res *BaseRes, err error) + Update func(ctx context.Context, req *UpdateReq) (res *BaseRes, err error) + type IControllerSimple interface + type IDao interface + Ctx func(ctx context.Context) *gdb.Model + DB func() gdb.DB + Group func() string + Table func() string + type IModel interface + GroupName func() string + TableName func() string + type IService interface + GetDao func() IDao + ModifyAfter func(ctx context.Context, method string, param g.MapStrAny) (err error) + ModifyBefore func(ctx context.Context, method string, param g.MapStrAny) (err error) + ServiceAdd func(ctx context.Context, req *AddReq) (data interface{}, err error) + ServiceDelete func(ctx context.Context, req *DeleteReq) (data interface{}, err error) + ServiceInfo func(ctx context.Context, req *InfoReq) (data interface{}, err error) + ServiceList func(ctx context.Context, req *ListReq) (data interface{}, err error) + ServicePage func(ctx context.Context, req *PageReq) (data interface{}, err error) + ServiceUpdate func(ctx context.Context, req *UpdateReq) (data interface{}, err error) + type InfoReq struct + Id int + type JoinOp struct + Alias string + Condition string + Model IModel + Type JoinType + type JoinType string + const InnerJoin + const LeftJoin + const RightJoin + type ListReq struct + Order string + Sort string + type Model struct + CreateTime time.Time + DeletedAt time.Time + ID string + UpdateTime time.Time + func NewModel() *Model + func (m *Model) GroupName() string + func (m *Model) TableName() string + type PageReq struct + IsExport bool + MaxExportLimit int + Order string + Page int + Size int + Sort string + type QueryOp struct + AddOrderby g.MapStrStr + Extend func(ctx g.Ctx, m *gdb.Model) *gdb.Model + FieldEQ []string + Join []*JoinOp + KeyWordField []string + ModifyResult func(ctx g.Ctx, data interface{}) interface{} + Select string + Where func(ctx context.Context) []g.Array + type Service struct + Before func(ctx context.Context) (err error) + Dao IDao + InfoIgnoreProperty string + InsertParam func(ctx context.Context) g.MapStrAny + ListQueryOp *QueryOp + NotNullKey g.MapStrStr + PageQueryOp *QueryOp + UniqueKey g.MapStrStr + func NewService(dao IDao) *Service + func (s *Service) GetDao() IDao + func (s *Service) ModifyAfter(ctx context.Context, method string, param g.MapStrAny) (err error) + func (s *Service) ModifyBefore(ctx context.Context, method string, param g.MapStrAny) (err error) + func (s *Service) ServiceAdd(ctx context.Context, req *AddReq) (data interface{}, err error) + func (s *Service) ServiceDelete(ctx context.Context, req *DeleteReq) (data interface{}, err error) + func (s *Service) ServiceInfo(ctx context.Context, req *InfoReq) (data interface{}, err error) + func (s *Service) ServiceList(ctx context.Context, req *ListReq) (data interface{}, err error) + func (s *Service) ServicePage(ctx context.Context, req *PageReq) (data interface{}, err error) + func (s *Service) ServiceUpdate(ctx context.Context, req *UpdateReq) (data interface{}, err error) + type UpdateReq struct + func (u UpdateReq) Deadline() (deadline time.Time, ok bool) + func (u UpdateReq) Done() <-chan struct{} + func (u UpdateReq) Err() error + func (u UpdateReq) Value(key any) any