Version: v1.1.1 Latest Latest

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 7 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type CardRequest added in v1.1.0

type CardRequest struct {
	Msgtype      string       `json:"msgtype"`
	TemplateCard TemplateCard `json:"template_card"`

type JumpList added in v1.1.0

type JumpList struct {
	Type     int    `json:"type"`
	Url      string `json:"url,omitempty"`
	Title    string `json:"title"`
	Appid    string `json:"appid,omitempty"`
	Pagepath string `json:"pagepath,omitempty"`

type MarkdownRequest added in v1.0.2

type MarkdownRequest struct {
	Msgtype  string                 `json:"msgtype"`
	Markdown map[string]interface{} `json:"markdown"`

type Request added in v1.0.2

type Request struct {
	Msgtype string                 `json:"msgtype"`
	Text    map[string]interface{} `json:"text"`

type Response added in v1.0.2

type Response struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`

type Robot added in v1.0.2

type Robot struct {
	Token string

func NewRobot

func NewRobot() *Robot

func (*Robot) CardMessage added in v1.0.2

func (r *Robot) CardMessage(title, text string, btns []map[string]string) error

func (*Robot) MarkdownMessage added in v1.0.2

func (r *Robot) MarkdownMessage(md string, at ...string) error

func (*Robot) Message added in v1.0.2

func (r *Robot) Message(content string, at ...string) error

func (*Robot) SetToken added in v1.0.2

func (r *Robot) SetToken(token string)

type TemplateCard added in v1.1.0

type TemplateCard struct {
	CardType  string `json:"card_type"`
	MainTitle struct {
		Title string `json:"title"`
		Desc  string `json:"desc"`
	} `json:"main_title"`
	SubTitleText string     `json:"sub_title_text"`
	JumpList     []JumpList `json:"jump_list"`
	CardAction   struct {
		Type     int    `json:"type"`
		Url      string `json:"url"`
		Appid    string `json:"appid"`
		Pagepath string `json:"pagepath"`
	} `json:"card_action"`

Jump to

Keyboard shortcuts

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