slack

package
v0.0.0-...-0dcacab Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Fields []*AttachmentField `json:"fields"`
}

Attachment is an attachment.

type AttachmentField

type AttachmentField struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

AttachmentField is an attachment field.

type ChatPostMessageReq

type ChatPostMessageReq struct {
	Channel     string        `json:"channel"`
	IconEmoji   string        `json:"icon_emoji,omitempty"`
	Text        string        `json:"text"`
	Username    string        `json:"username,omitempty"`
	Attachments []*Attachment `json:"attachments"`
}

ChatPostMessageReq is a request for chat.postMessage method. https://api.slack.com/methods/chat.postMessage

type Client

type Client interface {
	ChatPostMessage(context.Context, *ChatPostMessageReq) error
}

Client is an interface of Slack Client.

func New

func New(token string) Client

New builds a new slack client.

Jump to

Keyboard shortcuts

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