protobuf

package
v0.0.0-...-d9430aa Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReturnCode_name = map[int32]string{
		0: "SUCCESS",
		1: "ERROR",
	}
	ReturnCode_value = map[string]int32{
		"SUCCESS": 0,
		"ERROR":   1,
	}
)

Enum value maps for ReturnCode.

View Source
var File_indexer_proto protoreflect.FileDescriptor
View Source
var IndexerRpcService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "indexer.protobuf.IndexerRpcService",
	HandlerType: (*IndexerRpcServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLatestBlock",
			Handler:    _IndexerRpcService_GetLatestBlock_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "indexer.proto",
}

IndexerRpcService_ServiceDesc is the grpc.ServiceDesc for IndexerRpcService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIndexerRpcServiceServer

func RegisterIndexerRpcServiceServer(s grpc.ServiceRegistrar, srv IndexerRpcServiceServer)

Types

type IndexerRpcServiceClient

type IndexerRpcServiceClient interface {
	GetLatestBlock(ctx context.Context, in *LatestBlock, opts ...grpc.CallOption) (*LatestBlockRep, error)
}

IndexerRpcServiceClient is the client API for IndexerRpcService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type IndexerRpcServiceServer

type IndexerRpcServiceServer interface {
	GetLatestBlock(context.Context, *LatestBlock) (*LatestBlockRep, error)
}

IndexerRpcServiceServer is the server API for IndexerRpcService service. All implementations must embed UnimplementedIndexerRpcServiceServer for forward compatibility

type LatestBlock

type LatestBlock struct {
	ConsumerToken string `protobuf:"bytes,1,opt,name=consumer_token,json=consumerToken,proto3" json:"consumer_token,omitempty"`
	// contains filtered or unexported fields
}

func (*LatestBlock) Descriptor deprecated

func (*LatestBlock) Descriptor() ([]byte, []int)

Deprecated: Use LatestBlock.ProtoReflect.Descriptor instead.

func (*LatestBlock) GetConsumerToken

func (x *LatestBlock) GetConsumerToken() string

func (*LatestBlock) ProtoMessage

func (*LatestBlock) ProtoMessage()

func (*LatestBlock) ProtoReflect

func (x *LatestBlock) ProtoReflect() protoreflect.Message

func (*LatestBlock) Reset

func (x *LatestBlock) Reset()

func (*LatestBlock) String

func (x *LatestBlock) String() string

type LatestBlockRep

type LatestBlockRep struct {
	Code        ReturnCode `protobuf:"varint,1,opt,name=code,proto3,enum=indexer.protobuf.ReturnCode" json:"code,omitempty"`
	Msg         string     `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	BlockNumber uint64     `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// contains filtered or unexported fields
}

func (*LatestBlockRep) Descriptor deprecated

func (*LatestBlockRep) Descriptor() ([]byte, []int)

Deprecated: Use LatestBlockRep.ProtoReflect.Descriptor instead.

func (*LatestBlockRep) GetBlockNumber

func (x *LatestBlockRep) GetBlockNumber() uint64

func (*LatestBlockRep) GetCode

func (x *LatestBlockRep) GetCode() ReturnCode

func (*LatestBlockRep) GetMsg

func (x *LatestBlockRep) GetMsg() string

func (*LatestBlockRep) ProtoMessage

func (*LatestBlockRep) ProtoMessage()

func (*LatestBlockRep) ProtoReflect

func (x *LatestBlockRep) ProtoReflect() protoreflect.Message

func (*LatestBlockRep) Reset

func (x *LatestBlockRep) Reset()

func (*LatestBlockRep) String

func (x *LatestBlockRep) String() string

type ReturnCode

type ReturnCode int32
const (
	ReturnCode_SUCCESS ReturnCode = 0
	ReturnCode_ERROR   ReturnCode = 1
)

func (ReturnCode) Descriptor

func (ReturnCode) Descriptor() protoreflect.EnumDescriptor

func (ReturnCode) Enum

func (x ReturnCode) Enum() *ReturnCode

func (ReturnCode) EnumDescriptor deprecated

func (ReturnCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReturnCode.Descriptor instead.

func (ReturnCode) Number

func (x ReturnCode) Number() protoreflect.EnumNumber

func (ReturnCode) String

func (x ReturnCode) String() string

func (ReturnCode) Type

type UnimplementedIndexerRpcServiceServer

type UnimplementedIndexerRpcServiceServer struct {
}

UnimplementedIndexerRpcServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIndexerRpcServiceServer) GetLatestBlock

type UnsafeIndexerRpcServiceServer

type UnsafeIndexerRpcServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeIndexerRpcServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IndexerRpcServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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