Documentation
¶
Index ¶
- Constants
- Variables
- func NewDiscordConnectionTester(deps domain.IntegrationDeps) domain.IntegrationConnectionTester
- func NewDiscordIntegrationCreator(deps domain.IntegrationDeps) domain.IntegrationCreator
- func NewDiscordPollingHandler(deps domain.IntegrationDeps) domain.IntegrationPoller
- type DeleteMessageParams
- type DiscordConnectionTester
- type DiscordCredential
- type DiscordIntegration
- func (i *DiscordIntegration) DeleteMessage(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
- func (i *DiscordIntegration) Execute(ctx context.Context, params domain.IntegrationInput) (domain.IntegrationOutput, error)
- func (i *DiscordIntegration) GetMessageByID(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
- func (i *DiscordIntegration) GetMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
- func (i *DiscordIntegration) Peek(ctx context.Context, params domain.PeekParams) (domain.PeekResult, error)
- func (i *DiscordIntegration) PeekChannels(ctx context.Context, p domain.PeekParams) (domain.PeekResult, error)
- func (i *DiscordIntegration) PeekGuilds(ctx context.Context, p domain.PeekParams) (domain.PeekResult, error)
- func (i *DiscordIntegration) SendMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
- type DiscordIntegrationCreator
- type DiscordIntegrationCreatorDeps
- type DiscordIntegrationDependencies
- type DiscordPollingHandler
- type GetMessageByIDParams
- type GetMessagesParams
- type PeekChannelsParams
- type SendMessageParams
Constants ¶
View Source
const ( IntegrationActionType_SendMessage domain.IntegrationActionType = "send_message" IntegrationActionType_SendEmbed domain.IntegrationActionType = "send_embed" IntegrationActionType_SendFile domain.IntegrationActionType = "send_file" IntegrationActionType_SendReply domain.IntegrationActionType = "send_reply" IntegrationActionType_SendReaction domain.IntegrationActionType = "send_reaction" IntegrationActionType_GetChannels domain.IntegrationActionType = "get_channels" IntegrationActionType_GetMessages domain.IntegrationActionType = "get_messages" IntegrationActionType_GetMessageByID domain.IntegrationActionType = "get_message_by_id" IntegrationActionType_DeleteMessage domain.IntegrationActionType = "delete_message" IntegrationTriggerType_MessageReceived domain.IntegrationTriggerEventType = "message_received" )
View Source
const ( DiscordIntegrationPeekable_Guilds domain.IntegrationPeekableType = "guilds" DiscordIntegrationPeekable_Channels domain.IntegrationPeekableType = "channels" )
View Source
const DiscordEpoch int64 = 1420070400000
Variables ¶
View Source
var (
Schema = schema
)
Functions ¶
func NewDiscordConnectionTester ¶
func NewDiscordConnectionTester(deps domain.IntegrationDeps) domain.IntegrationConnectionTester
func NewDiscordIntegrationCreator ¶
func NewDiscordIntegrationCreator(deps domain.IntegrationDeps) domain.IntegrationCreator
func NewDiscordPollingHandler ¶
func NewDiscordPollingHandler(deps domain.IntegrationDeps) domain.IntegrationPoller
Types ¶
type DeleteMessageParams ¶
type DiscordConnectionTester ¶
type DiscordConnectionTester struct {
// contains filtered or unexported fields
}
func (*DiscordConnectionTester) TestConnection ¶
func (c *DiscordConnectionTester) TestConnection(ctx context.Context, params domain.TestConnectionParams) (bool, error)
type DiscordCredential ¶
type DiscordCredential struct {
Token string `json:"token"`
}
type DiscordIntegration ¶
type DiscordIntegration struct {
// contains filtered or unexported fields
}
func NewDiscordIntegration ¶
func NewDiscordIntegration(ctx context.Context, deps DiscordIntegrationDependencies) (*DiscordIntegration, error)
func (*DiscordIntegration) DeleteMessage ¶
func (i *DiscordIntegration) DeleteMessage(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
func (*DiscordIntegration) Execute ¶
func (i *DiscordIntegration) Execute(ctx context.Context, params domain.IntegrationInput) (domain.IntegrationOutput, error)
func (*DiscordIntegration) GetMessageByID ¶
func (i *DiscordIntegration) GetMessageByID(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
func (*DiscordIntegration) GetMessages ¶
func (i *DiscordIntegration) GetMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
func (*DiscordIntegration) Peek ¶
func (i *DiscordIntegration) Peek(ctx context.Context, params domain.PeekParams) (domain.PeekResult, error)
func (*DiscordIntegration) PeekChannels ¶
func (i *DiscordIntegration) PeekChannels(ctx context.Context, p domain.PeekParams) (domain.PeekResult, error)
func (*DiscordIntegration) PeekGuilds ¶
func (i *DiscordIntegration) PeekGuilds(ctx context.Context, p domain.PeekParams) (domain.PeekResult, error)
func (*DiscordIntegration) SendMessages ¶
func (i *DiscordIntegration) SendMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)
type DiscordIntegrationCreator ¶
type DiscordIntegrationCreator struct {
// contains filtered or unexported fields
}
func (*DiscordIntegrationCreator) CreateIntegration ¶
func (c *DiscordIntegrationCreator) CreateIntegration(ctx context.Context, p domain.CreateIntegrationParams) (domain.IntegrationExecutor, error)
type DiscordIntegrationCreatorDeps ¶
type DiscordIntegrationCreatorDeps struct {
ParameterBinder domain.IntegrationParameterBinder
CredentialGetter domain.CredentialGetter[DiscordCredential]
}
type DiscordIntegrationDependencies ¶
type DiscordIntegrationDependencies struct {
ParameterBinder domain.IntegrationParameterBinder
CredentialID string
CredentialGetter domain.CredentialGetter[DiscordCredential]
}
type DiscordPollingHandler ¶
type DiscordPollingHandler struct {
// contains filtered or unexported fields
}
func (*DiscordPollingHandler) HandlePollingEvent ¶
func (i *DiscordPollingHandler) HandlePollingEvent(ctx context.Context, p domain.PollingEvent) (domain.PollResult, error)
func (*DiscordPollingHandler) PollChannelMessages ¶
func (i *DiscordPollingHandler) PollChannelMessages(ctx context.Context, p domain.PollingEvent, discordSession *discordgo.Session) (domain.PollResult, error)
type GetMessageByIDParams ¶
type GetMessagesParams ¶
type PeekChannelsParams ¶
type PeekChannelsParams struct {
GuildID string `json:"guild_id"`
}
type SendMessageParams ¶
Click to show internal directories.
Click to hide internal directories.