service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Receive

func Receive(chainMessage *msg1.ChainMessage) (*msg1.ChainMessage, error)

* 接收ChainMessage报文处理的入口,无论何种方式发送过来的的任何chain消息类型都统一在此处理分发

Types

type ChainMessageLogService

type ChainMessageLogService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetChainMessageLogService

func GetChainMessageLogService() *ChainMessageLogService

func (*ChainMessageLogService) GetSeqName

func (this *ChainMessageLogService) GetSeqName() string

func (*ChainMessageLogService) NewEntities

func (this *ChainMessageLogService) NewEntities(data []byte) (interface{}, error)

func (*ChainMessageLogService) NewEntity

func (this *ChainMessageLogService) NewEntity(data []byte) (interface{}, error)

type ConsensusLogService

type ConsensusLogService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetConsensusLogService

func GetConsensusLogService() *ConsensusLogService

func (*ConsensusLogService) GetSeqName

func (this *ConsensusLogService) GetSeqName() string

func (*ConsensusLogService) NewEntities

func (this *ConsensusLogService) NewEntities(data []byte) (interface{}, error)

func (*ConsensusLogService) NewEntity

func (this *ConsensusLogService) NewEntity(data []byte) (interface{}, error)

type DataBlockService

type DataBlockService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetDataBlockService

func GetDataBlockService() *DataBlockService

func (*DataBlockService) DeleteExpiredDB added in v0.0.2

func (this *DataBlockService) DeleteExpiredDB() error

func (*DataBlockService) GetLocalDBs

func (this *DataBlockService) GetLocalDBs(keyKind string, createPeerId string, blockId string, receiverPeerId string, sliceNumber uint64) ([]*entity.DataBlock, error)

func (*DataBlockService) GetSeqName

func (this *DataBlockService) GetSeqName() string

func (*DataBlockService) GetTransactionAmount

func (this *DataBlockService) GetTransactionAmount(transportPayload []byte) float64

func (*DataBlockService) NewEntities

func (this *DataBlockService) NewEntities(data []byte) (interface{}, error)

func (*DataBlockService) NewEntity

func (this *DataBlockService) NewEntity(data []byte) (interface{}, error)

func (*DataBlockService) PutDB

func (this *DataBlockService) PutDB(dataBlock *entity.DataBlock, keyKind string) error

func (*DataBlockService) PutDBs

func (this *DataBlockService) PutDBs(dataBlock *entity.DataBlock) error

func (*DataBlockService) PutLocalDBs

func (this *DataBlockService) PutLocalDBs(keyKind string, dataBlocks []*entity.DataBlock) error

func (*DataBlockService) QueryValue

func (this *DataBlockService) QueryValue(dataBlocks *[]*entity.DataBlock, blockId string, sliceNumber uint64) error

func (*DataBlockService) StoreValue

func (this *DataBlockService) StoreValue(db *entity.DataBlock) error

func (*DataBlockService) Validate added in v0.0.2

func (this *DataBlockService) Validate(dataBlock *entity.DataBlock) error

type PeerTransactionService

type PeerTransactionService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetPeerTransactionService

func GetPeerTransactionService() *PeerTransactionService

func (*PeerTransactionService) GetLocalPTs

func (this *PeerTransactionService) GetLocalPTs(keyKind string, srcPeerId string, targetPeerId string, businessNumber string, parentBusinessNumber string) ([]*entity.PeerTransaction, error)

func (*PeerTransactionService) GetSeqName

func (this *PeerTransactionService) GetSeqName() string

func (*PeerTransactionService) NewEntities

func (this *PeerTransactionService) NewEntities(data []byte) (interface{}, error)

func (*PeerTransactionService) NewEntity

func (this *PeerTransactionService) NewEntity(data []byte) (interface{}, error)

func (*PeerTransactionService) PutLocalPTs

func (this *PeerTransactionService) PutLocalPTs(keyKind string, peerTransactions []*entity.PeerTransaction) error

func (*PeerTransactionService) PutPT

func (this *PeerTransactionService) PutPT(peerTransaction *entity.PeerTransaction, keyKind string) error

func (*PeerTransactionService) PutPTs

func (this *PeerTransactionService) PutPTs(peerTransaction *entity.PeerTransaction) error

type TransactionKeyService

type TransactionKeyService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetTransactionKeyService

func GetTransactionKeyService() *TransactionKeyService

func (*TransactionKeyService) GetSeqName

func (this *TransactionKeyService) GetSeqName() string

func (*TransactionKeyService) NewEntities

func (this *TransactionKeyService) NewEntities(data []byte) (interface{}, error)

func (*TransactionKeyService) NewEntity

func (this *TransactionKeyService) NewEntity(data []byte) (interface{}, error)

Jump to

Keyboard shortcuts

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