structs

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Zlib Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Articles

type Articles struct {
	Title  string `json:"title"`
	Desc   string `json:"description"`
	Url    string `json:"url"`
	Picurl string `json:"picurl"`
}

type Attribute

type Attribute struct {
	Type        int                   `json:"type"`
	Name        string                `json:"name"`
	Text        *AttributeText        `json:"text,omitempty"`
	Web         *AttributeWeb         `json:"web,omitempty"`
	MiniProgram *AttributeMiniProgram `json:"miniprogram,omitempty"`
}

type AttributeMiniProgram

type AttributeMiniProgram struct {
	Appid    string `json:"appid"`
	PagePath string `json:"pagepath"`
	Title    string `json:"title"`
}

type AttributeText

type AttributeText struct {
	Value string `json:"value"`
}

type AttributeWeb

type AttributeWeb struct {
	Url   string `json:"url"`
	Title string `json:"title"`
}

type BatchUserId

type BatchUserId struct {
	UseridList []string `json:"userid_list"`
	Cursor     string   `json:"cursor"`
	Limit      int      `json:"limit"`
}

type BatchUserIdRes

type BatchUserIdRes struct {
	ExternalContactList []ExternalContactDetail `json:"external_contact_list"`
	NextCursor          string                  `json:"next_cursor"`
}

type Content

type Content struct {
	Content string `json:"content"`
}

type CreateUser

type CreateUser struct {
	Userid           string           `json:"userid"`
	Name             string           `json:"name"`
	Alias            string           `json:"alias"`
	Mobile           string           `json:"mobile"`
	Position         string           `json:"position"`
	Gender           string           `json:"gender"`
	Email            string           `json:"email"`
	BizMail          string           `json:"biz_mail"`
	AvatarMediaId    string           `json:"avatar_mediaid"`
	Telephone        string           `json:"telephone"`
	Address          string           `json:"address"`
	ExternalPosition string           `json:"external_position"`
	ToInvite         bool             `json:"to_invite"`
	Enable           int              `json:"enable"`
	MainDepartment   int              `json:"main_department"`
	Department       []int            `json:"department"`
	Order            []int            `json:"order"`
	IsLeaderInDept   []int            `json:"is_leader_in_dept"`
	DirectLeader     []string         `json:"direct_leader"`
	Extattr          *Attribute       `json:"extattr,omitempty"`
	ExternalProfile  *ExternalProfile `json:"external_profile,omitempty"`
}

type DepUser

type DepUser struct {
	Userid     string `json:"userid"`
	Department int    `json:"department"`
}

type Department

type Department struct {
	Name             string   `json:"name"`
	NameEn           string   `json:"name_en"`
	DepartmentLeader []string `json:"department_leader,omitempty"`
	Id               int      `json:"id"`
	ParentId         int      `json:"parentid"`
	Order            int      `json:"order"`
}

type DepartmentId

type DepartmentId struct {
	Id       int `json:"id"`
	ParentId int `json:"parentid"`
	Order    int `json:"order"`
}
type ExLink struct {
	Title  string `json:"title"`
	Picurl string `json:"picurl"`
	Desc   string `json:"desc"`
	Url    string `json:"url"`
}

type ExMsgTemplate

type ExMsgTemplate struct {
	ExUseIds []string   `json:"external_userid"`
	Sender   string     `json:"sender"`
	Text     *Content   `json:"text,omitempty"`
	Image    *Image     `json:"image,omitempty"`
	Link     *ExLink    `json:"link,omitempty"`
	Program  *ExProgram `json:"miniprogram,omitempty"`
}

type ExProgram

type ExProgram struct {
	Title   string `json:"title"`        //"title": "消息标题",
	MediaId string `json:"pic_media_id"` //"pic_media_id": "MEDIA_ID",
	AppId   string `json:"appid"`        //"appid": "wx8bd80126147df384",
	Page    string `json:"page"`         //"page": "/path/index"
}

type ExWelcomeMsg

type ExWelcomeMsg struct {
	Text        *Content   `json:"text,omitempty"`
	Image       *Image     `json:"image,omitempty"`
	Link        *ExLink    `json:"link,omitempty"`
	MiniProgram *ExProgram `json:"miniprogram,omitempty"`
	Code        int64      `json:"welcome_code"`
}

func (*ExWelcomeMsg) IsAgent

func (h *ExWelcomeMsg) IsAgent() bool

