internal

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceBackfill messageSource
)

Variables

View Source
var (
	ErrMessageNotFound = errors.New("message not found")
)

Functions

This section is empty.

Types

type Bot

type Bot struct {
	DB          *pgxpool.Pool
	DocsConfig  *docs.Config
	RiverClient *river.Client[pgx.Tx]
}

func New

func New(db *pgxpool.Pool) *Bot

func (*Bot) AddMessage

func (b *Bot) AddMessage(ctx context.Context, tx pgx.Tx, params []schema.AddMessageParams, source messageSource) error

func (*Bot) AddThreadMessages

func (b *Bot) AddThreadMessages(ctx context.Context, tx pgx.Tx, params []schema.AddThreadMessageParams, source messageSource) error

func (*Bot) EnsureChannel added in v0.0.23

func (b *Bot) EnsureChannel(ctx context.Context, tx pgx.Tx, channelID string) (bool, error)

func (*Bot) GetChannel added in v0.0.23

func (b *Bot) GetChannel(ctx context.Context, channelID string) (schema.ChannelsV2, error)

func (*Bot) GetMessage

func (b *Bot) GetMessage(
	ctx context.Context,
	channelID string,
	slackTs string,
) (schema.GetMessageRow, error)

func (*Bot) Init

func (b *Bot) Init(riverClient *river.Client[pgx.Tx], docsConfig *docs.Config) error

func (*Bot) NotifyMessage added in v0.0.6

func (b *Bot) NotifyMessage(ctx context.Context, ev *slackevents.MessageEvent) error

func (*Bot) NotifyReactionAdded added in v0.0.6

func (b *Bot) NotifyReactionAdded(ctx context.Context, ev *slackevents.ReactionAddedEvent) error

func (*Bot) NotifyReactionRemoved added in v0.0.6

func (b *Bot) NotifyReactionRemoved(ctx context.Context, ev *slackevents.ReactionRemovedEvent) error

func (*Bot) UpdateChannel

func (b *Bot) UpdateChannel(ctx context.Context, tx pgx.Tx, params schema.UpdateChannelAttrsParams) error

Directories

Path Synopsis
llm
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
otel
semconv
Standardized attribute keys and values for use in all OpenTelemetry signals Before adding a new attribute, first check to see if an attribute is already defined in the OpenTelemetry spec (https://opentelemetry.io/docs/specs/semconv/)
Standardized attribute keys and values for use in all OpenTelemetry signals Before adding a new attribute, first check to see if an attribute is already defined in the OpenTelemetry spec (https://opentelemetry.io/docs/specs/semconv/)
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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