proto

package
v0.0.0-...-efdc0b2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction"
	Protocol_GetTransaction_FullMethodName  = "/protocol.Protocol/GetTransaction"
	Protocol_Ping_FullMethodName            = "/protocol.Protocol/Ping"
)

Variables

View Source
var File_protocol_proto protoreflect.FileDescriptor
View Source
var Protocol_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protocol.Protocol",
	HandlerType: (*ProtocolServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendTransaction",
			Handler:    _Protocol_SendTransaction_Handler,
		},
		{
			MethodName: "GetTransaction",
			Handler:    _Protocol_GetTransaction_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _Protocol_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protocol.proto",
}

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

Functions

func RegisterProtocolServer

func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer)

Types

type GetTransactionRequest

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

func (*GetTransactionRequest) Descriptor deprecated

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

Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionRequest) GetTxhash

func (x *GetTransactionRequest) GetTxhash() string

func (*GetTransactionRequest) ProtoMessage

func (*GetTransactionRequest) ProtoMessage()

func (*GetTransactionRequest) ProtoReflect

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

func (*GetTransactionRequest) Reset

func (x *GetTransactionRequest) Reset()

func (*GetTransactionRequest) String

func (x *GetTransactionRequest) String() string

type ManageEntityLegacy

type ManageEntityLegacy struct {
	UserId     int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	EntityType string `protobuf:"bytes,2,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"`
	EntityId   int64  `protobuf:"varint,3,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	Action     string `protobuf:"bytes,4,opt,name=action,proto3" json:"action,omitempty"`
	Metadata   string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Signature  string `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*ManageEntityLegacy) Descriptor deprecated

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

Deprecated: Use ManageEntityLegacy.ProtoReflect.Descriptor instead.

func (*ManageEntityLegacy) GetAction

func (x *ManageEntityLegacy) GetAction() string

func (*ManageEntityLegacy) GetEntityId

func (x *ManageEntityLegacy) GetEntityId() int64

func (*ManageEntityLegacy) GetEntityType

func (x *ManageEntityLegacy) GetEntityType() string

func (*ManageEntityLegacy) GetMetadata

func (x *ManageEntityLegacy) GetMetadata() string

func (*ManageEntityLegacy) GetSignature

func (x *ManageEntityLegacy) GetSignature() string

func (*ManageEntityLegacy) GetUserId

func (x *ManageEntityLegacy) GetUserId() int64

func (*ManageEntityLegacy) ProtoMessage

func (*ManageEntityLegacy) ProtoMessage()

func (*ManageEntityLegacy) ProtoReflect

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

func (*ManageEntityLegacy) Reset

func (x *ManageEntityLegacy) Reset()

func (*ManageEntityLegacy) String

func (x *ManageEntityLegacy) String() string

type PingRequest

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

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

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

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetMessage

func (x *PingResponse) GetMessage() string

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type ProtocolClient

type ProtocolClient interface {
	SendTransaction(ctx context.Context, in *SendTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}

ProtocolClient is the client API for Protocol 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 NewProtocolClient

func NewProtocolClient(cc grpc.ClientConnInterface) ProtocolClient

type ProtocolServer

type ProtocolServer interface {
	SendTransaction(context.Context, *SendTransactionRequest) (*TransactionResponse, error)
	GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error)
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// contains filtered or unexported methods
}

ProtocolServer is the server API for Protocol service. All implementations must embed UnimplementedProtocolServer for forward compatibility.

type SendTransactionRequest

