Versions in this module Expand all Collapse all v0 v0.1.0 Feb 21, 2024 Changes in this version + type Config struct + InitialAckTimeout int64 + SubsequentAckTimeouts []int64 + func (c *Config) Scan(src interface{}) error + func (c Config) SubsequentAckTimeoutsStr() string + func (c Config) Value() (driver.Value, error) + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) FindQueue(ctx context.Context, queueID string) (*Queue, error) + func (q *Queries) SaveQueue(ctx context.Context, arg SaveQueueParams) error + func (q *Queries) UpsertQueue(ctx context.Context, arg UpsertQueueParams) error + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type Queue struct + AckedBy string + ChannelID string + ChannelName string + Config Config + QueueID string + RequireAckBefore int64 + TeamDomain string + TeamID string + UserList string + func (q *Queue) AddUser(userID string) error + func (q *Queue) GetFirstUser() string + func (q *Queue) GetUsersInLine() []string + func (q *Queue) IsEmpty() bool + func (q *Queue) RemoveUser(userID string) (bool, error) + func (q *Queue) SkipTurn(userId string) (bool, error) + func (q *Queue) ToSaveParams() SaveQueueParams + type SaveQueueParams struct + AckedBy string + ChannelID string + ChannelName string + Config Config + QueueID string + RequireAckBefore int64 + TeamDomain string + TeamID string + UserList string + type UpsertQueueParams struct + ChannelID string + ChannelName string + Config Config + QueueID string + TeamDomain string + TeamID string + UserList string + type UserAlreadyInQueueError string + func (u UserAlreadyInQueueError) Error() string