storage

package
v0.0.0-...-955412f Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	DB *sqlx.DB
}

func NewPostgres

func NewPostgres(cfg *config.Config) (*Postgres, error)

func (*Postgres) DeleteUser

func (psql *Postgres) DeleteUser(username string, chatId int) error

func (*Postgres) GetAllUsers

func (psql *Postgres) GetAllUsers(chatId int) (*[]entity.ChatUser, bool, error)

func (*Postgres) GetDiscordChannelId

func (psql *Postgres) GetDiscordChannelId(chatId int64) (*string, error)

func (*Postgres) GetTelegramChatId

func (psql *Postgres) GetTelegramChatId(guildId string) (*int64, error)

func (*Postgres) GetUser

func (psql *Postgres) GetUser(username string, chatId int) (*entity.ChatUser, bool, error)

func (*Postgres) InsertUser

func (psql *Postgres) InsertUser(username string, chatId int) error

Jump to

Keyboard shortcuts

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