api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMetaIsNotAvailable = errors.New("metadb is not available")
View Source
var (
	TxnsMetaPrefix = []byte("m")
)

Functions

func MetaFromData

func MetaFromData(d *metadbpb.Data) *apipb.Meta

Types

type ClientFunc

type ClientFunc func(baseurl string) gatepb.ProcessorServiceInterface

type Router

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

func NewRouter

func NewRouter(router pt.Router, client ClientFunc) *Router

func (*Router) GetBalance

func (*Router) GetLastSettings

func (*Router) GetPrevHash

func (*Router) ProcessTransfer

func (r *Router) ProcessTransfer(ctx context.Context, req *gatepb.TransferRequest) (*gatepb.TransferResponse, error)

func (*Router) UpdateSettings

func (r *Router) UpdateSettings(ctx context.Context, req *gatepb.SettingsRequest) (*gatepb.SettingsResponse, error)

type Service

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

func NewService

func NewService(gate gatepb.ProcessorServiceInterface) *Service

func (*Service) GetBalance

func (*Service) GetByMetaKey

func (*Service) GetHistory

func (*Service) GetLastSettings

func (*Service) GetPrevHash

func (*Service) ProcessTransfer

func (s *Service) ProcessTransfer(ctx context.Context, req *apipb.TransferRequest) (*apipb.TransferResponse, error)

func (*Service) PutMeta

func (*Service) SearchMeta

func (*Service) SetMetaDBClient

func (s *Service) SetMetaDBClient(c metadbpb.MetaDBServiceInterface)

func (*Service) SetPlutoDBClient

func (s *Service) SetPlutoDBClient(c plutodbpb.PlutoDBServiceInterface)

func (*Service) UpdateSettings

func (s *Service) UpdateSettings(ctx context.Context, req *apipb.SettingsRequest) (*apipb.SettingsResponse, error)

Jump to

Keyboard shortcuts

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