gapi

package
v0.0.0-...-80e74b5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcLogger

func GrpcLogger(
	ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (resp interface{}, err error)

Types

type Server

type Server struct {
	pb.UnimplementedGateHubDataAPIServer

	Store gocqlx.Session
	Cache *redis.ClusterClient
	// contains filtered or unexported fields
}

Server serves gRPC requests for our GateHub Data Api service.

func NewServer

func NewServer(config util.Config) (*Server, error)

NewServer creates a new gRPC server

func (*Server) GetAccountBalanceChanges

func (server *Server) GetAccountBalanceChanges(ctx context.Context, req *pb.GetAccountBalanceChangesRequest) (*pb.GetAccountBalanceChangesResponse, error)

func (*Server) GetLastValidatedLedger

func (server *Server) GetLastValidatedLedger(ctx context.Context, req *pb.GetLastValidatedLedgerRequest) (*pb.GetLedgerResponse, error)

func (*Server) GetLedger

func (server *Server) GetLedger(ctx context.Context, req *pb.GetLedgerRequest) (*pb.GetLedgerResponse, error)

func (*Server) GetTransaction

func (server *Server) GetTransaction(ctx context.Context, req *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)

func (*Server) GetTransactionByHash

func (server *Server) GetTransactionByHash(transactionHash string) (*pb.Transaction, error)

func (*Server) GetTransactionsByLedgerIndex

func (server *Server) GetTransactionsByLedgerIndex(ledgerIndex int64) ([]pb.Transaction, error)

Jump to

Keyboard shortcuts

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