pb

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageData

type MessageData struct {
	// shared between all requests
	ClientVersion        string   `protobuf:"bytes,1,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
	Id                   string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	NodeId               string   `protobuf:"bytes,3,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
	NodePubKey           []byte   `protobuf:"bytes,4,opt,name=nodePubKey,proto3" json:"nodePubKey,omitempty"`
	Sign                 []byte   `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign,omitempty"`
	Timestamp            int64    `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Gossip               bool     `protobuf:"varint,7,opt,name=gossip,proto3" json:"gossip,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

designed to be shared between all app protocols

func (*MessageData) Descriptor

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

func (*MessageData) GetClientVersion

func (m *MessageData) GetClientVersion() string

func (*MessageData) GetGossip

func (m *MessageData) GetGossip() bool

func (*MessageData) GetId

func (m *MessageData) GetId() string

func (*MessageData) GetNodeId

func (m *MessageData) GetNodeId() string

func (*MessageData) GetNodePubKey

func (m *MessageData) GetNodePubKey() []byte

func (*MessageData) GetSign

func (m *MessageData) GetSign() []byte

func (*MessageData) GetTimestamp

func (m *MessageData) GetTimestamp() int64

func (*MessageData) ProtoMessage

func (*MessageData) ProtoMessage()

func (*MessageData) Reset

func (m *MessageData) Reset()

func (*MessageData) String

func (m *MessageData) String() string

func (*MessageData) XXX_DiscardUnknown

func (m *MessageData) XXX_DiscardUnknown()

func (*MessageData) XXX_Marshal

func (m *MessageData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MessageData) XXX_Merge

func (m *MessageData) XXX_Merge(src proto.Message)

func (*MessageData) XXX_Size

func (m *MessageData) XXX_Size() int

func (*MessageData) XXX_Unmarshal

func (m *MessageData) XXX_Unmarshal(b []byte) error

type ReadfileRequest

type ReadfileRequest struct {
	// Roothash uniquely identifies a user data
	Roothash string `protobuf:"bytes,1,opt,name=Roothash,json=roothash,proto3" json:"Roothash,omitempty"`
	// Datahash is the currently written data hash value
	Datahash string `protobuf:"bytes,2,opt,name=Datahash,json=datahash,proto3" json:"Datahash,omitempty"`
	// MessageData is a generic message
	MessageData *MessageData `protobuf:"bytes,3,opt,name=messageData,proto3" json:"messageData,omitempty"`
	// Offset is the offset that the reader wants to read
	Offset               int64    `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

a protocol define a set of reuqest and responses

func (*ReadfileRequest) Descriptor

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

func (*ReadfileRequest) GetDatahash

func (m *ReadfileRequest) GetDatahash() string

func (*ReadfileRequest) GetMessageData

func (m *ReadfileRequest) GetMessageData() *MessageData

func (*ReadfileRequest) GetOffset

func (m *ReadfileRequest) GetOffset() int64

func (*ReadfileRequest) GetRoothash

func (m *ReadfileRequest) GetRoothash() string

func (*ReadfileRequest) ProtoMessage

func (*ReadfileRequest) ProtoMessage()

func (*ReadfileRequest) Reset

func (m *ReadfileRequest) Reset()

func (*ReadfileRequest) String

func (m *ReadfileRequest) String() string

func (*ReadfileRequest) XXX_DiscardUnknown

func (m *ReadfileRequest) XXX_DiscardUnknown()

func (*ReadfileRequest) XXX_Marshal

func (m *ReadfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadfileRequest) XXX_Merge

func (m *ReadfileRequest) XXX_Merge(src proto.Message)

func (*ReadfileRequest) XXX_Size

func (m *ReadfileRequest) XXX_Size() int

func (*ReadfileRequest) XXX_Unmarshal

func (m *ReadfileRequest) XXX_Unmarshal(b []byte) error

type ReadfileResponse

type ReadfileResponse struct {
	// Data is the returned data
	Data []byte `protobuf:"bytes,1,opt,name=Data,json=data,proto3" json:"Data,omitempty"`
	// MessageData is a generic message
	MessageData *MessageData `protobuf:"bytes,2,opt,name=messageData,proto3" json:"messageData,omitempty"`
	// Offset is the data offset returned by the peer
	Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// Code indicates the result of this transfer
	Code uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
	// Length is the returned data length
	Length               uint32   `protobuf:"varint,5,opt,name=length,proto3" json:"length,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadfileResponse) Descriptor

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

func (*ReadfileResponse) GetCode

func (m *ReadfileResponse) GetCode() uint32

func (*ReadfileResponse) GetData

func (m *ReadfileResponse) GetData() []byte

func (*ReadfileResponse) GetLength

func (m *ReadfileResponse) GetLength() uint32

func (*ReadfileResponse) GetMessageData

func (m *ReadfileResponse) GetMessageData() *MessageData

func (*ReadfileResponse) GetOffset

func (m *ReadfileResponse) GetOffset() int64

func (*ReadfileResponse) ProtoMessage

func (*ReadfileResponse) ProtoMessage()

func (*ReadfileResponse) Reset

func (m *ReadfileResponse) Reset()

func (*ReadfileResponse) String

func (m *ReadfileResponse) String() string

func (*ReadfileResponse) XXX_DiscardUnknown

func (m *ReadfileResponse) XXX_DiscardUnknown()

func (*ReadfileResponse) XXX_Marshal

func (m *ReadfileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadfileResponse) XXX_Merge

func (m *ReadfileResponse) XXX_Merge(src proto.Message)

func (*ReadfileResponse) XXX_Size

func (m *ReadfileResponse) XXX_Size() int

func (*ReadfileResponse) XXX_Unmarshal

func (m *ReadfileResponse) XXX_Unmarshal(b []byte) error

type WritefileRequest

type WritefileRequest struct {
	// Roothash uniquely identifies a user data
	Roothash string `protobuf:"bytes,1,opt,name=Roothash,json=roothash,proto3" json:"Roothash,omitempty"`
	// Datahash is the currently written data hash value
	Datahash string `protobuf:"bytes,2,opt,name=Datahash,json=datahash,proto3" json:"Datahash,omitempty"`
	// Data is the data written this time
	Data []byte `protobuf:"bytes,3,opt,name=Data,json=data,proto3" json:"Data,omitempty"`
	// MessageData is a generic message
	MessageData *MessageData `protobuf:"bytes,4,opt,name=messageData,proto3" json:"messageData,omitempty"`
	// Offset is the offset of this write
	Offset int64 `protobuf:"varint,5,opt,name=Offset,json=offset,proto3" json:"Offset,omitempty"`
	// Length is the length of the data written this time
	Length               uint32   `protobuf:"varint,6,opt,name=Length,json=length,proto3" json:"Length,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

a protocol define a set of reuqest and responses

func (*WritefileRequest) Descriptor

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

func (*WritefileRequest) GetData

func (m *WritefileRequest) GetData() []byte

func (*WritefileRequest) GetDatahash

func (m *WritefileRequest) GetDatahash() string

func (*WritefileRequest) GetLength

func (m *WritefileRequest) GetLength() uint32

func (*WritefileRequest) GetMessageData

func (m *WritefileRequest) GetMessageData() *MessageData

func (*WritefileRequest) GetOffset

func (m *WritefileRequest) GetOffset() int64

func (*WritefileRequest) GetRoothash

func (m *WritefileRequest) GetRoothash() string

func (*WritefileRequest) ProtoMessage

func (*WritefileRequest) ProtoMessage()

func (*WritefileRequest) Reset

func (m *WritefileRequest) Reset()

func (*WritefileRequest) String

func (m *WritefileRequest) String() string

func (*WritefileRequest) XXX_DiscardUnknown

func (m *WritefileRequest) XXX_DiscardUnknown()

func (*WritefileRequest) XXX_Marshal

func (m *WritefileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WritefileRequest) XXX_Merge

func (m *WritefileRequest) XXX_Merge(src proto.Message)

func (*WritefileRequest) XXX_Size

func (m *WritefileRequest) XXX_Size() int

func (*WritefileRequest) XXX_Unmarshal

func (m *WritefileRequest) XXX_Unmarshal(b []byte) error

type WritefileResponse

type WritefileResponse struct {
	// MessageData is a generic message
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData,proto3" json:"messageData,omitempty"`
	// Offset is the write offset the receiver wants
	Offset int64 `protobuf:"varint,2,opt,name=Offset,json=offset,proto3" json:"Offset,omitempty"`
	// Code indicates the result of this transfer
	Code                 uint32   `protobuf:"varint,3,opt,name=Code,json=code,proto3" json:"Code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WritefileResponse) Descriptor

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

func (*WritefileResponse) GetCode

func (m *WritefileResponse) GetCode() uint32

func (*WritefileResponse) GetMessageData

func (m *WritefileResponse) GetMessageData() *MessageData

func (*WritefileResponse) GetOffset

func (m *WritefileResponse) GetOffset() int64

func (*WritefileResponse) ProtoMessage

func (*WritefileResponse) ProtoMessage()

func (*WritefileResponse) Reset

func (m *WritefileResponse) Reset()

func (*WritefileResponse) String

func (m *WritefileResponse) String() string

func (*WritefileResponse) XXX_DiscardUnknown

func (m *WritefileResponse) XXX_DiscardUnknown()

func (*WritefileResponse) XXX_Marshal

func (m *WritefileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WritefileResponse) XXX_Merge

func (m *WritefileResponse) XXX_Merge(src proto.Message)

func (*WritefileResponse) XXX_Size

func (m *WritefileResponse) XXX_Size() int

func (*WritefileResponse) XXX_Unmarshal

func (m *WritefileResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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