menu

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionalMenuItem

type ConditionalMenuItem struct {
	Button    []Item `json:"button,omitempty"`
	MenuId    int64  `json:"menuid,omitempty"`
	MatchRule struct {
		GroupId            int64 `json:"group_id,omitempty"`
		ClientPlatformType int   `json:"client_platform_type,omitempty"`
	} `json:"matchrule,omitempty"`
}

type Item

type Item struct {
	Type      string `json:"type,omitempty"`
	Name      string `json:"name,omitempty"`
	Key       string `json:"key,omitempty"`
	Url       string `json:"url,omitempty"`
	MediaId   string `json:"media_id,omitempty"`
	ArticleId string `json:"article_id"`
	AppId     string `json:"appid,omitempty"`
	PagePath  string `json:"pagepath"`
	SubButton []Item `json:"sub_button,omitempty"`
}

Item 菜单项

type ListItem

type ListItem struct {
	Menu struct {
		Button []Item `json:"button"`
		MenuId int64  `json:"menuid"`
	} `json:"menu"`
	ConditionalMenu []ConditionalMenuItem `json:"conditionalmenu"`
}
type Menu struct {
	// contains filtered or unexported fields
}

Menu 菜单管理

func New

func New(account contracts.AccountInterface) *Menu
func (m *Menu) Create(menuItem []Item) error

Create 创建自定义菜单

func (m *Menu) Delete() error

Delete 删除自定义菜单

func (m *Menu) Info() (*ListItem, error)

Info 获取自定义菜单信息

Jump to

Keyboard shortcuts

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