dto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package DTO (Data Transfer Object) contains data objects that are passed between the handler layer and the service request. It helps serialize the JSON request into objects used in the chaincode as well as perform some basic validation on the input format and logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountingBalance

type AccountingBalance struct {
	TxId []string `json:"txId"`
}

func (AccountingBalance) IsValid

func (a AccountingBalance) IsValid() error

type Balance

type Balance struct {
	WalletId string `json:"walletId"`
}

func (Balance) IsValid

func (b Balance) IsValid() error

type BalanceOfNFT

type BalanceOfNFT struct {
	OwnerWalletId string `json:"ownerWalletId"`
}

func (BalanceOfNFT) IsValid

func (b BalanceOfNFT) IsValid() error

type BurnToken

type BurnToken struct {
	WalletId string  `json:"walletId"`
	Amount   float64 `json:"amount"`
}

func (BurnToken) IsValid

func (b BurnToken) IsValid() error

type CreateHealthCheck

type CreateHealthCheck struct {
}

func (CreateHealthCheck) IsValid

func (b CreateHealthCheck) IsValid() error

type CreateTokenType

type CreateTokenType struct {
	Name        string  `json:"name"`
	TickerToken string  `json:"tickerToken"`
	Rate        float64 `json:"rate"`
}

func (CreateTokenType) IsValid

func (c CreateTokenType) IsValid() error

func (CreateTokenType) ToEntity

type CreateWallet

type CreateWallet struct {
	TokenId string          `json:"tokenId"`
	Status  glossary.Status `json:"status"`
}

func (CreateWallet) IsValid

func (c CreateWallet) IsValid() error

func (CreateWallet) ToEntity

type Enrollment

type Enrollment struct {
	TokenId      string   `json:"tokenId"`
	FromWalletId []string `json:"fromWalletId"`
	ToWalletId   []string `json:"toWalletId"`
}

func (Enrollment) IsValid

func (e Enrollment) IsValid() error

type ExchangeToken

type ExchangeToken struct {
	FromWalletFirstToken  string  `json:"fromWalletFirstToken"`
	ToWalletFirstToken    string  `json:"toWalletFirstToken"`
	FromWalletSecondToken string  `json:"fromWalletSecondToken"`
	ToWalletSecondToken   string  `json:"toWalletSecondToken"`
	Amount                float64 `json:"amount"`
}

func (ExchangeToken) IsValid

func (e ExchangeToken) IsValid() error

type IssueToken

type IssueToken struct {
	TokenId      string  `json:"tokenId"`
	FromWalletId string  `json:"fromWalletId"`
	ToWalletId   string  `json:"toWalletId"`
	Amount       float64 `json:"amount"`
}

func (IssueToken) IsValid

func (i IssueToken) IsValid() error

type MintNFT

type MintNFT struct {
	GS1Number     string `json:"gs1Number"`
	OwnerWalletId string `json:"ownerWalletId"`
	Metadata      string `json:"metadata"`
}

func (MintNFT) IsValid

func (m MintNFT) IsValid() error

type MintToken

type MintToken struct {
	WalletId string  `json:"walletId"`
	Amount   float64 `json:"amount"`
}

func (MintToken) IsValid

func (m MintToken) IsValid() error

type OwnerNFT

type OwnerNFT struct {
	NFTTokenId string `json:"nftTokenId"`
}

func (OwnerNFT) IsValid

func (o OwnerNFT) IsValid() error

type SwapToken

type SwapToken struct {
	FromWalletId string  `json:"fromWalletId"`
	ToWalletId   string  `json:"toWalletId"`
	Amount       float64 `json:"amount"`
}

func (SwapToken) IsValid

func (s SwapToken) IsValid() error

type TransferNFT

type TransferNFT struct {
	OwnerWalletId string `json:"ownerWalletId"`
	ToWalletId    string `json:"toWalletId"`
	NFTTokenId    string `json:"nftTokenId"`
}

func (TransferNFT) IsValid

func (t TransferNFT) IsValid() error

type TransferToken

type TransferToken struct {
	FromWalletId string  `json:"fromWalletId"`
	ToWalletId   string  `json:"toWalletId"`
	Amount       float64 `json:"amount"`
}

func (TransferToken) IsValid

func (t TransferToken) IsValid() error

func (TransferToken) ToEntity

type UpdateWallet

type UpdateWallet struct {
	WalletId string          `json:"walletId"`
	Status   glossary.Status `json:"status"`
}

func (UpdateWallet) IsValid

func (u UpdateWallet) IsValid() error

Jump to

Keyboard shortcuts

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