Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnprocessableEntity = errors.New("unprocessable entity")
)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID uuid.UUID AccountType AccountType CustomerName string DocumentNumber string Email string PasswordEncoded Password PhoneNumber string Status AccountStatus CreatedAt time.Time UpdatedAt time.Time Wallet Wallet }
func NewAccount ¶
func NewAccount(t AccountType, name, doc, email, pass, phone string) Account
type AccountStatus ¶
type AccountStatus string
const ( AccountStatusActive AccountStatus = "ACTIVE" AccountStatusCanceled AccountStatus = "CANCELED" )
type AccountType ¶
type AccountType string
const ( Personal AccountType = "PERSONAL" Seller AccountType = "SELLER" )
type ResumeAccount ¶
type ResumeAccount struct { ID uuid.UUID AccountType AccountType Email string Status AccountStatus PasswordEncoded Password }
func (*ResumeAccount) JsonRawMessage ¶
func (a *ResumeAccount) JsonRawMessage() json.RawMessage
func (*ResumeAccount) ValidatePassword ¶
func (a *ResumeAccount) ValidatePassword(pass string) error
type Transaction ¶
type TransactionError ¶
type TransactionError struct { Message string AccountID uuid.UUID TransactionType TransactionType Amount Money }
func NewDepositError ¶
func NewDepositError(msg string, accountID uuid.UUID, amount Money) *TransactionError
func NewTransferError ¶
func NewTransferError(msg string, accountID uuid.UUID, amount Money) TransactionError
func (TransactionError) Error ¶
func (t TransactionError) Error() string
type TransactionType ¶
type TransactionType string
const ( Deposit TransactionType = "DEPOSIT" TransferPayer TransactionType = "TRANSFER_PAYER" TransferPayee TransactionType = "TRANSFER_PAYEE" Snapshot TransactionType = "SNAPSHOT" )
type TransferOutput ¶
type TransferOutput struct { Payer *Transaction Payee *Transaction }
Click to show internal directories.
Click to hide internal directories.