postgres

package
v0.0.0-...-391a7ad Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	*postgres.Table[*storage.Address]
}

Address -

func NewAddress

func NewAddress(db *database.Bun) *Address

NewAddress -

type State

type State struct {
	*postgres.Table[*storage.State]
}

State -

func NewState

func NewState(db *database.Bun) *State

NewState -

func (*State) ByName

func (s *State) ByName(ctx context.Context, name string) (state storage.State, err error)

ByName -

type Storage

type Storage struct {
	*postgres.Storage

	Address       models.IAddress
	TokenMetadata models.ITokenMetadata
	State         models.IState
	Tx            Transaction
}

Storage -

func Create

func Create(ctx context.Context, cfg config.Database) (Storage, error)

Create -

type TokenMetadata

type TokenMetadata struct {
	*postgres.Table[*storage.TokenMetadata]
}

TokenMetadata -

func NewTokenMetadata

func NewTokenMetadata(db *database.Bun) *TokenMetadata

NewTokenMetadata -

func (*TokenMetadata) GetByStatus

func (tm *TokenMetadata) GetByStatus(ctx context.Context, status storage.Status, limit, offset, attempts, delay int) (response []storage.TokenMetadata, err error)

GetByStatus -

type Transaction

type Transaction struct {
	storage.Transaction
}

Transaction -

func BeginTransaction

func BeginTransaction(ctx context.Context, tx storage.Transactable) (Transaction, error)

BeginTransaction -

func (Transaction) SaveAddress

func (t Transaction) SaveAddress(ctx context.Context, address *models.Address) error

SaveAddress -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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