izyslackgo

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IzSlackBlock

type IzSlackBlock struct {
	Type     string            `json:"type"`
	BlockID  string            `json:"block_id"`
	Elements []IzySlackElement `json:"elements"`
}

type IzySlack

type IzySlack struct {
	Credentials *IzySlackCredentials
	Client      *slack.Client
}

func Initialize

func Initialize(signSecret string, token string) *IzySlack

func (*IzySlack) GetUserInfo added in v0.1.5

func (receiver *IzySlack) GetUserInfo(userId string) (*slack.User, error)

func (*IzySlack) HandleChallengeRequest

func (receiver *IzySlack) HandleChallengeRequest(w http.ResponseWriter, challenge string)

func (*IzySlack) HandleChallengeRequestLambda added in v0.1.3

func (receiver *IzySlack) HandleChallengeRequestLambda(challenge string) events.LambdaFunctionURLResponse

func (*IzySlack) IsChallengeRequest

func (receiver *IzySlack) IsChallengeRequest(body []byte) (bool, *string, error)

func (*IzySlack) ReceiveEvent

func (receiver *IzySlack) ReceiveEvent(body []byte) (*IzySlackEvent, error)

func (*IzySlack) ReplyMessage

func (receiver *IzySlack) ReplyMessage(channel string, text string, ts string) error

func (*IzySlack) ReplyWithFile added in v0.1.2

func (receiver *IzySlack) ReplyWithFile(channel string, filePath string, threadTs string) error

func (*IzySlack) SendMessage

func (receiver *IzySlack) SendMessage(channel string, text string) error

func (*IzySlack) UploadFile added in v0.1.2

func (receiver *IzySlack) UploadFile(channel string, filePath string) error

func (*IzySlack) VerifySignature

func (receiver *IzySlack) VerifySignature(header http.Header, body []byte) bool

func (*IzySlack) VerifySignatureLambda added in v0.1.3

func (receiver *IzySlack) VerifySignatureLambda(header map[string]string, body []byte) bool

type IzySlackAuthorization

type IzySlackAuthorization struct {
	EnterpriseID        *string `json:"enterprise_id"`
	TeamID              string  `json:"team_id"`
	UserID              string  `json:"user_id"`
	IsBot               bool    `json:"is_bot"`
	IsEnterpriseInstall bool    `json:"is_enterprise_install"`
}

type IzySlackCredentials

type IzySlackCredentials struct {
	SlackSignSecret string
	BotToken        string
}

type IzySlackElement

type IzySlackElement struct {
	Type     string               `json:"type"`
	Elements []IzySlackSubElement `json:"elements,omitempty"`
	UserID   string               `json:"user_id,omitempty"`
	Text     string               `json:"text,omitempty"`
}

type IzySlackEvent

type IzySlackEvent struct {
	Token          string                  `json:"token"`
	TeamID         string                  `json:"team_id"`
	APIAppID       string                  `json:"api_app_id"`
	Event          IzySlackSubEvent        `json:"event"`
	Type           string                  `json:"type"`
	EventID        string                  `json:"event_id"`
	EventTime      int64                   `json:"event_time"`
	Authorizations []IzySlackAuthorization `json:"authorizations"`
	IsExtShared    bool                    `json:"is_ext_shared_channel"`
	EventContext   string                  `json:"event_context"`
}

type IzySlackSubElement

type IzySlackSubElement struct {
	Type   string `json:"type"`
	UserID string `json:"user_id,omitempty"`
	Text   string `json:"text,omitempty"`
}

type IzySlackSubEvent

type IzySlackSubEvent struct {
	User        string         `json:"user"`
	Type        string         `json:"type"`
	TS          string         `json:"ts"`
	ClientMsgID string         `json:"client_msg_id"`
	ThreadTs    string         `json:"thread_ts"`
	Text        string         `json:"text"`
	Team        string         `json:"team"`
	Blocks      []IzSlackBlock `json:"blocks"`
	Channel     string         `json:"channel"`
	ChannelType string         `json:"channel_type"`
	EventTS     string         `json:"event_ts"`
}

Jump to

Keyboard shortcuts

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