Versions in this module Expand all Collapse all v0 v0.0.13 Aug 24, 2022 v0.0.12 Aug 24, 2022 v0.0.11 Aug 24, 2022 v0.0.10 Aug 24, 2022 v0.0.9 Aug 24, 2022 v0.0.8 Aug 24, 2022 v0.0.7 Aug 24, 2022 Changes in this version + var Cache = gcache.New() + var CacheEPS = gcache.New() + var GromDBS MGromDBS + func CreateTable(model IModel) error + func FillInitData(moduleName string, model IModel) error + func GDBModel(m IModel) *gdb.Model + func GVartoType(GVar *g.Var, wantType string) interface + func GetDBbyModel(model IModel) *gorm.DB + func MiddlewareHandlerResponse(r *ghttp.Request) + func RegisterController(c IController) + func RegisterControllerSimple(perfix string, controller IControllerSimple) + type AddReq struct + type Admin struct + IsRefresh bool + PasswordVersion *int32 + RoleIds []int + UserId uint + Username string + func GetAdmin(ctx context.Context) *Admin + type BaseRes struct + Code int + Data interface{} + Message string + func Ok(data interface{}) *BaseRes + type Controller struct + Api g.ArrayStr + Perfix 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 + Perfix 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 IModel interface + GroupName func() string + TableName func() string + type IService interface + 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 InfoRes struct + Data interface{} + type ListQueryOp struct + AddOrderby g.MapStrStr + FieldEQ []string + KeyWorkField []string + type ListReq struct + Order string + Sort string + type MGromDBS map[string]*gorm.DB + type Model struct + CreateTime *time.Time + DeletedAt gorm.DeletedAt + ID uint + UpdateTime *time.Time + func NewModel() *Model + func (m *Model) GroupName() string + func (m *Model) TableName() string + type PageReq struct + Page int + Size int + type Service struct + ListQueryOp *ListQueryOp + Model IModel + func NewService(model IModel) *Service + 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 v0.0.6 Aug 23, 2022 v0.0.5 Aug 23, 2022 v0.0.4 Aug 23, 2022 v0.0.3 Aug 22, 2022 v0.0.2 Aug 21, 2022 v0.0.1 Aug 21, 2022 Other modules containing this package github.com/cool-team-official/cool-admin-go/cool