func (*ExWelcomeMsg) IsGroup

func (h *ExWelcomeMsg) IsGroup() bool

func (*ExWelcomeMsg) IsWelcome

func (h *ExWelcomeMsg) IsWelcome() bool

type ExternalContact

type ExternalContact struct {
	ExternalUserid  string           `json:"external_userid"`
	Name            string           `json:"name"`
	Position        string           `json:"position"`
	Avatar          string           `json:"avatar"`
	CorpName        string           `json:"corp_name"`
	CorpFullName    string           `json:"corp_full_name"`
	Type            int              `json:"type"`
	Gender          int              `json:"gender"`
	UnionId         string           `json:"unionid"`
	ExternalProfile *ExternalProfile `json:"external_profile,omitempty"`
}

type ExternalContactDetail

type ExternalContactDetail struct {
	ExternalContact ExternalContact `json:"external_contact"`
	FollowInfo      FollowInfo      `json:"follow_info"`
}

type ExternalProfile

type ExternalProfile struct {
	ExternalAttr     []Attribute    `json:"external_attr,omitempty"`
	WechatChannels   WechatChannels `json:"wechat_channels,omitempty"`
	ExternalCorpName string         `json:"external_corp_name,omitempty"`
}

type ExternalRemark

type ExternalRemark struct {
	Userid           string   `json:"userid"`
	ExternalUserid   string   `json:"external_userid"`
	Remark           string   `json:"remark"`
	Description      string   `json:"description"`
	RemarkCompany    string   `json:"remark_company"`
	RemarkPicMediaId string   `json:"remark_pic_mediaid"`
	RemarkMobiles    []string `json:"remark_mobiles"`
}

type ExternalUserIdItem

type ExternalUserIdItem struct {
	ExternalUserid    string `json:"external_userid"`
	NewExternalUserid string `json:"new_external_userid"`
}

type ExternalUserIdList

type ExternalUserIdList struct {
	ExternalUserid []string `json:"external_userid"`
}

type ExternalUserIds

type ExternalUserIds struct {
	Items []ExternalUserIdItem `json:"items"`
}

type FollowInfo

type FollowInfo struct {
	Userid         string         `json:"userid"`
	Remark         string         `json:"remark"`
	Description    string         `json:"description"`
	TagId          []string       `json:"tag_id,omitempty"`
	RemarkMobiles  []string       `json:"remark_mobiles,omitempty"`
	RemarkCorpName string         `json:"remark_corp_name,omitempty"`
	OperUserid     string         `json:"oper_userid"`
	State          string         `json:"state,omitempty"`
	CreateTime     int            `json:"createtime"`
	AddWay         int            `json:"add_way"`
	WechatChannels WechatChannels `json:"wechat_channels,omitempty"`
}

type Group

type Group struct {
	Id    string   `json:"chatid"`
	Name  string   `json:"name"`
	Owner string   `json:"owner"`
	Users []string `json:"userlist"`
}

Group 群组

type Head struct {
	ChatId  string `json:"chatid,omitempty"`
	AgentId int64  `json:"agentid,omitempty"` //应用id
	ToUser  string `json:"touser,omitempty"`  //企业号中的用户帐号
	ToTag   string `json:"totag,omitempty"`   //企业号中的标签id,群发使用(推荐)
	ToParty string `json:"toparty,omitempty"` //企业号中的部门id,群发时使用。
	Type    string `json:"msgtype"`
	Safe    int    `json:"safe"`
}

{ "chatid": "", "touser": "UserID1|UserID2|UserID3", "toparty": " PartyID1 | PartyID2 ", "totag": " TagID1 | TagID2 ", "agentid": 1, "msgtype": "text", "text": { "content": "Holiday Service For Pony(http://xxxxx)" }, "safe":0 }

func (*Head) IsAgent

func (h *Head) IsAgent() bool

func (*Head) IsGroup

func (h *Head) IsGroup() bool

func (*Head) IsWelcome

func (h *Head) IsWelcome() bool

type Image

type Image struct {
	MediaId string `json:"media_id"`
}

type ImageMsg

type ImageMsg struct {
	Head
	Image Image `json:"image"`
}

ImageMsg 图片消息

type MarkdownMsg

type MarkdownMsg struct {
	Head
	Markdown Content `json:"markdown"`
}

type Message

type Message interface {
	IsGroup() bool
	IsAgent() bool
	IsWelcome() bool
}