type SendTransactionRequest struct {
	Transaction *SignedTransaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

func (*SendTransactionRequest) Descriptor deprecated

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

Deprecated: Use SendTransactionRequest.ProtoReflect.Descriptor instead.

func (*SendTransactionRequest) GetTransaction

func (x *SendTransactionRequest) GetTransaction() *SignedTransaction

func (*SendTransactionRequest) ProtoMessage

func (*SendTransactionRequest) ProtoMessage()

func (*SendTransactionRequest) ProtoReflect

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

func (*SendTransactionRequest) Reset

func (x *SendTransactionRequest) Reset()

func (*SendTransactionRequest) String

func (x *SendTransactionRequest) String() string

type SignedTransaction

type SignedTransaction struct {
	Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Types that are assignable to Transaction:
	//
	//	*SignedTransaction_Plays
	//	*SignedTransaction_ValidatorRegistration
	//	*SignedTransaction_SlaRollup
	//	*SignedTransaction_ManageEntity
	Transaction isSignedTransaction_Transaction `protobuf_oneof:"transaction"`
	// contains filtered or unexported fields
}

func (*SignedTransaction) Descriptor deprecated

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

Deprecated: Use SignedTransaction.ProtoReflect.Descriptor instead.

func (*SignedTransaction) GetManageEntity

func (x *SignedTransaction) GetManageEntity() *ManageEntityLegacy

func (*SignedTransaction) GetPlays

func (x *SignedTransaction) GetPlays() *TrackPlays

func (*SignedTransaction) GetRequestId

func (x *SignedTransaction) GetRequestId() string

func (*SignedTransaction) GetSignature

func (x *SignedTransaction) GetSignature() string

func (*SignedTransaction) GetSlaRollup

func (x *SignedTransaction) GetSlaRollup() *SlaRollup

func (*SignedTransaction) GetTransaction

func (m *SignedTransaction) GetTransaction() isSignedTransaction_Transaction

func (*SignedTransaction) GetValidatorRegistration

func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration

func (*SignedTransaction) ProtoMessage

func (*SignedTransaction) ProtoMessage()

func (*SignedTransaction) ProtoReflect

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

func (*SignedTransaction) Reset

func (x *SignedTransaction) Reset()

func (*SignedTransaction) String

func (x *SignedTransaction) String() string

type SignedTransaction_ManageEntity

type SignedTransaction_ManageEntity struct {
	ManageEntity *ManageEntityLegacy `protobuf:"bytes,1003,opt,name=manage_entity,json=manageEntity,proto3,oneof"`
}

type SignedTransaction_Plays

type SignedTransaction_Plays struct {
	Plays *TrackPlays `protobuf:"bytes,1000,opt,name=plays,proto3,oneof"`
}

type SignedTransaction_SlaRollup

type SignedTransaction_SlaRollup struct {
	SlaRollup *SlaRollup `protobuf:"bytes,1002,opt,name=sla_rollup,json=slaRollup,proto3,oneof"`
}

type SignedTransaction_ValidatorRegistration

type SignedTransaction_ValidatorRegistration struct {
	ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1001,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"`
}

type SlaNodeReport

type SlaNodeReport struct {
	Address           string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	NumBlocksProposed int32  `protobuf:"varint,2,opt,name=num_blocks_proposed,json=numBlocksProposed,proto3" json:"num_blocks_proposed,omitempty"`
	// contains filtered or unexported fields
}

func (*SlaNodeReport) Descriptor deprecated

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

Deprecated: Use SlaNodeReport.ProtoReflect.Descriptor instead.

func (*SlaNodeReport) GetAddress

func (x *SlaNodeReport) GetAddress() string

func (*SlaNodeReport) GetNumBlocksProposed

func (x *SlaNodeReport) GetNumBlocksProposed() int32

func (*SlaNodeReport) ProtoMessage

func (*SlaNodeReport) ProtoMessage()

func (*SlaNodeReport) ProtoReflect

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

func (*SlaNodeReport) Reset

func (x *SlaNodeReport) Reset()

func (*SlaNodeReport) String

func (x *SlaNodeReport) String() string

type SlaRollup

type SlaRollup struct {
	Timestamp  *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	BlockStart int64                  `protobuf:"varint,2,opt,name=block_start,json=blockStart,proto3" json:"block_start,omitempty"`
	BlockEnd   int64                  `protobuf:"varint,3,opt,name=block_end,json=blockEnd,proto3" json:"block_end,omitempty"`
	Reports    []*SlaNodeReport       `protobuf:"bytes,4,rep,name=reports,proto3" json:"reports,omitempty"`
	// contains filtered or unexported fields
}

func (*SlaRollup) Descriptor deprecated

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

Deprecated: Use SlaRollup.ProtoReflect.Descriptor instead.

func (*SlaRollup) GetBlockEnd

func (x *SlaRollup) GetBlockEnd() int64

func (*SlaRollup) GetBlockStart

func (x *SlaRollup) GetBlockStart() int64

func (*SlaRollup) GetReports

func (x *SlaRollup) GetReports() []*SlaNodeReport

func (*SlaRollup) GetTimestamp

func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp

func (*SlaRollup) ProtoMessage

func (*SlaRollup) ProtoMessage()

func (*SlaRollup) ProtoReflect

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

func (*SlaRollup) Reset

func (x *SlaRollup) Reset()

func (*SlaRollup) String

func (x *SlaRollup) String() string

type TrackPlay

type TrackPlay struct {
	UserId    string                 `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	TrackId   string                 `protobuf:"bytes,2,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature string                 `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackPlay) Descriptor deprecated

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

Deprecated: Use TrackPlay.ProtoReflect.Descriptor instead.

func (*TrackPlay) GetSignature

func (x *TrackPlay) GetSignature() string

func (*TrackPlay) GetTimestamp

func (x *TrackPlay) GetTimestamp() *timestamppb.Timestamp

func (*TrackPlay) GetTrackId

func (x *TrackPlay) GetTrackId() string

func (*TrackPlay) GetUserId

func (x *TrackPlay) GetUserId() string

func (*TrackPlay) ProtoMessage

func (*TrackPlay) ProtoMessage()

func (*TrackPlay) ProtoReflect

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

func (*TrackPlay) Reset

func (x *TrackPlay) Reset()

func (*TrackPlay) String

func (x *TrackPlay) String() string

type TrackPlays

type TrackPlays struct {
	Plays []*TrackPlay `protobuf:"bytes,1,rep,name=plays,proto3" json:"plays,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackPlays) Descriptor deprecated

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

Deprecated: Use TrackPlays.ProtoReflect.Descriptor instead.

func (*TrackPlays) GetPlays

func (x *TrackPlays) GetPlays() []*TrackPlay

func (*TrackPlays) ProtoMessage

func (*TrackPlays) ProtoMessage()

func (*TrackPlays) ProtoReflect

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

func (*TrackPlays) Reset

func (x *TrackPlays) Reset()

func (*TrackPlays) String

func (x *TrackPlays) String() string

type TransactionResponse

type TransactionResponse struct {
	Txhash      string             `protobuf:"bytes,1,opt,name=txhash,proto3" json:"txhash,omitempty"`
	Transaction *SignedTransaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionResponse) Descriptor deprecated

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

Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.

func (*TransactionResponse) GetTransaction

func (x *TransactionResponse) GetTransaction() *SignedTransaction

func (*TransactionResponse) GetTxhash

func (x *TransactionResponse) GetTxhash() string

func (*TransactionResponse) ProtoMessage

func (*TransactionResponse) ProtoMessage()

func (*TransactionResponse) ProtoReflect

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

func (*TransactionResponse) Reset

func (x *TransactionResponse) Reset()

func (*TransactionResponse) String

func (x *TransactionResponse) String() string

type UnimplementedProtocolServer

type UnimplementedProtocolServer struct{}

UnimplementedProtocolServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedProtocolServer) GetTransaction

func (UnimplementedProtocolServer) Ping

func (UnimplementedProtocolServer) SendTransaction

type UnsafeProtocolServer

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

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

type ValidatorRegistration

type ValidatorRegistration struct {
	Endpoint     string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	CometAddress string `protobuf:"bytes,2,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"`
	EthBlock     string `protobuf:"bytes,3,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"`
	NodeType     string `protobuf:"bytes,4,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"`
	SpId         string `protobuf:"bytes,5,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidatorRegistration) Descriptor deprecated

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

Deprecated: Use ValidatorRegistration.ProtoReflect.Descriptor instead.

func (*ValidatorRegistration) GetCometAddress

func (x *ValidatorRegistration) GetCometAddress() string

func (*ValidatorRegistration) GetEndpoint

func (x *ValidatorRegistration) GetEndpoint() string

func (*ValidatorRegistration) GetEthBlock

func (x *ValidatorRegistration) GetEthBlock() string

func (*ValidatorRegistration) GetNodeType

func (x *ValidatorRegistration) GetNodeType() string

func (*ValidatorRegistration) GetSpId

func (x *ValidatorRegistration) GetSpId() string

func (*ValidatorRegistration) ProtoMessage

func (*ValidatorRegistration) ProtoMessage()

func (*ValidatorRegistration) ProtoReflect

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

func (*ValidatorRegistration) Reset

func (x *ValidatorRegistration) Reset()

func (*ValidatorRegistration) String

func (x *ValidatorRegistration) String() string

Jump to

Keyboard shortcuts

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