proto

package
v0.0.0-...-8d666af Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_system_proto protoreflect.FileDescriptor
View Source
var System_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.System",
	HandlerType: (*SystemServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStatus",
			Handler:    _System_GetStatus_Handler,
		},
		{
			MethodName: "PeersAdd",
			Handler:    _System_PeersAdd_Handler,
		},
		{
			MethodName: "PeersList",
			Handler:    _System_PeersList_Handler,
		},
		{
			MethodName: "PeersStatus",
			Handler:    _System_PeersStatus_Handler,
		},
		{
			MethodName: "BlockByNumber",
			Handler:    _System_BlockByNumber_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _System_Subscribe_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Export",
			Handler:       _System_Export_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "system.proto",
}

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

Functions

func RegisterSystemServer

func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)

Types

type BlockByNumberRequest

type BlockByNumberRequest struct {
	Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockByNumberRequest) Descriptor deprecated

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

Deprecated: Use BlockByNumberRequest.ProtoReflect.Descriptor instead.

func (*BlockByNumberRequest) GetNumber

func (x *BlockByNumberRequest) GetNumber() uint64

func (*BlockByNumberRequest) ProtoMessage

func (*BlockByNumberRequest) ProtoMessage()

func (*BlockByNumberRequest) ProtoReflect

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

func (*BlockByNumberRequest) Reset

func (x *BlockByNumberRequest) Reset()

func (*BlockByNumberRequest) String

func (x *BlockByNumberRequest) String() string

type BlockResponse

type BlockResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockResponse) Descriptor deprecated

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

Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.

func (*BlockResponse) GetData

func (x *BlockResponse) GetData() []byte

func (*BlockResponse) ProtoMessage

func (*BlockResponse) ProtoMessage()

func (*BlockResponse) ProtoReflect

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

func (*BlockResponse) Reset

func (x *BlockResponse) Reset()

func (*BlockResponse) String

func (x *BlockResponse) String() string

type BlockchainEvent

type BlockchainEvent struct {
	Added   []*BlockchainEvent_Header `protobuf:"bytes,1,rep,name=added,proto3" json:"added,omitempty"`
	Removed []*BlockchainEvent_Header `protobuf:"bytes,2,rep,name=removed,proto3" json:"removed,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockchainEvent) Descriptor deprecated

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

Deprecated: Use BlockchainEvent.ProtoReflect.Descriptor instead.

func (*BlockchainEvent) GetAdded

func (x *BlockchainEvent) GetAdded() []*BlockchainEvent_Header

func (*BlockchainEvent) GetRemoved

func (x *BlockchainEvent) GetRemoved() []*BlockchainEvent_Header

func (*BlockchainEvent) ProtoMessage

func (*BlockchainEvent) ProtoMessage()

func (*BlockchainEvent) ProtoReflect

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

func (*BlockchainEvent) Reset

func (x *BlockchainEvent) Reset()

func (*BlockchainEvent) String

func (x *BlockchainEvent) String() string

type BlockchainEvent_Header

type BlockchainEvent_Header struct {
	Number int64  `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	Hash   string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockchainEvent_Header) Descriptor deprecated

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

Deprecated: Use BlockchainEvent_Header.ProtoReflect.Descriptor instead.

func (*BlockchainEvent_Header) GetHash

func (x *BlockchainEvent_Header) GetHash() string

func (*BlockchainEvent_Header) GetNumber

func (x *BlockchainEvent_Header) GetNumber() int64

func (*BlockchainEvent_Header) ProtoMessage

func (*BlockchainEvent_Header) ProtoMessage()

func (*BlockchainEvent_Header) ProtoReflect

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

func (*BlockchainEvent_Header) Reset

func (x *BlockchainEvent_Header) Reset()

func (*BlockchainEvent_Header) String

func (x *BlockchainEvent_Header) String() string

type ExportEvent

type ExportEvent struct {
	From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	// null when zero
	To     uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	Latest uint64 `protobuf:"varint,3,opt,name=latest,proto3" json:"latest,omitempty"`
	Data   []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportEvent) Descriptor deprecated

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

Deprecated: Use ExportEvent.ProtoReflect.Descriptor instead.

func (*ExportEvent) GetData

func (x *ExportEvent) GetData() []byte

func (*ExportEvent) GetFrom

func (x *ExportEvent) GetFrom() uint64

func (*ExportEvent) GetLatest

func (x *ExportEvent) GetLatest() uint64

func (*ExportEvent) GetTo

func (x *ExportEvent) GetTo() uint64

