menu

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateMenuActionData

type CreateMenuActionData struct {
	MenuId int64  `json:"menu_id"` // 菜单栏ID
	Method string `json:"method"`  // 请求方法
	API    string `json:"api"`     // 请求地址
}

type CreateMenuData

type CreateMenuData struct {
	Pid   int64  // 父类ID
	Name  string // 菜单名称
	Link  string // 链接地址
	Icon  string // 图标
	Level int32  // 菜单类型 1:一级菜单 2:二级菜单
}

type SearchData

type SearchData struct {
	Pid int64 // 父类ID
}

type SearchListActionData

type SearchListActionData struct {
	MenuId int64 `json:"menu_id"` // 菜单栏ID
}

type SearchOneData

type SearchOneData struct {
	Id     int64 // 用户ID
	IsUsed int32 // 是否启用 1:是  -1:否
}

type Service

type Service interface {
	Create(ctx context.Context, menuData *CreateMenuData) (id int64, err error)
	Modify(ctx context.Context, id int64, menuData *UpdateMenuData) (err error)
	List(ctx context.Context, searchData *SearchData) (listData []*menu.Menu, err error)
	UpdateUsed(ctx context.Context, id int64, used int32) (err error)
	UpdateSort(ctx context.Context, id int64, sort int32) (err error)
	Delete(ctx context.Context, id int64) (err error)
	Detail(ctx context.Context, searchOneData *SearchOneData) (info *menu.Menu, err error)

	CreateAction(ctx context.Context, menuActionData *CreateMenuActionData) (id int64, err error)
	ListAction(ctx context.Context, searchListActionData *SearchListActionData) (listData []*menu_action.MenuAction, err error)
	DeleteAction(ctx context.Context, id int64) (err error)
	// contains filtered or unexported methods
}

func New

func New() Service

type UpdateMenuData

type UpdateMenuData struct {
	Name string // 菜单名称
	Link string // 链接地址
	Icon string // 图标
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL