slackdb

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PostgresArrayWrapper func(any) interface {
	driver.Valuer
	sql.Scanner
}

Functions

This section is empty.

Types

type Emoji

type Emoji struct {
	TeamID   string
	EmojiID  string
	Value    string
	Alias    string
	ImageMXC id.ContentURIString
}

func (*Emoji) Scan

func (e *Emoji) Scan(row dbutil.Scannable) (*Emoji, error)

type EmojiQuery

type EmojiQuery struct {
	*dbutil.QueryHelper[*Emoji]
	// contains filtered or unexported fields
}

func (*EmojiQuery) DeleteMany

func (eq *EmojiQuery) DeleteMany(ctx context.Context, teamID string, emojiIDs ...string) error

func (*EmojiQuery) GetByMXC

func (eq *EmojiQuery) GetByMXC(ctx context.Context, mxc string) (*Emoji, error)

func (*EmojiQuery) GetBySlackID

func (eq *EmojiQuery) GetBySlackID(ctx context.Context, teamID, emojiID string) (*Emoji, error)

func (*EmojiQuery) GetEmojiCount

func (eq *EmojiQuery) GetEmojiCount(ctx context.Context, teamID string) (count int, err error)

func (*EmojiQuery) GetLock

func (eq *EmojiQuery) GetLock(teamID string) *sync.Mutex

func (*EmojiQuery) Prune

func (eq *EmojiQuery) Prune(ctx context.Context, teamID string, emojiIDs ...string) error

func (*EmojiQuery) Put

func (eq *EmojiQuery) Put(ctx context.Context, emoji *Emoji) error

func (*EmojiQuery) Rename

func (eq *EmojiQuery) Rename(ctx context.Context, emoji *Emoji, newID string) error

func (*EmojiQuery) SaveMXC

func (eq *EmojiQuery) SaveMXC(ctx context.Context, emoji *Emoji) error

func (*EmojiQuery) WithLock

func (eq *EmojiQuery) WithLock(teamID string) func()

type SlackDB

type SlackDB struct {
	*dbutil.Database
	Emoji *EmojiQuery
}

func New

func New(db *dbutil.Database, log zerolog.Logger) *SlackDB

Jump to

Keyboard shortcuts

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