func (*ExportEvent) ProtoMessage

func (*ExportEvent) ProtoMessage()

func (*ExportEvent) ProtoReflect

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

func (*ExportEvent) Reset

func (x *ExportEvent) Reset()

func (*ExportEvent) String

func (x *ExportEvent) String() string

type ExportRequest

type ExportRequest struct {
	From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To   uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportRequest) Descriptor deprecated

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

Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.

func (*ExportRequest) GetFrom

func (x *ExportRequest) GetFrom() uint64

func (*ExportRequest) GetTo

func (x *ExportRequest) GetTo() uint64

func (*ExportRequest) ProtoMessage

func (*ExportRequest) ProtoMessage()

func (*ExportRequest) ProtoReflect

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

func (*ExportRequest) Reset

func (x *ExportRequest) Reset()

func (*ExportRequest) String

func (x *ExportRequest) String() string

type Peer

type Peer struct {
	Id        string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Protocols []string `protobuf:"bytes,2,rep,name=protocols,proto3" json:"protocols,omitempty"`
	Addrs     []string `protobuf:"bytes,3,rep,name=addrs,proto3" json:"addrs,omitempty"`
	// contains filtered or unexported fields
}

func (*Peer) Descriptor deprecated

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetAddrs

func (x *Peer) GetAddrs() []string

func (*Peer) GetId

func (x *Peer) GetId() string

func (*Peer) GetProtocols

func (x *Peer) GetProtocols() []string

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect

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

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

type PeersAddRequest

type PeersAddRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*PeersAddRequest) Descriptor deprecated

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

Deprecated: Use PeersAddRequest.ProtoReflect.Descriptor instead.

func (*PeersAddRequest) GetId

func (x *PeersAddRequest) GetId() string

func (*PeersAddRequest) ProtoMessage

func (*PeersAddRequest) ProtoMessage()

func (*PeersAddRequest) ProtoReflect

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

func (*PeersAddRequest) Reset

func (x *PeersAddRequest) Reset()

func (*PeersAddRequest) String

func (x *PeersAddRequest) String() string

type PeersAddResponse

type PeersAddResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PeersAddResponse) Descriptor deprecated

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

Deprecated: Use PeersAddResponse.ProtoReflect.Descriptor instead.

func (*PeersAddResponse) GetMessage

func (x *PeersAddResponse) GetMessage() string

func (*PeersAddResponse) ProtoMessage

func (*PeersAddResponse) ProtoMessage()

func (*PeersAddResponse) ProtoReflect

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

func (*PeersAddResponse) Reset

func (x *PeersAddResponse) Reset()

func (*PeersAddResponse) String

func (x *PeersAddResponse) String() string

type PeersListResponse

type PeersListResponse struct {
	Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*PeersListResponse) Descriptor deprecated

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

Deprecated: Use PeersListResponse.ProtoReflect.Descriptor instead.

func (*PeersListResponse) GetPeers

func (x *PeersListResponse) GetPeers() []*Peer

func (*PeersListResponse) ProtoMessage

func (*PeersListResponse) ProtoMessage()

func (*PeersListResponse) ProtoReflect

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

func (*PeersListResponse) Reset

func (x *PeersListResponse) Reset()

func (*PeersListResponse) String

func (x *PeersListResponse) String() string

type PeersStatusRequest

type PeersStatusRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*PeersStatusRequest) Descriptor deprecated

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

Deprecated: Use PeersStatusRequest.ProtoReflect.Descriptor instead.

func (*PeersStatusRequest) GetId

func (x *PeersStatusRequest) GetId() string

func (*PeersStatusRequest) ProtoMessage

func (*PeersStatusRequest) ProtoMessage()

func (*PeersStatusRequest) ProtoReflect

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

func (*PeersStatusRequest) Reset

func (x *PeersStatusRequest) Reset()

func (*PeersStatusRequest) String

func (x *PeersStatusRequest) String() string

type ServerStatus

