models

package
v0.0.0-...-7ef7a1e Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: Zlib Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBBroker

type DBBroker interface {
	SelectWalletByGuildUser(gid int64, uid int64) (Wallet, error)
	SelectWalletsByGuild(gid int64) ([]Wallet, error)
	InsertWallet(w Wallet) error
	UpdateWallet(w Wallet) error

	SelectTukopolyCardLicenseByGuildCard(gid int64, cid int16) (TukopolyCardLicense, error)
	SelectTukopolyCardLicensesByGuild(gid int64) ([]TukopolyCardLicense, error)
	InsertTukopolyCardLicense(l TukopolyCardLicense) error
}

type PostgreSQLBroker

type PostgreSQLBroker struct {
	context.Context
	pgx.Tx
}

func (*PostgreSQLBroker) InsertTukopolyCardLicense

func (pg *PostgreSQLBroker) InsertTukopolyCardLicense(l TukopolyCardLicense) (err error)

func (*PostgreSQLBroker) InsertWallet

func (pg *PostgreSQLBroker) InsertWallet(w Wallet) (err error)

func (*PostgreSQLBroker) SelectTukopolyCardLicenseByGuildCard

func (pg *PostgreSQLBroker) SelectTukopolyCardLicenseByGuildCard(gid int64, cid int16) (l TukopolyCardLicense, err error)

func (*PostgreSQLBroker) SelectTukopolyCardLicensesByGuild

func (pg *PostgreSQLBroker) SelectTukopolyCardLicensesByGuild(gid int64) (ls []TukopolyCardLicense, err error)

func (*PostgreSQLBroker) SelectWalletByGuildUser

func (pg *PostgreSQLBroker) SelectWalletByGuildUser(gid int64, uid int64) (w Wallet, err error)

func (*PostgreSQLBroker) SelectWalletsByGuild

func (pg *PostgreSQLBroker) SelectWalletsByGuild(gid int64) (ws []Wallet, err error)

func (*PostgreSQLBroker) UpdateWallet

func (pg *PostgreSQLBroker) UpdateWallet(w Wallet) (err error)

type TukopolyCardLicense

type TukopolyCardLicense struct {
	GuildID int64
	CardID  int16
	UserID  int64
}

type Wallet

type Wallet struct {
	GuildID       int64
	UserID        int64
	Tukens        int64
	TimeLastMined time.Time
}

Jump to

Keyboard shortcuts

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