bot

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTextLength     = 2048
	MaxMarkdownLength = 4096
)

Variables

View Source
var (
	BuildAppName    = "?"
	BuildTime       = "?"
	BuildCommitHash = "?"
	BuildGoVersion  = "?"
	BuildVersion    = "?"
)

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(hook string) *App

func (*App) SendMarkdown

func (a *App) SendMarkdown(content string) error

func (*App) SendText

func (a *App) SendText(content string, mentionedList, mentionedMobileList []string) error

type Messages

type Messages struct {
	MsgType  string      `json:"msgtype"`
	Text     MsgText     `json:"text,omitempty"`
	Markdown MsgMarkdown `json:"markdown,omitempty"`
	Image    MsgImage    `json:"image,omitempty"`
	News     MsgNews     `json:"news,omitempty"`
}

type MsgArticles

type MsgArticles struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Picurl      string `json:"picurl"`
}

type MsgImage

type MsgImage struct {
	Base64 string `json:"base64"`
	Md5    string `json:"md5"`
}

type MsgMarkdown

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

type MsgNews

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

type MsgText

type MsgText struct {
	Content             string   `json:"content"`
	MentionedList       []string `json:"mentioned_list,omitempty"`
	MentionedMobileList []string `json:"mentioned_mobile_list,omitempty"`
}

Jump to

Keyboard shortcuts

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