queries

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

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokenByAddress

func GetTokenByAddress(address string) *models.Token

func GetTokens

func GetTokens() []models.Token

Types

type PoolQueries

type PoolQueries struct {
	DB *gorm.DB
}

func (*PoolQueries) CreatePool

func (pq *PoolQueries) CreatePool(pool models.Pool) (models.Pool, error)

func (*PoolQueries) DeletePool

func (pq *PoolQueries) DeletePool(id int) error

func (*PoolQueries) GetAllPools

func (pq *PoolQueries) GetAllPools() ([]models.Pool, error)

func (*PoolQueries) GetPoolByID

func (pq *PoolQueries) GetPoolByID(id int) (models.Pool, error)

func (*PoolQueries) UpdatePool

func (pq *PoolQueries) UpdatePool(pool models.Pool) (models.Pool, error)

type TokenQueries

type TokenQueries struct{}

type TransactionQueries

type TransactionQueries struct {
	DB *gorm.DB
}

func (*TransactionQueries) CreateTransaction

func (tq *TransactionQueries) CreateTransaction(transaction models.Transaction) (models.Transaction, error)

func (*TransactionQueries) DeleteTransaction

func (tq *TransactionQueries) DeleteTransaction(id int) error

func (*TransactionQueries) GetAllTransactions

func (tq *TransactionQueries) GetAllTransactions() ([]models.Transaction, error)

func (*TransactionQueries) GetTransactionByID

func (tq *TransactionQueries) GetTransactionByID(id int) (models.Transaction, error)

func (*TransactionQueries) UpdateTransaction

func (tq *TransactionQueries) UpdateTransaction(transaction models.Transaction) (models.Transaction, error)

type UserQueries

type UserQueries struct {
	DB *gorm.DB
}

func (*UserQueries) CreateUser

func (uq *UserQueries) CreateUser(user models.User) (models.User, error)

func (*UserQueries) DeleteUser

func (uq *UserQueries) DeleteUser(id int) error

func (*UserQueries) GetAllUsers

func (uq *UserQueries) GetAllUsers() ([]models.User, error)

func (*UserQueries) GetUserByAddress

func (uq *UserQueries) GetUserByAddress(address string) (models.User, error)

func (*UserQueries) GetUserByID

func (uq *UserQueries) GetUserByID(id int) (models.User, error)

func (*UserQueries) UpdateUser

func (uq *UserQueries) UpdateUser(user models.User) (models.User, error)

Jump to

Keyboard shortcuts

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