config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentId, _ = strconv.ParseInt(os.Getenv("AGENT_ID"), 10, 64)
View Source
var CorpId = os.Getenv("CORP_ID")
View Source
var CorpSecret = os.Getenv("CORP_SECRET")
View Source
var DuplicateCheckInterval = 300 // 重复消息检查的时间间隔,单位秒,最大不超过4小时
View Source
var EnableDuplicateCheck = 1 // 是否开启重复消息检查,0表示否,1表示是
View Source
var GetTokenUrl = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ID&corpsecret=SECRET"
View Source
var MediaId = os.Getenv("MEDIA_ID")
View Source
var MsgTypeMarkdown = "markdown"
View Source
var MsgTypeMpNews = "mpnews"
View Source
var MsgTypeText = "text"
View Source
var SendMsgUrl = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=ACCESS_TOKEN"

Functions

This section is empty.

Types

type ApiRequest

type ApiRequest struct {
	HttpMethod     string            `json:"httpMethod"`
	QueryString    map[string]string `json:"queryString"`
	Body           string            `json:"body"`
	PathParameters map[string]string `json:"pathParameters"`
}

type SimpleRequest

type SimpleRequest struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	MsgType string `json:"type"`
	ToUser  string `json:"touser"`
	ToParty string `json:"toparty"`
	ToTag   string `json:"totag"`
}

func ParseRequest

func ParseRequest(event map[string]interface{}) (*SimpleRequest, error)

Jump to

Keyboard shortcuts

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