slack

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMentionMetadata

type AppMentionMetadata struct {
	Channel           *ChannelMetadata `json:"channel,omitempty" mapstructure:"channel,omitempty"`
	AppSubscriptionID *string          `json:"appSubscriptionID,omitempty" mapstructure:"appSubscriptionID,omitempty"`
}

type AuthTestResponse

type AuthTestResponse struct {
	OK     bool   `json:"ok"`
	URL    string `json:"url"`
	Team   string `json:"team"`
	TeamID string `json:"team_id"`
	User   string `json:"user"`
	UserID string `json:"user_id"`
	BotID  string `json:"bot_id"`
	Error  string `json:"error,omitempty"`
}

type ChannelInfo

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

type ChannelMetadata

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

type ChatPostMessageRequest

type ChatPostMessageRequest struct {
	Channel         string        `json:"channel"`
	Text            string        `json:"text,omitempty"`
	Blocks          []interface{} `json:"blocks,omitempty"`
	ThreadTimestamp string        `json:"thread_ts,omitempty"`
}

type ChatPostMessageResponse

type ChatPostMessageResponse struct {
	OK      bool           `json:"ok"`
	Error   string         `json:"error,omitempty"`
	TS      string         `json:"ts,omitempty"`
	Message map[string]any `json:"message,omitempty"`
}

type Client

type Client struct {
	BotToken string
}

func NewClient

func NewClient(ctx core.AppInstallationContext) (*Client, error)

func (*Client) AuthTest

func (c *Client) AuthTest() (*AuthTestResponse, error)

func (*Client) GetChannelInfo

func (c *Client) GetChannelInfo(channel string) (*ChannelInfo, error)

func (*Client) ListChannels

func (c *Client) ListChannels() ([]ChannelInfo, error)

func (*Client) PostMessage

type ConversationsInfoResponse

type ConversationsInfoResponse struct {
	OK      bool         `json:"ok"`
	Error   string       `json:"error,omitempty"`
	Channel *ChannelInfo `json:"channel,omitempty"`
}

type ConversationsListResponse

type ConversationsListResponse struct {
	OK       bool          `json:"ok"`
	Error    string        `json:"error,omitempty"`
	Channels []ChannelInfo `json:"channels,omitempty"`
}

type EventPayload

type EventPayload struct {
	Type      string         `json:"type"`
	Event     map[string]any `json:"event"`
	Challenge string         `json:"challenge"`
}

type Metadata

type Metadata struct {
	URL    string `mapstructure:"url" json:"url"`
	TeamID string `mapstructure:"team_id" json:"team_id"`
	Team   string `mapstructure:"team" json:"team"`
	UserID string `mapstructure:"user_id" json:"user_id"`
	User   string `mapstructure:"user" json:"user"`
	BotID  string `mapstructure:"bot_id" json:"bot_id"`
}

type OnAppMention

type OnAppMention struct{}

func (*OnAppMention) Actions

func (t *OnAppMention) Actions() []core.Action

func (*OnAppMention) Color

func (t *OnAppMention) Color() string

func (*OnAppMention) Configuration

func (t *OnAppMention) Configuration() []configuration.Field

func (*OnAppMention) Description

func (t *OnAppMention) Description() string

func (*OnAppMention) ExampleData

func (t *OnAppMention) ExampleData() map[string]any

func (*OnAppMention) HandleAction

func (t *OnAppMention) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)

func (*OnAppMention) HandleWebhook

func (t *OnAppMention) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*OnAppMention) Icon

func (t *OnAppMention) Icon() string

func (*OnAppMention) Label

func (t *OnAppMention) Label() string

func (*OnAppMention) Name

func (t *OnAppMention) Name() string

func (*OnAppMention) OnAppMessage

func (t *OnAppMention) OnAppMessage(ctx core.AppMessageContext) error

func (*OnAppMention) Setup

func (t *OnAppMention) Setup(ctx core.TriggerContext) error

type OnAppMentionConfiguration

type OnAppMentionConfiguration struct {
	Channel string `json:"channel" mapstructure:"channel"`
}

type SendTextMessage

type SendTextMessage struct{}

func (*SendTextMessage) Actions

func (c *SendTextMessage) Actions() []core.Action

func (*SendTextMessage) Cancel

func (c *SendTextMessage) Cancel(ctx core.ExecutionContext) error

func (*SendTextMessage) Color

func (c *SendTextMessage) Color() string

func (*SendTextMessage) Configuration

func (c *SendTextMessage) Configuration() []configuration.Field

func (*SendTextMessage) Description

func (c *SendTextMessage) Description() string

func (*SendTextMessage) ExampleOutput

func (c *SendTextMessage) ExampleOutput() map[string]any

func (*SendTextMessage) Execute

func (c *SendTextMessage) Execute(ctx core.ExecutionContext) error

func (*SendTextMessage) HandleAction

func (c *SendTextMessage) HandleAction(ctx core.ActionContext) error

func (*SendTextMessage) HandleWebhook

func (c *SendTextMessage) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*SendTextMessage) Icon

func (c *SendTextMessage) Icon() string

func (*SendTextMessage) Label

func (c *SendTextMessage) Label() string

func (*SendTextMessage) Name

func (c *SendTextMessage) Name() string

func (*SendTextMessage) OutputChannels

func (c *SendTextMessage) OutputChannels(configuration any) []core.OutputChannel

func (*SendTextMessage) ProcessQueueItem

func (c *SendTextMessage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*SendTextMessage) Setup

func (c *SendTextMessage) Setup(ctx core.SetupContext) error

type SendTextMessageConfiguration

type SendTextMessageConfiguration struct {
	Channel string `json:"channel" mapstructure:"channel"`
	Text    string `json:"text" mapstructure:"text"`
}

type SendTextMessageMetadata

type SendTextMessageMetadata struct {
	Channel *ChannelMetadata `json:"channel" mapstructure:"channel"`
}

type Slack

type Slack struct{}

func (*Slack) CleanupWebhook

func (s *Slack) CleanupWebhook(ctx core.CleanupWebhookContext) error

func (*Slack) CompareWebhookConfig

func (s *Slack) CompareWebhookConfig(a, b any) (bool, error)

func (*Slack) Components

func (s *Slack) Components() []core.Component

func (*Slack) Configuration

func (s *Slack) Configuration() []configuration.Field

func (*Slack) Description

func (s *Slack) Description() string

func (*Slack) HandleRequest

func (s *Slack) HandleRequest(ctx core.HTTPRequestContext)

func (*Slack) Icon

func (s *Slack) Icon() string

func (*Slack) InstallationInstructions

func (s *Slack) InstallationInstructions() string

func (*Slack) Label

func (s *Slack) Label() string

func (*Slack) ListResources

func (s *Slack) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.ApplicationResource, error)

func (*Slack) Name

func (s *Slack) Name() string

func (*Slack) SetupWebhook

func (s *Slack) SetupWebhook(ctx core.SetupWebhookContext) (any, error)

func (*Slack) Sync

func (s *Slack) Sync(ctx core.SyncContext) error

func (*Slack) Triggers

func (s *Slack) Triggers() []core.Trigger

type SubscriptionConfiguration

type SubscriptionConfiguration struct {
	EventTypes []string `json:"eventTypes"`
}

Jump to

Keyboard shortcuts

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