feishu

package
v0.0.0-...-d9a425f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClient

func InitClient()

func IssueDescription

func IssueDescription(payload webhook.PayLoad) string

func NewNotify

func NewNotify(config notify.Config) (notify.Notifier, error)

Types

type Element

type Element struct {
	Tag      string `json:"tag"`
	Text     string `json:"text"`
	Href     string `json:"href"`
	UserId   string `json:"user_id"`
	UserName string `json:"user_name"`
}

func MakeAtInfo

func MakeAtInfo(username string) (Element, error)

func TextElement

func TextElement(payload webhook.PayLoad, webhookIssue webhook.Issue, issueInfo linear.IssueInfo) Element

type Msg

type Msg struct {
	MsgType string     `json:"msg_type"`
	Content MsgContent `json:"content"`
}

Msg define feishu msg content

func LinearMsgToFeishu

func LinearMsgToFeishu(payLoad webhook.PayLoad, webhookIssue webhook.Issue, issueInfo linear.IssueInfo) Msg

type MsgContent

type MsgContent struct {
	Post PostCnContent `json:"post"`
}

type Notify

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

func (*Notify) Deliver

func (n *Notify) Deliver(payload webhook.PayLoad) error

type PostCnContent

type PostCnContent struct {
	ZhCn RichMsg `json:"zh_cn"`
}

type RichMsg

type RichMsg struct {
	Title   string      `json:"title"`
	Content [][]Element `json:"content"`
}

Jump to

Keyboard shortcuts

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