slack

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SlackAPIURL = "https://slack.com/api"

Variables

This section is empty.

Functions

func NewConnector

func NewConnector() (*sdk.ConnectorPlugin, error)

Types

type SendDirectMessageOperation

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

func NewSendDirectMessageOperation

func NewSendDirectMessageOperation() *SendDirectMessageOperation

func (SendDirectMessageOperation) GetInfo

func (SendDirectMessageOperation) Run

func (SendDirectMessageOperation) Test

type SendDirectMessageOperationProps

type SendDirectMessageOperationProps struct {
	User    string `json:"user"`
	Message string `json:"message"`
}

type SendPrivateChannelMessage

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

func NewSendPrivateChannelMessageOperation

func NewSendPrivateChannelMessageOperation() *SendPrivateChannelMessage

func (SendPrivateChannelMessage) GetInfo

func (SendPrivateChannelMessage) Run

func (SendPrivateChannelMessage) Test

type SendPublicChannelMessage

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

func NewSendPublicChannelMessageOperation

func NewSendPublicChannelMessageOperation() *SendPublicChannelMessage

func (SendPublicChannelMessage) GetInfo

func (SendPublicChannelMessage) Run

func (SendPublicChannelMessage) Test

type SlackChannel

type SlackChannel struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type SlackChannelResponse

type SlackChannelResponse struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	IsChannel  bool   `json:"is_channel"`
	IsGroup    bool   `json:"is_group"`
	IsMpim     bool   `json:"is_mpim"`
	IsIM       bool   `json:"is_im"`
	IsPrivate  bool   `json:"is_private"`
	IsMember   bool   `json:"is_member"`
	IsArchived bool   `json:"is_archived"`
}

type SlackChannelsListResponse

type SlackChannelsListResponse struct {
	Ok       bool                   `json:"ok"`
	Error    string                 `json:"error"`
	Channels []SlackChannelResponse `json:"channels"`
	Metadata SlackMetadataResponse  `json:"response_metadata"`
}

type SlackGenericRespose

type SlackGenericRespose struct {
	Ok        bool   `json:"ok"`
	TimeStamp string `json:"ts"`
}

type SlackListUsersResponse

type SlackListUsersResponse struct {
	Ok        bool                  `json:"ok"`
	Error     string                `json:"error"` // Has value when Ok is false
	Members   []SlackUserResponse   `json:"members"`
	Timestamp int64                 `json:"cache_ts"` // Confirm if timestamp (seconds) is int64
	Metadata  SlackMetadataResponse `json:"response_metadata"`
}

type SlackMessage

type SlackMessage struct {
	Text      string `json:"text"`
	BotID     string `json:"bot_id"`
	Timestamp string `json:"ts"`
}

type SlackMetadataResponse

type SlackMetadataResponse struct {
	NextCursor string `json:"next_cursor"`
}

type SlackPostMessageResponse

type SlackPostMessageResponse struct {
	Ok        bool         `json:"ok"`
	Error     string       `json:"error"`
	Channel   string       `json:"channel"`
	Timestamp string       `json:"ts"`
	Message   SlackMessage `json:"message"`
}

type SlackUser

type SlackUser struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	RealName string `json:"real_name"`
}

type SlackUserResponse

type SlackUserResponse struct {
	ID       string `json:"id"`
	TeamID   string `json:"team_id"`
	Name     string `json:"name"`
	Deleted  bool   `json:"deleted"`
	RealName string `json:"real_name"`
	IsBot    bool   `json:"is_bot"`
}

Jump to

Keyboard shortcuts

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