Documentation ¶
Index ¶
Constants ¶
View Source
const ( TransactionPending string = "pending" TransactionCompleted string = "completed" TransactionError string = "error" TransactionConfirmed string = "confirmed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Base `valid:"required"` OwnerName string `json:"owner_name" gorm:"column:owner_name;type:varchar(255);not null" valid:"notnull"` Bank *Bank `valid:"-"` BankID string `gorm:"column:bank_id";type:uuid;not null" valid:"-"` Number string `json:"number" gorm:"column:number;type:varchar(20)" valid:"notnull"` PixKeys []*PixKey `gorm:"ForeignKey:AccountID" valid:"-"` }
type Bank ¶
type PixKey ¶
type Transaction ¶
type Transaction struct { Base `valid:"required"` AccountFrom *Account `valid:"-"` AccountFromID string `gorm:"column:account_from_id";type:uuid;" valid:"notnull"` Amount float64 `json:"amount" gorm:"type:float" valid:"notnull"` PixKeyTo *PixKey `valid:"-"` PixKeyIdTo string `gorm:"column:pix_key_id_to";type:uuid;" valid:"notnull"` Status string `json:"status" gorm:"type:varchar(20)" valid:"notnull"` Description string `json:"description" gorm:"type:varchar(255)" valid:"notnull` CancelDescription string `json:"cancel_description" gorm:"type:varchar(255)" valid:"-"` }
func NewTransaction ¶
func (*Transaction) Cancel ¶
func (t *Transaction) Cancel(description string) error
func (*Transaction) Complete ¶
func (t *Transaction) Complete() error
func (*Transaction) Confirm ¶
func (t *Transaction) Confirm() error
type TransactionRepositoryInterface ¶
type TransactionRepositoryInterface interface { Register(transaction *Transaction) error Save(transaction *Transaction) error Find(id string) (*Transaction, error) }
type Transactions ¶
type Transactions struct {
Transaction []Transaction
}
Click to show internal directories.
Click to hide internal directories.