type News

type News struct {
	Articles []Articles `json:"articles"`
}

News "news" : { "articles" : [ { "title" : "中秋节礼品领取", "description" : "今年中秋节公司有豪礼相送", "url" : "URL", "picurl" : "http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png" }

type NewsMsg

type NewsMsg struct {
	Head
	News News `json:"news"`
}

NewsMsg 图文消息

type OpenUserId

type OpenUserId struct {
	OpenUseridList    []OpenUserIdInfo `json:"open_userid_list"`
	InvalidUseridList []string         `json:"invalid_userid_list"`
}

type OpenUserIdInfo

type OpenUserIdInfo struct {
	Userid     string `json:"userid"`
	OpenUserid string `json:"open_userid"`
}

type TextCard

type TextCard struct {
	Title  string `json:"title"`
	Desc   string `json:"description"`
	Url    string `json:"url"`
	BtnTxt string `json:"btntxt"`
}

TextCard "textcard" : { "title" : "领奖通知", "description" : "<div class=\"gray\">2016年9月26日</div> <div class=\"normal\">恭喜你抽中iPhone 7一台,领奖码:xxxx</div><div class=\"highlight\">请于2016年10月10日前联系行政同事领取</div>", "url" : "URL", "btntxt":"更多" }

type TextCardMsg

type TextCardMsg struct {
	Head
	TextCard TextCard `json:"textcard"`
}

TextCardMsg 文本卡片消息

type TextMsg

type TextMsg struct {
	Head
	Text Content `json:"text"`
}

TextMsg 文本消息

type ToAgent

type ToAgent struct {
	AgentId int64  `json:"agentid,omitempty"` //应用id
	ToUser  string `json:"touser,omitempty"`  //企业号中的用户帐号
	ToTag   string `json:"totag,omitempty"`   //企业号中的标签id,群发使用(推荐)
	ToParty string `json:"toparty,omitempty"` //企业号中的部门id,群发时使用。
}

func (*ToAgent) IsAgent

func (to *ToAgent) IsAgent() (bool, *ToAgent)

func (*ToAgent) IsGroup

func (to *ToAgent) IsGroup() (bool, *ToGroup)

func (*ToAgent) IsRoot

func (to *ToAgent) IsRoot() (bool, *ToRoot)

type ToGroup

type ToGroup struct {
	ChatId string `json:"chatid,omitempty"`
}

func (*ToGroup) IsAgent

func (to *ToGroup) IsAgent() (bool, *ToAgent)

func (*ToGroup) IsGroup

func (to *ToGroup) IsGroup() (bool, *ToGroup)

type ToRoot

type ToRoot struct {
}

func (*ToRoot) IsAgent

func (to *ToRoot) IsAgent() (bool, *ToAgent)

func (*ToRoot) IsGroup

func (to *ToRoot) IsGroup() (bool, *ToGroup)

func (*ToRoot) IsRoot

func (to *ToRoot) IsRoot() (bool, *ToRoot)

type ToWho

type ToWho interface {
	IsGroup() (bool, *ToGroup)
	IsAgent() (bool, *ToAgent)
}

type UserIdReq

type UserIdReq struct {
	UseridList []string `json:"userid_list"`
}

type UserInfo

type UserInfo struct {
	Userid  string `json:"userid"`
	Gender  string `json:"gender"`
	Avatar  string `json:"avatar"`
	QrCode  string `json:"qr_code"`
	Mobile  string `json:"mobile"`
	Email   string `json:"email"`
	BizMail string `json:"biz_mail"`
	Address string `json:"address"`
}

type UserInfoWithCode

type UserInfoWithCode struct {
	Userid string `json:"userid"`
	OpenId string `json:"openid"`
}

type Video

type Video struct {
	MediaId string `json:"media_id"`
	Title   string `json:"title"`
	Desc    string `json:"description"`
}

type VideoMsg

type VideoMsg struct {
	Head
	Video Video `json:"video"`
}

VideoMsg 视频消息

type Voice

type Voice struct {
	MediaId string `json:"media_id"`
}

type VoiceMsg

type VoiceMsg struct {
	Head
	Voice Voice `json:"voice"`
}

VoiceMsg 语音消息

type WechatChannels

type WechatChannels struct {
	Nickname string `json:"nickname"`
	Source   int    `json:"source,omitempty"`
}

Jump to

Keyboard shortcuts

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