tx

package
v0.0.0-...-ffb6f1e Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetListRes

type GetListRes struct {
	List []*GetRes `json:"list"`
}

GetListRes data

type GetRes

type GetRes struct {
	Status      string             `json:"status"`
	Transaction *GetResTransaction `json:"transaction"`
}

GetRes data

type GetResTransaction

type GetResTransaction struct {
	Name       string         `json:"name"`
	Digest     string         `json:"digest"`
	From       string         `json:"from"`
	To         *string        `json:"to"`
	Nonce      uint64         `json:"nonce"`
	Block      *string        `json:"block"`
	AmountMNT  *amount.Amount `json:"amount_mnt"`
	AmountGOLD *amount.Amount `json:"amount_gold"`
	DataSize   uint64         `json:"data_size"`
	DataPiece  []byte         `json:"data_piece"`
	Timestamp  uint64         `json:"timestamp"`
}

GetResTransaction data

func (*GetResTransaction) FromDAL

FromDAL model

type PostErrorRes

type PostErrorRes struct {
	Code                int    `json:"code"`
	CodeDesc            string `json:"code_desc"`
	NonceBehind         bool   `json:"nonce_behind"`
	NonceAhead          bool   `json:"nonce_ahead"`
	WalletInconsistency bool   `json:"wallet_inconsistency"`
}

PostErrorRes data

type PostReq

type PostReq struct {
	Name string `json:"name,omitempty" validate:"min=1,max=64"`
	Data string `json:"data,omitempty" validate:"min=1,max=16384"`
}

PostReq data

type PostRes

type PostRes struct {
	Digest string `json:"digest"`
}

PostRes data

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a transaction service

func New

func New(config *config.Root, saveTXChan chan<- *types.Transaction, reader dao.IDAO, p *rpcpool.Pool, latency mtx.Histogram) *Service

New instance

func (*Service) Add

func (s *Service) Add(w http.ResponseWriter, r *http.Request)

Add ...

func (*Service) GetByDigest

func (s *Service) GetByDigest(w http.ResponseWriter, r *http.Request)

GetByDigest ...

func (*Service) List

func (s *Service) List(w http.ResponseWriter, r *http.Request)

List ...

Jump to

Keyboard shortcuts

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