model

package
v0.0.0-...-0bcc17c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDetail

type AccountDetail struct {
	ID        string
	Balance   float64
	IsEnabled bool
	UpdatedAt time.Time
}

type ActivationRequest

type ActivationRequest struct {
	AccountID string
	IsEnabled bool
	UpdatedAt time.Time
}

type ActivationResult

type ActivationResult struct {
	AccountID string
	IsEnabled bool
	Balance   float64
	UpdatedAt time.Time
}

func (*ActivationResult) ToResponseDisable

func (r *ActivationResult) ToResponseDisable() *DisableWalletResponse

func (*ActivationResult) ToResponseEnable

func (r *ActivationResult) ToResponseEnable() *EnableWalletResponse

type AppConfig

type AppConfig struct {
	Encryption Encryption
}

Reusable config goes here

type BalanceRequest

type BalanceRequest struct {
	AccountID string
}

type BalanceResult

type BalanceResult struct {
	Wallet BalanceResultWallet `json:"wallet"`
}

type BalanceResultWallet

type BalanceResultWallet struct {
	ID        string    `json:"id"`
	OwnedBy   string    `json:"owned_by"`
	Status    string    `json:"status"`
	EnabledAt time.Time `json:"enabled_at"`
	Balance   float64   `json:"balance"`
}

type CreateTransactionRequest

type CreateTransactionRequest struct {
	ID          string
	AccountID   string
	Type        string
	ReferenceID string  `form:"reference_id" validate:"required,uuid" example:"49437636-fa79-40fb-b5cf-5f066235fddb"`
	Amount      float64 `form:"amount" validate:"required,gte=10000,lte=1000000000" example:"10000.00"`
	Status      string
}

type DepositResult

type DepositResult struct {
	Deposit DepositResultDeposit `json:"deposit"`
}

type DepositResultDeposit

type DepositResultDeposit struct {
	ID          string    `json:"id"`
	DepositedBy string    `json:"deposited_by"`
	Status      string    `json:"status"`
	DepositedAt time.Time `json:"deposited_at"`
	Amount      float64   `json:"amount"`
	ReferenceID string    `json:"reference_id"`
}

type DisableWalletResponse

type DisableWalletResponse struct {
	Wallet DisableWalletResponseWallet `json:"wallet"`
}

type DisableWalletResponseWallet

type DisableWalletResponseWallet struct {
	ID         string    `json:"id"`
	OwnedBy    string    `json:"owned_by"`
	Status     string    `json:"status"`
	DisabledAt time.Time `json:"disabled_at"`
	Balance    float64   `json:"balance"`
}

type EnableWalletResponse

type EnableWalletResponse struct {
	Wallet EnableWalletResponseWallet `json:"wallet"`
}

type EnableWalletResponseWallet

type EnableWalletResponseWallet struct {
	ID        string    `json:"id"`
	OwnedBy   string    `json:"owned_by"`
	Status    string    `json:"status"`
	EnabledAt time.Time `json:"enabled_at"`
	Balance   float64   `json:"balance"`
}

type Encryption

type Encryption struct {
	Key string `mapstructure:"key"`
}

type HistoryRequest

type HistoryRequest struct {
	AccountID string
}

type HistoryResult

type HistoryResult struct {
	Transactions []*HistoryResultTransaction `json:"transactions"`
}

type HistoryResultTransaction

type HistoryResultTransaction struct {
	ID           string    `json:"id"`
	ReferenceID  string    `json:"reference_id"`
	Status       string    `json:"status"`
	TransactedAt time.Time `json:"transacted_at"`
	Type         string    `json:"type"`
	Amount       float64   `json:"amount"`
}

type InitRequest

type InitRequest struct {
	CustomerXID string `json:"customer_xid" form:"customer_xid" validate:"required,uuid" example:"a25dc5b4-35bc-4cc5-8864-8eb41d83f2bf"`
}

type InitResult

type InitResult struct {
	Token string `json:"token"`
}

type Response

type Response struct {
	Status string      `json:"status" example:"Success"`
	Data   interface{} `json:"data"`
}

type Timestamp

type Timestamp struct {
	CreatedAt time.Time
	UpdatedAt sql.NullTime
	DeletedAt sql.NullTime
}

type TokenRequest

type TokenRequest struct {
	Token string `header:"token"`
}

type WithdrawalResult

type WithdrawalResult struct {
	Withdrawal WithdrawalResultWithdrawal `json:"withdrawal"`
}

type WithdrawalResultWithdrawal

type WithdrawalResultWithdrawal struct {
	ID          string    `json:"id"`
	WithdrawnBy string    `json:"withdrawn_by"`
	Status      string    `json:"status"`
	WithdrawnAt time.Time `json:"withdrawn_at"`
	Amount      float64   `json:"amount"`
	ReferenceID string    `json:"reference_id"`
}

Jump to

Keyboard shortcuts

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