oa

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const JSAPI = "jsapi"
View Source
const WXCARD = "wx_card"

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Key() string
	Id() string
	Token() string
	GetAccountBasicInfo() (res map[string]interface{})
	QrcodeCreate(scene string, limit bool) (res map[string]interface{})
	TemplateGetAllPrivateTemplate() []interface{}
	TemplateApiAddTemplate(templateIdShort int, keywordNameList []string) (templateId string)
	TemplateDelPrivateTemplate(templateId string) (res bool)
	MessageTemplateSend(msg Message) error
	UserGet() (res []interface{})
	UserInfo(openId string) (res map[string]interface{})
	GetCurrentSelfMenuInfo() (res map[string]interface{})
	MenuCreate(button []Button) (err error)
	MenuDelete() (res bool)
	TicketGetTicket(ticketType string) (ticket string)
	AuthorizationCode(code string) (res map[string]interface{})
	CardCodeDecrypt(encryptCode string) (code string)
	OpenGet() (res string)
	OpenBind(openAppid string) (err error)
	OpenUnBind(openAppid string) (err error)
	OpenCreate() (res map[string]interface{})
}

func NewApp

func NewApp(config Config) App

type Button

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

Button 公众号菜单结构体

type Config

type Config struct {
	Key            string        `json:"key"`
	AppId          string        `json:"appid"`
	Secret         string        `json:"secret"`
	Token          string        `json:"token"`
	AesKey         string        `json:"aes_key"`
	ComponentAppid string        `json:"component_appid"`
	ComponentToken string        `json:"component_token"`
	Cache          cachego.Cache `json:"cache"`
}

type GetComponentAccessToken

type GetComponentAccessToken func() string

type Message

type Message struct {
	Touser      string      `json:"touser"`
	TemplateId  string      `json:"template_id"`
	Url         string      `json:"url,omitempty"`
	Miniprogram Miniprogram `json:"miniprogram,omitempty"`
	Data        interface{} `json:"data"`
}

Message 微信模板消息结构体

type Miniprogram

type Miniprogram struct {
	Appid    string `json:"appid,omitempty"`
	Pagepath string `json:"pagepath,omitempty"`
}

Miniprogram 微信小程序配置定义

Jump to

Keyboard shortcuts

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