Documentation
¶
Index ¶
- Variables
- type DBP
- func (d *DBP) Close() error
- func (d *DBP) Encode(ctx context.Context, ch *chunk.Chunk) error
- func (d *DBP) InsertChunk(ctx context.Context, ch *chunk.Chunk) (int64, error)
- func (d *DBP) IsComplete(ctx context.Context, channelID string) (bool, error)
- func (d *DBP) IsCompleteThread(ctx context.Context, channelID, threadID string) (bool, error)
- func (d *DBP) Source() *Source
- func (d *DBP) String() string
- func (d *DBP) UnsafeInsertChunk(ctx context.Context, txx repository.PrepareExtContext, ch *chunk.Chunk) (int64, error)
- type ErrInvalidPayload
- type Option
- type SessionInfo
- type Source
- func (s *Source) AllMessages(ctx context.Context, channelID string) (iter.Seq2[slack.Message, error], error)
- func (s *Source) AllThreadMessages(ctx context.Context, channelID, threadID string) (iter.Seq2[slack.Message, error], error)
- func (s *Source) ChannelInfo(ctx context.Context, channelID string) (*slack.Channel, error)
- func (s *Source) Channels(ctx context.Context) ([]slack.Channel, error)
- func (s *Source) Close() error
- func (s *Source) Latest(ctx context.Context) (map[structures.SlackLink]time.Time, error)
- func (src *Source) Sessions(ctx context.Context) ([]repository.Session, error)
- func (s *Source) Sorted(ctx context.Context, channelID string, desc bool, ...) error
- func (src *Source) ToChunk(ctx context.Context, e chunk.Encoder, sessID int64) error
- func (s *Source) Users(ctx context.Context) ([]slack.User, error)
- func (s *Source) WorkspaceInfo(ctx context.Context) (*slack.AuthTestResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidSessionID is returned when the session ID is invalid. ErrInvalidSessionID = errors.New("invalid session ID") // ErrIncomplete is returned when the session is incomplete. ErrIncomplete = errors.New("incomplete session") )
Functions ¶
This section is empty.
Types ¶
type DBP ¶
type DBP struct {
// contains filtered or unexported fields
}
DBP is the database processor.
func (*DBP) Close ¶
Close finalises the session, marking it as finished. It is advised to check the error value.
func (*DBP) InsertChunk ¶
InsertChunk inserts a chunk into the database.
func (*DBP) IsComplete ¶
IsComplete returns true if the channel messages have been processed (there are no unfinished threads, and all messages were received).
func (*DBP) IsCompleteThread ¶ added in v3.1.1
IsCompleteThread checks that thread with channelID and threadID is complete for thread-only archives. It returns true if there are no unfinished parts of the thread. It returns false if the thread is not found. It will return false on non-thread-only archives.
func (*DBP) UnsafeInsertChunk ¶
func (d *DBP) UnsafeInsertChunk(ctx context.Context, txx repository.PrepareExtContext, ch *chunk.Chunk) (int64, error)
UnsafeInsertChunk does not lock the DBP and does not commit the transaction. It should be used for bulk inserts. Unsafe for concurrent use.
type ErrInvalidPayload ¶
func (*ErrInvalidPayload) Error ¶
func (e *ErrInvalidPayload) Error() string
type SessionInfo ¶
type SessionInfo struct { FromTS *time.Time ToTS *time.Time FilesEnabled bool AvatarsEnabled bool Mode string Args string }
SessionInfo is the information about the session to be logged in the database.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func (*Source) AllMessages ¶
func (*Source) AllThreadMessages ¶
func (*Source) ChannelInfo ¶
func (*Source) Channels ¶
Channels returns all channels. If the channel info is not available, it will attempt to get all channels.
func (*Source) Close ¶
Close closes the database connection. It is a noop if the Source was created with [Connect].
func (*Source) WorkspaceInfo ¶
Directories
¶
Path | Synopsis |
---|---|
mock_repository
Package mock_repository is a generated GoMock package.
|
Package mock_repository is a generated GoMock package. |