transfer

package
v0.1.0-alpha-6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(dbClient *gorm.DB) *Repository

func (Repository) Create

func (tr Repository) Create(ct *model.Transfer) (*entity.Transfer, error)

Create creates new record of Transfer

func (Repository) GetByTransactionId

func (tr Repository) GetByTransactionId(txId string) (*entity.Transfer, error)

Returns Transfer. Returns nil if not found

func (Repository) GetWithFee added in v1.4.0

func (tr Repository) GetWithFee(txId string) (*entity.Transfer, error)

Returns Transfer with preloaded Fee table. Returns nil if not found

func (Repository) GetWithPreloads added in v1.4.0

func (tr Repository) GetWithPreloads(txId string) (*entity.Transfer, error)

func (Repository) Save

func (tr Repository) Save(tx *entity.Transfer) error

Save updates the provided Transfer instance

func (Repository) UpdateFee added in v1.4.0

func (tr Repository) UpdateFee(txId string, fee string) error

func (Repository) UpdateStatusCompleted

func (tr Repository) UpdateStatusCompleted(txId string) error

func (Repository) UpdateStatusFailed added in v1.4.0

func (tr Repository) UpdateStatusFailed(txId string) error

Jump to

Keyboard shortcuts

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