slack

package
v0.0.0-...-73c6684 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AlarmChannel = "alarm"

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type Channel

type Channel struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	IsChannel bool   `json:"is_channel"`
}

type ChannelHistoryResponse

type ChannelHistoryResponse struct {
	*Response
	Messages []Message `json:"messages"`
	HasMore  bool      `json:"has_more"`
}

type ChannelListResponse

type ChannelListResponse struct {
	*Response
	Channels []Channel `json:"channels"`
}

type Client

type Client struct {
	Configuration model.Slack
}

func (*Client) GetChannelList

func (s *Client) GetChannelList() (ChannelListResponse, error)

func (*Client) GetLocationChangeChannelHistory

func (s *Client) GetLocationChangeChannelHistory(channel string) (*ChannelHistoryResponse, error)

func (*Client) SendMessageToChannel

func (s *Client) SendMessageToChannel(channel string, message string) error

type Message

type Message struct {
	Username    string       `json:"username"`
	Text        string       `json:"text"`
	Attachments []Attachment `json:"attachments"`
}

type Response

type Response struct {
	Ok bool `json:"ok"`
}

Jump to

Keyboard shortcuts

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