postgres

package
v0.0.0-...-539b324 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTableCreation = errors.New("table creation failed")
)

Functions

This section is empty.

Types

type Postgres

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

func NewPostgres

func NewPostgres() (*Postgres, error)

func (*Postgres) AccountAuthenticity

func (pg *Postgres) AccountAuthenticity(ctx context.Context, number int64, encPass string) error

func (*Postgres) CreateAccount

func (pg *Postgres) CreateAccount(ctx context.Context, acc *entity.Account) (int64, error)

func (*Postgres) CreateAccountTable

func (pg *Postgres) CreateAccountTable() error

func (*Postgres) DeleteAccount

func (pg *Postgres) DeleteAccount(ctx context.Context, number int64) error

func (*Postgres) GetAccountByNumber

func (pg *Postgres) GetAccountByNumber(ctx context.Context, number int64) (*entity.Account, error)

func (*Postgres) Init

func (pg *Postgres) Init() error

func (*Postgres) TransferAmount

func (pg *Postgres) TransferAmount(ctx context.Context, from, to, amount int64) error

Jump to

Keyboard shortcuts

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