dbaccess

package
v0.0.0-...-0aa3564 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdmin

func AddAdmin(toAdd string, requestor string) error

func AddDummy

func AddDummy()

func CheckIfAdmin

func CheckIfAdmin(handle string) (bool, error)

func CheckIfInQueue

func CheckIfInQueue(userHandle string) (bool, error)

func CheckQueueContents

func CheckQueueContents() ([]types.QueueUser, error)

func CheckQueueLength

func CheckQueueLength(userHandle string) (bool, int, error)

func EstablishDBConnection

func EstablishDBConnection(toReset bool)

Must be called before any interaction with the DB to initialize the db connection.

func GetPositionInQueue

func GetPositionInQueue(position int) (userHandle string, chatID int64, err error)

position should be 1-indexed.

func JoinQueue

func JoinQueue(username string, chatID int64) error

func KickPerson

func KickPerson(toKick string) (chatID int64, err error)

Kick a person with a Telegram handle. Returns a chatID for further communications.

func LeaveQueue

func LeaveQueue(userHandle string) error

func NotifyQueue

func NotifyQueue(position int64) (chatID int64, err error)

func RemoveAdmin

func RemoveAdmin(toRemove string, requestor string) (string, error)

func RemoveFirstInQueue

func RemoveFirstInQueue() (userHandle int64, err error)

func SeeAdminList

func SeeAdminList(retriever string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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