slack

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionID

type ActionID string
const (
	// For alert
	ActionIDAckAlert  ActionID = "ack_alert"
	ActionIDBindAlert ActionID = "bind_alert"

	// For list
	ActionIDAckList  ActionID = "ack_list"
	ActionIDBindList ActionID = "bind_list"

	// For ticket
	ActionIDResolveTicket ActionID = "resolve_ticket"
	ActionIDSalvage       ActionID = "salvage"
)

func (ActionID) String

func (id ActionID) String() string

type BlockAction

type BlockAction slack.BlockAction

type BlockActionID

type BlockActionID string

ActionID in block

const (
	BlockActionIDTicketSelect     BlockActionID = "ticket_select_input"
	BlockActionIDTicketID         BlockActionID = "ticket_id_input"
	BlockActionIDTicketComment    BlockActionID = "ticket_comment_input"
	BlockActionIDTicketConclusion BlockActionID = "ticket_conclusion_input"
	BlockActionIDTicketTags       BlockActionID = "ticket_tags_input"
	BlockActionIDSalvageThreshold BlockActionID = "salvage_threshold_input"
	BlockActionIDSalvageKeyword   BlockActionID = "salvage_keyword_input"
	BlockActionIDSalvageRefresh   BlockActionID = "salvage_refresh_button"
)

func (BlockActionID) String

func (id BlockActionID) String() string

type BlockID

type BlockID string
const (
	BlockIDTicketSelect     BlockID = "ticket_select_block"
	BlockIDTicketID         BlockID = "ticket_id_block"
	BlockIDTicketConclusion BlockID = "ticket_conclusion_block"
	BlockIDTicketComment    BlockID = "ticket_comment_block"
	BlockIDTicketTags       BlockID = "ticket_tags_block"
	BlockIDSalvageThreshold BlockID = "salvage_threshold_block"
	BlockIDSalvageKeyword   BlockID = "salvage_keyword_block"
)

func (BlockID) String

func (id BlockID) String() string

type CallbackID

type CallbackID string
const (
	CallbackSubmitResolveTicket CallbackID = "submit_resolve_ticket"
	CallbackSubmitBindAlert     CallbackID = "submit_bind_alert"
	CallbackSubmitBindList      CallbackID = "submit_bind_list"
	CallbackSubmitSalvage       CallbackID = "submit_salvage"
)

func (CallbackID) String

func (id CallbackID) String() string

type Mention

type Mention struct {
	UserID  string
	Message string
}

func ParseMention

func ParseMention(input string) []Mention

type Message

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

func NewMessage

func NewMessage(ctx context.Context, ev *slackevents.EventsAPIEvent) *Message

func (*Message) ChannelID

func (x *Message) ChannelID() string

func (*Message) ID

func (x *Message) ID() string

func (*Message) InThread

func (x *Message) InThread() bool

func (*Message) Mention

func (x *Message) Mention() []Mention

func (*Message) TeamID

func (x *Message) TeamID() string

func (*Message) Text

func (x *Message) Text() string

func (*Message) Thread

func (x *Message) Thread() Thread

func (*Message) ThreadID

func (x *Message) ThreadID() string

func (*Message) Timestamp

func (x *Message) Timestamp() string

func (*Message) User

func (x *Message) User() *User

type PayloadVerifier

type PayloadVerifier func(ctx context.Context, header http.Header, payload []byte) error

func NewPayloadVerifier

func NewPayloadVerifier(signingSecret string) PayloadVerifier

type StateValue

type StateValue map[string]map[string]BlockAction

func BlockActionFromValue

func BlockActionFromValue(value map[string]map[string]slack.BlockAction) StateValue

type Thread

type Thread struct {
	TeamID    string `json:"team_id"`
	ChannelID string `json:"channel_id"`
	ThreadID  string `json:"thread_id"`
}

type User

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

Jump to

Keyboard shortcuts

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