Documentation
¶
Index ¶
- type Database
- type Postgres
- func (db *Postgres) Close() error
- func (db *Postgres) DeleteMessage(ctx context.Context, msg discord.MessageID) error
- func (db *Postgres) InsertMessage(ctx context.Context, msg discord.Message) error
- func (db *Postgres) MessagesAfter(ctx context.Context, ch discord.ChannelID, msg discord.MessageID, limit uint) (msgs []discord.Message, hasbefore bool, err error)
- func (db *Postgres) MessagesBefore(ctx context.Context, ch discord.ChannelID, msg discord.MessageID, limit uint) (msgs []discord.Message, hasafter bool, err error)
- func (db *Postgres) SetUpdatedAt(ctx context.Context, post discord.ChannelID, time time.Time) error
- func (db *Postgres) UpdateMessage(ctx context.Context, msg discord.Message) error
- func (db *Postgres) UpdateMessages(ctx context.Context, post discord.ChannelID, msgs []discord.Message) error
- func (db *Postgres) UpdatedAt(ctx context.Context, post discord.ChannelID) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Close() error SetUpdatedAt(ctx context.Context, post discord.ChannelID, t time.Time) error UpdatedAt(ctx context.Context, post discord.ChannelID) (time.Time, error) UpdateMessages(ctx context.Context, post discord.ChannelID, msgs []discord.Message) error InsertMessage(ctx context.Context, msg discord.Message) error UpdateMessage(ctx context.Context, msg discord.Message) error DeleteMessage(ctx context.Context, msg discord.MessageID) error MessagesAfter(ctx context.Context, post discord.ChannelID, after discord.MessageID, limit uint) ([]discord.Message, bool, error) MessagesBefore(ctx context.Context, post discord.ChannelID, before discord.MessageID, limit uint) ([]discord.Message, bool, error) }
func OpenPostgres ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) DeleteMessage ¶
func (*Postgres) InsertMessage ¶
func (*Postgres) MessagesAfter ¶
func (*Postgres) MessagesBefore ¶
func (*Postgres) SetUpdatedAt ¶
func (*Postgres) UpdateMessage ¶
func (*Postgres) UpdateMessages ¶
Click to show internal directories.
Click to hide internal directories.