postgres

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

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgres

func NewPostgres(cfg Config) (*sqlx.DB, error)

Types

type Config

type Config struct {
	Host     string
	Port     string
	User     string
	Password string
	DBName   string
	SSLMode  string
}

type TransactionPostgres

type TransactionPostgres struct {
	// contains filtered or unexported fields
}

func NewTransactionPostgres

func NewTransactionPostgres(db *sqlx.DB) *TransactionPostgres

func (*TransactionPostgres) Create

func (r *TransactionPostgres) Create(senderId, receiverId string, amount float64) error

func (*TransactionPostgres) GetAllById

func (r *TransactionPostgres) GetAllById(id string) ([]entity.Transaction, error)

type WalletPostgres

type WalletPostgres struct {
	// contains filtered or unexported fields
}

func NewWalletPostgres

func NewWalletPostgres(db *sqlx.DB) *WalletPostgres

func (*WalletPostgres) Create

func (r *WalletPostgres) Create(id string) (entity.Wallet, error)

func (*WalletPostgres) GetById

func (r *WalletPostgres) GetById(id string) (entity.Wallet, error)

func (*WalletPostgres) Update

func (r *WalletPostgres) Update(senderId, receiverId string, amount float64) error

Jump to

Keyboard shortcuts

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