dto

package
v0.0.0-...-d05f80c Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package dto contains data transfer objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount float64

Amount represents amount of money and allows to convert it to and from int format.

func (Amount) GetInt

func (a Amount) GetInt() uint64

func (*Amount) SetAmount

func (a *Amount) SetAmount(amount uint64)

type CreateWalletRequest

type CreateWalletRequest struct {
	Name string `json:"name"`
}

type Deposit

type Deposit struct {
	Wallet string `json:"wallet"`
	Amount Amount `json:"amount"`
}

type Operation

type Operation struct {
	Wallet      string    `json:"wallet"`
	Amount      Amount    `json:"amount"`
	Type        string    `json:"type"`
	OtherWallet string    `json:"other_wallet"`
	Timestamp   time.Time `json:"timestamp"`
}

type OperationsFilter

type OperationsFilter struct {
	Wallet    string
	Type      string
	StartDate int64
	EndDate   int64
	Limit     int64
	Offset    int64
}

type Transfer

type Transfer struct {
	WalletFrom string `json:"wallet_from"`
	WalletTo   string `json:"wallet_to"`
	Amount     Amount `json:"amount"`
}

type Wallet

type Wallet struct {
	Name    string `json:"name"`
	Balance uint64 `json:"balance"`
}

Jump to

Keyboard shortcuts

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