oa

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

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(nextOpenid string) (res map[string]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)
}

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 {
	Tenant            int64  `json:"tenant"`
	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"`
	GetComponentToken GetComponentAccessToken
}

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 added in v1.0.2

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