Documentation ¶
Index ¶
- Variables
- func GetMenuActionDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetMenuActionResourceDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetMenuDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- type Menu
- type MenuAction
- type MenuActionRepo
- func (a *MenuActionRepo) Create(ctx context.Context, item schema.MenuAction) error
- func (a *MenuActionRepo) Delete(ctx context.Context, id uint64) error
- func (a *MenuActionRepo) DeleteByMenuID(ctx context.Context, menuID uint64) error
- func (a *MenuActionRepo) Get(ctx context.Context, id uint64, opts ...schema.MenuActionQueryOptions) (*schema.MenuAction, error)
- func (a *MenuActionRepo) Query(ctx context.Context, params schema.MenuActionQueryParam, ...) (*schema.MenuActionQueryResult, error)
- func (a *MenuActionRepo) Update(ctx context.Context, id uint64, item schema.MenuAction) error
- type MenuActionResource
- type MenuActionResourceRepo
- func (a *MenuActionResourceRepo) Create(ctx context.Context, item schema.MenuActionResource) error
- func (a *MenuActionResourceRepo) Delete(ctx context.Context, id uint64) error
- func (a *MenuActionResourceRepo) DeleteByActionID(ctx context.Context, actionID uint64) error
- func (a *MenuActionResourceRepo) DeleteByMenuID(ctx context.Context, menuID uint64) error
- func (a *MenuActionResourceRepo) Get(ctx context.Context, id uint64, opts ...schema.MenuActionResourceQueryOptions) (*schema.MenuActionResource, error)
- func (a *MenuActionResourceRepo) Query(ctx context.Context, params schema.MenuActionResourceQueryParam, ...) (*schema.MenuActionResourceQueryResult, error)
- func (a *MenuActionResourceRepo) Update(ctx context.Context, id uint64, item schema.MenuActionResource) error
- type MenuActionResources
- type MenuActions
- type MenuRepo
- func (a *MenuRepo) Create(ctx context.Context, item schema.Menu) error
- func (a *MenuRepo) Delete(ctx context.Context, id uint64) error
- func (a *MenuRepo) Get(ctx context.Context, id uint64, opts ...schema.MenuQueryOptions) (*schema.Menu, error)
- func (a *MenuRepo) Query(ctx context.Context, params schema.MenuQueryParam, ...) (*schema.MenuQueryResult, error)
- func (a *MenuRepo) Update(ctx context.Context, id uint64, item schema.Menu) error
- func (a *MenuRepo) UpdateParentPath(ctx context.Context, id uint64, parentPath string) error
- func (a *MenuRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Menus
- type SchemaMenu
- type SchemaMenuAction
- type SchemaMenuActionResource
Constants ¶
This section is empty.
Variables ¶
View Source
var MenuActionResourceSet = wire.NewSet(wire.Struct(new(MenuActionResourceRepo), "*"))
View Source
var MenuActionSet = wire.NewSet(wire.Struct(new(MenuActionRepo), "*"))
Functions ¶
func GetMenuActionResourceDB ¶
Types ¶
type Menu ¶
type Menu struct { util.Model Name string `gorm:"size:50;index;default:'';not null;"` // 菜单名称 Icon *string `gorm:"size:255;"` // 菜单图标 Router *string `gorm:"size:255;"` // 访问路由 ParentID *uint64 `gorm:"index;default:0;"` // 父级内码 ParentPath *string `gorm:"size:512;index;default:'';"` // 父级路径 IsShow int `gorm:"index;default:0;"` // 是否显示(1:显示 2:隐藏) Status int `gorm:"index;default:0;"` // 状态(1:启用 2:禁用) Sequence int `gorm:"index;default:0;"` // 排序值 Memo *string `gorm:"size:1024;"` // 备注 Creator uint64 `gorm:""` // 创建人 }
func (Menu) ToSchemaMenu ¶
type MenuAction ¶
type MenuAction struct { util.Model MenuID uint64 `gorm:"index;not null;"` // 菜单ID Code string `gorm:"size:100;"` // 动作编号 Name string `gorm:"size:100;"` // 动作名称 }
func (MenuAction) ToSchemaMenuAction ¶
func (a MenuAction) ToSchemaMenuAction() *schema.MenuAction
type MenuActionRepo ¶
func (*MenuActionRepo) Create ¶
func (a *MenuActionRepo) Create(ctx context.Context, item schema.MenuAction) error
func (*MenuActionRepo) Delete ¶
func (a *MenuActionRepo) Delete(ctx context.Context, id uint64) error
func (*MenuActionRepo) DeleteByMenuID ¶
func (a *MenuActionRepo) DeleteByMenuID(ctx context.Context, menuID uint64) error
func (*MenuActionRepo) Get ¶
func (a *MenuActionRepo) Get(ctx context.Context, id uint64, opts ...schema.MenuActionQueryOptions) (*schema.MenuAction, error)
func (*MenuActionRepo) Query ¶
func (a *MenuActionRepo) Query(ctx context.Context, params schema.MenuActionQueryParam, opts ...schema.MenuActionQueryOptions) (*schema.MenuActionQueryResult, error)
func (*MenuActionRepo) Update ¶
func (a *MenuActionRepo) Update(ctx context.Context, id uint64, item schema.MenuAction) error
type MenuActionResource ¶
type MenuActionResource struct { util.Model ActionID uint64 `gorm:"index;not null;"` // 菜单动作ID Method string `gorm:"size:50;"` // 资源请求方式(支持正则) Path string `gorm:"size:255;"` // 资源请求路径(支持/:id匹配) }
func (MenuActionResource) ToSchemaMenuActionResource ¶
func (a MenuActionResource) ToSchemaMenuActionResource() *schema.MenuActionResource
type MenuActionResourceRepo ¶
func (*MenuActionResourceRepo) Create ¶
func (a *MenuActionResourceRepo) Create(ctx context.Context, item schema.MenuActionResource) error
func (*MenuActionResourceRepo) Delete ¶
func (a *MenuActionResourceRepo) Delete(ctx context.Context, id uint64) error
func (*MenuActionResourceRepo) DeleteByActionID ¶
func (a *MenuActionResourceRepo) DeleteByActionID(ctx context.Context, actionID uint64) error
func (*MenuActionResourceRepo) DeleteByMenuID ¶
func (a *MenuActionResourceRepo) DeleteByMenuID(ctx context.Context, menuID uint64) error
func (*MenuActionResourceRepo) Get ¶
func (a *MenuActionResourceRepo) Get(ctx context.Context, id uint64, opts ...schema.MenuActionResourceQueryOptions) (*schema.MenuActionResource, error)
func (*MenuActionResourceRepo) Query ¶
func (a *MenuActionResourceRepo) Query(ctx context.Context, params schema.MenuActionResourceQueryParam, opts ...schema.MenuActionResourceQueryOptions) (*schema.MenuActionResourceQueryResult, error)
func (*MenuActionResourceRepo) Update ¶
func (a *MenuActionResourceRepo) Update(ctx context.Context, id uint64, item schema.MenuActionResource) error
type MenuActionResources ¶
type MenuActionResources []*MenuActionResource
func (MenuActionResources) ToSchemaMenuActionResources ¶
func (a MenuActionResources) ToSchemaMenuActionResources() []*schema.MenuActionResource
type MenuActions ¶
type MenuActions []*MenuAction
func (MenuActions) ToSchemaMenuActions ¶
func (a MenuActions) ToSchemaMenuActions() []*schema.MenuAction
type MenuRepo ¶
func (*MenuRepo) Query ¶
func (a *MenuRepo) Query(ctx context.Context, params schema.MenuQueryParam, opts ...schema.MenuQueryOptions) (*schema.MenuQueryResult, error)
func (*MenuRepo) UpdateParentPath ¶
type SchemaMenu ¶
func (SchemaMenu) ToMenu ¶
func (a SchemaMenu) ToMenu() *Menu
type SchemaMenuAction ¶
type SchemaMenuAction schema.MenuAction
func (SchemaMenuAction) ToMenuAction ¶
func (a SchemaMenuAction) ToMenuAction() *MenuAction
type SchemaMenuActionResource ¶
type SchemaMenuActionResource schema.MenuActionResource
func (SchemaMenuActionResource) ToMenuActionResource ¶
func (a SchemaMenuActionResource) ToMenuActionResource() *MenuActionResource
Click to show internal directories.
Click to hide internal directories.