The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/api/proto/message/message.pb.go

393 lines
13 KiB

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: message.proto
package message
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// ReceiverType indicates who is the receiver of this message.
type ReceiverType int32
const (
ReceiverType_NEWNODE ReceiverType = 0
ReceiverType_LEADER ReceiverType = 1
ReceiverType_VALIDATOR ReceiverType = 2
ReceiverType_CLIENT ReceiverType = 3
)
var ReceiverType_name = map[int32]string{
0: "NEWNODE",
1: "LEADER",
2: "VALIDATOR",
3: "CLIENT",
}
var ReceiverType_value = map[string]int32{
"NEWNODE": 0,
"LEADER": 1,
"VALIDATOR": 2,
"CLIENT": 3,
}
func (x ReceiverType) String() string {
return proto.EnumName(ReceiverType_name, int32(x))
}
func (ReceiverType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{0}
}
// ServiceType indicates which service used to generate this message.
type ServiceType int32
const (
ServiceType_CONSENSUS ServiceType = 0
ServiceType_STAKING ServiceType = 1
)
var ServiceType_name = map[int32]string{
0: "CONSENSUS",
1: "STAKING",
}
var ServiceType_value = map[string]int32{
"CONSENSUS": 0,
"STAKING": 1,
}
func (x ServiceType) String() string {
return proto.EnumName(ServiceType_name, int32(x))
}
func (ServiceType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{1}
}
// MessageType indicates what is the type of this message.
type MessageType int32
const (
MessageType_NEWNODE_BEACON_STAKING MessageType = 0
MessageType_ANNOUNCE MessageType = 1
MessageType_PREPARE MessageType = 2
MessageType_PREPARED MessageType = 3
MessageType_COMMIT MessageType = 4
MessageType_COMMITTED MessageType = 5
)
var MessageType_name = map[int32]string{
0: "NEWNODE_BEACON_STAKING",
1: "ANNOUNCE",
2: "PREPARE",
3: "PREPARED",
4: "COMMIT",
5: "COMMITTED",
}
var MessageType_value = map[string]int32{
"NEWNODE_BEACON_STAKING": 0,
"ANNOUNCE": 1,
"PREPARE": 2,
"PREPARED": 3,
"COMMIT": 4,
"COMMITTED": 5,
}
func (x MessageType) String() string {
return proto.EnumName(MessageType_name, int32(x))
}
func (MessageType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{2}
}
// This is universal message for all communication protocols.
// There are different Requests for different message types.
// As we introduce a new type of message just add a new MessageType and new type of request in Message.
//
// The request field will be either one of the structure corresponding to the MessageType type.
type Message struct {
ReceiverType ReceiverType `protobuf:"varint,1,opt,name=receiver_type,json=receiverType,proto3,enum=message.ReceiverType" json:"receiver_type,omitempty"`
ServiceType ServiceType `protobuf:"varint,2,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"`
Type MessageType `protobuf:"varint,3,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
// Types that are valid to be assigned to Request:
// *Message_Staking
// *Message_Consensus
Request isMessage_Request `protobuf_oneof:"request"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{0}
}
func (m *Message) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Message.Unmarshal(m, b)
}
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
}
func (m *Message) XXX_Merge(src proto.Message) {
xxx_messageInfo_Message.Merge(m, src)
}
func (m *Message) XXX_Size() int {
return xxx_messageInfo_Message.Size(m)
}
func (m *Message) XXX_DiscardUnknown() {
xxx_messageInfo_Message.DiscardUnknown(m)
}
var xxx_messageInfo_Message proto.InternalMessageInfo
func (m *Message) GetReceiverType() ReceiverType {
if m != nil {
return m.ReceiverType
}
return ReceiverType_NEWNODE
}
func (m *Message) GetServiceType() ServiceType {
if m != nil {
return m.ServiceType
}
return ServiceType_CONSENSUS
}
func (m *Message) GetType() MessageType {
if m != nil {
return m.Type
}
return MessageType_NEWNODE_BEACON_STAKING
}
func (m *Message) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type isMessage_Request interface {
isMessage_Request()
}
type Message_Staking struct {
Staking *StakingRequest `protobuf:"bytes,5,opt,name=staking,proto3,oneof"`
}
type Message_Consensus struct {
Consensus *ConsensusRequest `protobuf:"bytes,6,opt,name=consensus,proto3,oneof"`
}
func (*Message_Staking) isMessage_Request() {}
func (*Message_Consensus) isMessage_Request() {}
func (m *Message) GetRequest() isMessage_Request {
if m != nil {
return m.Request
}
return nil
}
func (m *Message) GetStaking() *StakingRequest {
if x, ok := m.GetRequest().(*Message_Staking); ok {
return x.Staking
}
return nil
}
func (m *Message) GetConsensus() *ConsensusRequest {
if x, ok := m.GetRequest().(*Message_Consensus); ok {
return x.Consensus
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Message) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Message_Staking)(nil),
(*Message_Consensus)(nil),
}
}
// Staking Request from new node to beacon node.
type StakingRequest struct {
Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StakingRequest) Reset() { *m = StakingRequest{} }
func (m *StakingRequest) String() string { return proto.CompactTextString(m) }
func (*StakingRequest) ProtoMessage() {}
func (*StakingRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{1}
}
func (m *StakingRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StakingRequest.Unmarshal(m, b)
}
func (m *StakingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StakingRequest.Marshal(b, m, deterministic)
}
func (m *StakingRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_StakingRequest.Merge(m, src)
}
func (m *StakingRequest) XXX_Size() int {
return xxx_messageInfo_StakingRequest.Size(m)
}
func (m *StakingRequest) XXX_DiscardUnknown() {
xxx_messageInfo_StakingRequest.DiscardUnknown(m)
}
var xxx_messageInfo_StakingRequest proto.InternalMessageInfo
func (m *StakingRequest) GetTransaction() []byte {
if m != nil {
return m.Transaction
}
return nil
}
func (m *StakingRequest) GetNodeId() string {
if m != nil {
return m.NodeId
}
return ""
}
// Consensus request.
// TODO: Will organize more later.
type ConsensusRequest struct {
ConsensusId uint32 `protobuf:"varint,1,opt,name=consensus_id,json=consensusId,proto3" json:"consensus_id,omitempty"`
BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
SenderId uint32 `protobuf:"varint,3,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConsensusRequest) Reset() { *m = ConsensusRequest{} }
func (m *ConsensusRequest) String() string { return proto.CompactTextString(m) }
func (*ConsensusRequest) ProtoMessage() {}
func (*ConsensusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_33c57e4bae7b9afd, []int{2}
}
func (m *ConsensusRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConsensusRequest.Unmarshal(m, b)
}
func (m *ConsensusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConsensusRequest.Marshal(b, m, deterministic)
}
func (m *ConsensusRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConsensusRequest.Merge(m, src)
}
func (m *ConsensusRequest) XXX_Size() int {
return xxx_messageInfo_ConsensusRequest.Size(m)
}
func (m *ConsensusRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConsensusRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConsensusRequest proto.InternalMessageInfo
func (m *ConsensusRequest) GetConsensusId() uint32 {
if m != nil {
return m.ConsensusId
}
return 0
}
func (m *ConsensusRequest) GetBlockHash() []byte {
if m != nil {
return m.BlockHash
}
return nil
}
func (m *ConsensusRequest) GetSenderId() uint32 {
if m != nil {
return m.SenderId
}
return 0
}
func (m *ConsensusRequest) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterEnum("message.ReceiverType", ReceiverType_name, ReceiverType_value)
proto.RegisterEnum("message.ServiceType", ServiceType_name, ServiceType_value)
proto.RegisterEnum("message.MessageType", MessageType_name, MessageType_value)
proto.RegisterType((*Message)(nil), "message.Message")
proto.RegisterType((*StakingRequest)(nil), "message.StakingRequest")
proto.RegisterType((*ConsensusRequest)(nil), "message.ConsensusRequest")
}
func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }
var fileDescriptor_33c57e4bae7b9afd = []byte{
// 477 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x93, 0xcf, 0x6e, 0x9b, 0x40,
0x10, 0xc6, 0x8d, 0xed, 0x98, 0x30, 0xe0, 0x68, 0xb5, 0x6a, 0x1b, 0xf7, 0x9f, 0xe4, 0xfa, 0xe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