type ServerStatus struct {
	Network int64               `protobuf:"varint,1,opt,name=network,proto3" json:"network,omitempty"`
	Genesis string              `protobuf:"bytes,2,opt,name=genesis,proto3" json:"genesis,omitempty"`
	Current *ServerStatus_Block `protobuf:"bytes,3,opt,name=current,proto3" json:"current,omitempty"`
	P2PAddr string              `protobuf:"bytes,4,opt,name=p2pAddr,proto3" json:"p2pAddr,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerStatus) Descriptor deprecated

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

Deprecated: Use ServerStatus.ProtoReflect.Descriptor instead.

func (*ServerStatus) GetCurrent

func (x *ServerStatus) GetCurrent() *ServerStatus_Block

func (*ServerStatus) GetGenesis

func (x *ServerStatus) GetGenesis() string

func (*ServerStatus) GetNetwork

func (x *ServerStatus) GetNetwork() int64

func (*ServerStatus) GetP2PAddr

func (x *ServerStatus) GetP2PAddr() string

func (*ServerStatus) ProtoMessage

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) ProtoReflect

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

func (*ServerStatus) Reset

func (x *ServerStatus) Reset()

func (*ServerStatus) String

func (x *ServerStatus) String() string

type ServerStatus_Block

type ServerStatus_Block struct {
	Number int64  `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	Hash   string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerStatus_Block) Descriptor deprecated

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

Deprecated: Use ServerStatus_Block.ProtoReflect.Descriptor instead.

func (*ServerStatus_Block) GetHash

func (x *ServerStatus_Block) GetHash() string

func (*ServerStatus_Block) GetNumber

func (x *ServerStatus_Block) GetNumber() int64

func (*ServerStatus_Block) ProtoMessage

func (*ServerStatus_Block) ProtoMessage()

func (*ServerStatus_Block) ProtoReflect

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

func (*ServerStatus_Block) Reset

func (x *ServerStatus_Block) Reset()

func (*ServerStatus_Block) String

func (x *ServerStatus_Block) String() string

type SystemClient

type SystemClient interface {
	// GetInfo returns info about the client
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
	// PeersAdd adds a new peer
	PeersAdd(ctx context.Context, in *PeersAddRequest, opts ...grpc.CallOption) (*PeersAddResponse, error)
	// PeersList returns the list of peers
	PeersList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeersListResponse, error)
	// PeersInfo returns the info of a peer
	PeersStatus(ctx context.Context, in *PeersStatusRequest, opts ...grpc.CallOption) (*Peer, error)
	// Subscribe subscribes to blockchain events
	Subscribe(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (System_SubscribeClient, error)
	// Export returns blockchain data
	BlockByNumber(ctx context.Context, in *BlockByNumberRequest, opts ...grpc.CallOption) (*BlockResponse, error)
	// Export returns blockchain data
	Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (System_ExportClient, error)
}

SystemClient is the client API for System service.

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

func NewSystemClient

func NewSystemClient(cc grpc.ClientConnInterface) SystemClient

type SystemServer

type SystemServer interface {
	// GetInfo returns info about the client
	GetStatus(context.Context, *emptypb.Empty) (*ServerStatus, error)
	// PeersAdd adds a new peer
	PeersAdd(context.Context, *PeersAddRequest) (*PeersAddResponse, error)
	// PeersList returns the list of peers
	PeersList(context.Context, *emptypb.Empty) (*PeersListResponse, error)
	// PeersInfo returns the info of a peer
	PeersStatus(context.Context, *PeersStatusRequest) (*Peer, error)
	// Subscribe subscribes to blockchain events
	Subscribe(*emptypb.Empty, System_SubscribeServer) error
	// Export returns blockchain data
	BlockByNumber(context.Context, *BlockByNumberRequest) (*BlockResponse, error)
	// Export returns blockchain data
	Export(*ExportRequest, System_ExportServer) error
	// contains filtered or unexported methods
}

SystemServer is the server API for System service. All implementations must embed UnimplementedSystemServer for forward compatibility

type System_ExportClient

type System_ExportClient interface {
	Recv() (*ExportEvent, error)
	grpc.ClientStream
}

type System_ExportServer

type System_ExportServer interface {
	Send(*ExportEvent) error
	grpc.ServerStream
}

type System_SubscribeClient

type System_SubscribeClient interface {
	Recv() (*BlockchainEvent, error)
	grpc.ClientStream
}

type System_SubscribeServer

type System_SubscribeServer interface {
	Send(*BlockchainEvent) error
	grpc.ServerStream
}

type UnimplementedSystemServer

type UnimplementedSystemServer struct {
}

UnimplementedSystemServer must be embedded to have forward compatible implementations.

func (UnimplementedSystemServer) BlockByNumber

func (UnimplementedSystemServer) Export

func (UnimplementedSystemServer) GetStatus

func (UnimplementedSystemServer) PeersAdd

func (UnimplementedSystemServer) PeersList

func (UnimplementedSystemServer) PeersStatus

func (UnimplementedSystemServer) Subscribe

type UnsafeSystemServer

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

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

Jump to

Keyboard shortcuts

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