consensusproto

package
v0.5.18 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConsensus        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConsensus          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConsensus = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrCodes_name = map[int32]string{
	0:   "Unexpected",
	1:   "LogExists",
	2:   "LogNotFound",
	3:   "RecordConflict",
	4:   "Forbidden",
	5:   "InvalidPayload",
	500: "ErrorOffset",
}
View Source
var ErrCodes_value = map[string]int32{
	"Unexpected":     0,
	"LogExists":      1,
	"LogNotFound":    2,
	"RecordConflict": 3,
	"Forbidden":      4,
	"InvalidPayload": 5,
	"ErrorOffset":    500,
}

Functions

func DRPCRegisterConsensus

func DRPCRegisterConsensus(mux drpc.Mux, impl DRPCConsensusServer) error

func GetHead added in v0.2.15

func GetHead(msg *LogSyncMessage) (head string)

Types

type DRPCConsensusClient

type DRPCConsensusClient interface {
	DRPCConn() drpc.Conn

	LogAdd(ctx context.Context, in *LogAddRequest) (*Ok, error)
	RecordAdd(ctx context.Context, in *RecordAddRequest) (*RawRecordWithId, error)
	LogWatch(ctx context.Context) (DRPCConsensus_LogWatchClient, error)
	LogDelete(ctx context.Context, in *LogDeleteRequest) (*Ok, error)
}

func NewDRPCConsensusClient

func NewDRPCConsensusClient(cc drpc.Conn) DRPCConsensusClient

type DRPCConsensusDescription

type DRPCConsensusDescription struct{}

func (DRPCConsensusDescription) Method

func (DRPCConsensusDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

func (DRPCConsensusDescription) NumMethods

func (DRPCConsensusDescription) NumMethods() int

type DRPCConsensusServer

type DRPCConsensusServer interface {
	LogAdd(context.Context, *LogAddRequest) (*Ok, error)
	RecordAdd(context.Context, *RecordAddRequest) (*RawRecordWithId, error)
	LogWatch(DRPCConsensus_LogWatchStream) error
	LogDelete(context.Context, *LogDeleteRequest) (*Ok, error)
}

type DRPCConsensusUnimplementedServer

type DRPCConsensusUnimplementedServer struct{}

func (*DRPCConsensusUnimplementedServer) LogAdd

func (*DRPCConsensusUnimplementedServer) LogDelete added in v0.3.0

func (*DRPCConsensusUnimplementedServer) LogWatch

func (*DRPCConsensusUnimplementedServer) RecordAdd

type DRPCConsensus_LogAddStream

type DRPCConsensus_LogAddStream interface {
	drpc.Stream
	SendAndClose(*Ok) error
}

type DRPCConsensus_LogDeleteStream added in v0.3.0

type DRPCConsensus_LogDeleteStream interface {
	drpc.Stream
	SendAndClose(*Ok) error
}

type DRPCConsensus_LogWatchClient

type DRPCConsensus_LogWatchClient interface {
	drpc.Stream
	Send(*LogWatchRequest) error
	Recv() (*LogWatchEvent, error)
}

type DRPCConsensus_LogWatchStream

type DRPCConsensus_LogWatchStream interface {
	drpc.Stream
	Send(*LogWatchEvent) error
	Recv() (*LogWatchRequest, error)
}

type DRPCConsensus_RecordAddStream

type DRPCConsensus_RecordAddStream interface {
	drpc.Stream
	SendAndClose(*RawRecordWithId) error
}

type Err

type Err struct {
	Error ErrCodes `protobuf:"varint,1,opt,name=error,proto3,enum=consensusProto.ErrCodes" json:"error,omitempty"`
}

func (*Err) Descriptor

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

func (*Err) GetError

func (m *Err) GetError() ErrCodes

func (*Err) Marshal

func (m *Err) Marshal() (dAtA []byte, err error)

func (*Err) MarshalTo

func (m *Err) MarshalTo(dAtA []byte) (int, error)

func (*Err) MarshalToSizedBuffer

func (m *Err) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Err) ProtoMessage

func (*Err) ProtoMessage()

func (*Err) Reset

func (m *Err) Reset()

func (*Err) Size

func (m *Err) Size() (n int)

func (*Err) String

func (m *Err) String() string

func (*Err) Unmarshal

func (m *Err) Unmarshal(dAtA []byte) error

func (*Err) XXX_DiscardUnknown

func (m *Err) XXX_DiscardUnknown()

func (*Err) XXX_Marshal

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

func (*Err) XXX_MarshalAppend added in v0.5.0

func (m *Err) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*Err) XXX_Merge

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

func (*Err) XXX_Size

func (m *Err) XXX_Size() int

func (*Err) XXX_Unmarshal

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

type ErrCodes

type ErrCodes int32
const (
	ErrCodes_Unexpected     ErrCodes = 0
	ErrCodes_LogExists      ErrCodes = 1
	ErrCodes_LogNotFound    ErrCodes = 2
	ErrCodes_RecordConflict ErrCodes = 3
	ErrCodes_Forbidden      ErrCodes = 4
	ErrCodes_InvalidPayload ErrCodes = 5
	ErrCodes_ErrorOffset    ErrCodes = 500
)

func (ErrCodes) EnumDescriptor

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

func (ErrCodes) String

func (x ErrCodes) String() string

type Log

type Log struct {
	Id      string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Records []*RawRecordWithId `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"`
}

func (*Log) Descriptor

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

func (*Log) GetId

func (m *Log) GetId() string

func (*Log) GetRecords

func (m *Log) GetRecords() []*RawRecordWithId

func (*Log) Marshal

func (m *Log) Marshal() (dAtA []byte, err error)

func (*Log) MarshalTo

func (m *Log) MarshalTo(dAtA []byte) (int, error)

func (*Log) MarshalToSizedBuffer

func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) Size

func (m *Log) Size() (n int)

func (*Log) String

func (m *Log) String() string

func (*Log) Unmarshal

func (m *Log) Unmarshal(dAtA []byte) error

func (*Log) XXX_DiscardUnknown

func (m *Log) XXX_DiscardUnknown()

func (*Log) XXX_Marshal

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

func (*Log) XXX_MarshalAppend added in v0.5.0

func (m *Log) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*Log) XXX_Merge

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

func (*Log) XXX_Size

func (m *Log) XXX_Size() int

func (*Log) XXX_Unmarshal

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

type LogAddRequest

type LogAddRequest struct {
	LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	// first record in the log, consensus node not sign it
	Record *RawRecordWithId `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}

func (*LogAddRequest) Descriptor

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

func (*LogAddRequest) GetLogId added in v0.3.22

func (m *LogAddRequest) GetLogId() string

func (*LogAddRequest) GetRecord added in v0.2.15

func (m *LogAddRequest) GetRecord() *RawRecordWithId

func (*LogAddRequest) Marshal

func (m *LogAddRequest) Marshal() (dAtA []byte, err error)

func (*LogAddRequest) MarshalTo

func (m *LogAddRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogAddRequest) MarshalToSizedBuffer

func (m *LogAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogAddRequest) ProtoMessage

func (*LogAddRequest) ProtoMessage()

func (*LogAddRequest) Reset

func (m *LogAddRequest) Reset()

func (*LogAddRequest) Size

func (m *LogAddRequest) Size() (n int)

func (*LogAddRequest) String

func (m *LogAddRequest) String() string

func (*LogAddRequest) Unmarshal

func (m *LogAddRequest) Unmarshal(dAtA []byte) error

func (*LogAddRequest) XXX_DiscardUnknown

func (m *LogAddRequest) XXX_DiscardUnknown()

func (*LogAddRequest) XXX_Marshal

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

func (*LogAddRequest) XXX_MarshalAppend added in v0.5.0

func (m *LogAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogAddRequest) XXX_Merge

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

func (*LogAddRequest) XXX_Size

func (m *LogAddRequest) XXX_Size() int

func (*LogAddRequest) XXX_Unmarshal

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

type LogDeleteRequest added in v0.3.0

type LogDeleteRequest struct {
	LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
}

func (*LogDeleteRequest) Descriptor added in v0.3.0

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

func (*LogDeleteRequest) GetLogId added in v0.3.0

func (m *LogDeleteRequest) GetLogId() string

func (*LogDeleteRequest) Marshal added in v0.3.0

func (m *LogDeleteRequest) Marshal() (dAtA []byte, err error)

func (*LogDeleteRequest) MarshalTo added in v0.3.0

func (m *LogDeleteRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogDeleteRequest) MarshalToSizedBuffer added in v0.3.0

func (m *LogDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogDeleteRequest) ProtoMessage added in v0.3.0

func (*LogDeleteRequest) ProtoMessage()

func (*LogDeleteRequest) Reset added in v0.3.0

func (m *LogDeleteRequest) Reset()

func (*LogDeleteRequest) Size added in v0.3.0

func (m *LogDeleteRequest) Size() (n int)

func (*LogDeleteRequest) String added in v0.3.0

func (m *LogDeleteRequest) String() string

func (*LogDeleteRequest) Unmarshal added in v0.3.0

func (m *LogDeleteRequest) Unmarshal(dAtA []byte) error

func (*LogDeleteRequest) XXX_DiscardUnknown added in v0.3.0

func (m *LogDeleteRequest) XXX_DiscardUnknown()

func (*LogDeleteRequest) XXX_Marshal added in v0.3.0

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

func (*LogDeleteRequest) XXX_MarshalAppend added in v0.5.0

func (m *LogDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogDeleteRequest) XXX_Merge added in v0.3.0

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

func (*LogDeleteRequest) XXX_Size added in v0.3.0

func (m *LogDeleteRequest) XXX_Size() int

func (*LogDeleteRequest) XXX_Unmarshal added in v0.3.0

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

type LogFullSyncRequest added in v0.2.15

type LogFullSyncRequest struct {
	Head    string             `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}

LogFullSyncRequest is a message sent when consensus log needs full sync

func (*LogFullSyncRequest) Descriptor added in v0.2.15

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

func (*LogFullSyncRequest) GetHead added in v0.2.15

func (m *LogFullSyncRequest) GetHead() string

func (*LogFullSyncRequest) GetRecords added in v0.2.15

func (m *LogFullSyncRequest) GetRecords() []*RawRecordWithId

func (*LogFullSyncRequest) Marshal added in v0.2.15

func (m *LogFullSyncRequest) Marshal() (dAtA []byte, err error)

func (*LogFullSyncRequest) MarshalTo added in v0.2.15

func (m *LogFullSyncRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogFullSyncRequest) MarshalToSizedBuffer added in v0.2.15

func (m *LogFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogFullSyncRequest) ProtoMessage added in v0.2.15

func (*LogFullSyncRequest) ProtoMessage()

func (*LogFullSyncRequest) Reset added in v0.2.15

func (m *LogFullSyncRequest) Reset()

func (*LogFullSyncRequest) Size added in v0.2.15

func (m *LogFullSyncRequest) Size() (n int)

func (*LogFullSyncRequest) String added in v0.2.15

func (m *LogFullSyncRequest) String() string

func (*LogFullSyncRequest) Unmarshal added in v0.2.15

func (m *LogFullSyncRequest) Unmarshal(dAtA []byte) error

func (*LogFullSyncRequest) XXX_DiscardUnknown added in v0.2.15

func (m *LogFullSyncRequest) XXX_DiscardUnknown()

func (*LogFullSyncRequest) XXX_Marshal added in v0.2.15

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

func (*LogFullSyncRequest) XXX_MarshalAppend added in v0.5.0

func (m *LogFullSyncRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogFullSyncRequest) XXX_Merge added in v0.2.15

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

func (*LogFullSyncRequest) XXX_Size added in v0.2.15

func (m *LogFullSyncRequest) XXX_Size() int

func (*LogFullSyncRequest) XXX_Unmarshal added in v0.2.15

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

type LogFullSyncResponse added in v0.2.15

type LogFullSyncResponse struct {
	Head    string             `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}

LogFullSyncResponse is a message sent as a response for a specific full sync

func (*LogFullSyncResponse) Descriptor added in v0.2.15

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

func (*LogFullSyncResponse) GetHead added in v0.2.15

func (m *LogFullSyncResponse) GetHead() string

func (*LogFullSyncResponse) GetRecords added in v0.2.15

func (m *LogFullSyncResponse) GetRecords() []*RawRecordWithId

func (*LogFullSyncResponse) Marshal added in v0.2.15

func (m *LogFullSyncResponse) Marshal() (dAtA []byte, err error)

func (*LogFullSyncResponse) MarshalTo added in v0.2.15

func (m *LogFullSyncResponse) MarshalTo(dAtA []byte) (int, error)

func (*LogFullSyncResponse) MarshalToSizedBuffer added in v0.2.15

func (m *LogFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogFullSyncResponse) ProtoMessage added in v0.2.15

func (*LogFullSyncResponse) ProtoMessage()

func (*LogFullSyncResponse) Reset added in v0.2.15

func (m *LogFullSyncResponse) Reset()

func (*LogFullSyncResponse) Size added in v0.2.15

func (m *LogFullSyncResponse) Size() (n int)

func (*LogFullSyncResponse) String added in v0.2.15

func (m *LogFullSyncResponse) String() string

func (*LogFullSyncResponse) Unmarshal added in v0.2.15

func (m *LogFullSyncResponse) Unmarshal(dAtA []byte) error

func (*LogFullSyncResponse) XXX_DiscardUnknown added in v0.2.15

func (m *LogFullSyncResponse) XXX_DiscardUnknown()

func (*LogFullSyncResponse) XXX_Marshal added in v0.2.15

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

func (*LogFullSyncResponse) XXX_MarshalAppend added in v0.5.0

func (m *LogFullSyncResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogFullSyncResponse) XXX_Merge added in v0.2.15

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

func (*LogFullSyncResponse) XXX_Size added in v0.2.15

func (m *LogFullSyncResponse) XXX_Size() int

func (*LogFullSyncResponse) XXX_Unmarshal added in v0.2.15

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

type LogHeadUpdate added in v0.2.15

type LogHeadUpdate struct {
	Head    string             `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
}

LogHeadUpdate is a message sent on consensus log head update

func (*LogHeadUpdate) Descriptor added in v0.2.15

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

func (*LogHeadUpdate) GetHead added in v0.2.15

func (m *LogHeadUpdate) GetHead() string

func (*LogHeadUpdate) GetRecords added in v0.2.15

func (m *LogHeadUpdate) GetRecords() []*RawRecordWithId

func (*LogHeadUpdate) Marshal added in v0.2.15

func (m *LogHeadUpdate) Marshal() (dAtA []byte, err error)

func (*LogHeadUpdate) MarshalTo added in v0.2.15

func (m *LogHeadUpdate) MarshalTo(dAtA []byte) (int, error)

func (*LogHeadUpdate) MarshalToSizedBuffer added in v0.2.15

func (m *LogHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogHeadUpdate) ProtoMessage added in v0.2.15

func (*LogHeadUpdate) ProtoMessage()

func (*LogHeadUpdate) Reset added in v0.2.15

func (m *LogHeadUpdate) Reset()

func (*LogHeadUpdate) Size added in v0.2.15

func (m *LogHeadUpdate) Size() (n int)

func (*LogHeadUpdate) String added in v0.2.15

func (m *LogHeadUpdate) String() string

func (*LogHeadUpdate) Unmarshal added in v0.2.15

func (m *LogHeadUpdate) Unmarshal(dAtA []byte) error

func (*LogHeadUpdate) XXX_DiscardUnknown added in v0.2.15

func (m *LogHeadUpdate) XXX_DiscardUnknown()

func (*LogHeadUpdate) XXX_Marshal added in v0.2.15

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

func (*LogHeadUpdate) XXX_MarshalAppend added in v0.5.0

func (m *LogHeadUpdate) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogHeadUpdate) XXX_Merge added in v0.2.15

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

func (*LogHeadUpdate) XXX_Size added in v0.2.15

func (m *LogHeadUpdate) XXX_Size() int

func (*LogHeadUpdate) XXX_Unmarshal added in v0.2.15

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

type LogSyncContentValue added in v0.2.15

type LogSyncContentValue struct {
	// Types that are valid to be assigned to Value:
	//
	//	*LogSyncContentValue_HeadUpdate
	//	*LogSyncContentValue_FullSyncRequest
	//	*LogSyncContentValue_FullSyncResponse
	Value isLogSyncContentValueValue `protobuf_oneof:"value"`
}

LogSyncContentValue provides different types for log sync

func (*LogSyncContentValue) Descriptor added in v0.2.15

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

func (*LogSyncContentValue) GetFullSyncRequest added in v0.2.15

func (m *LogSyncContentValue) GetFullSyncRequest() *LogFullSyncRequest

func (*LogSyncContentValue) GetFullSyncResponse added in v0.2.15

func (m *LogSyncContentValue) GetFullSyncResponse() *LogFullSyncResponse

func (*LogSyncContentValue) GetHeadUpdate added in v0.2.15

func (m *LogSyncContentValue) GetHeadUpdate() *LogHeadUpdate

func (*LogSyncContentValue) GetValue added in v0.2.15

func (m *LogSyncContentValue) GetValue() isLogSyncContentValueValue

func (*LogSyncContentValue) Marshal added in v0.2.15

func (m *LogSyncContentValue) Marshal() (dAtA []byte, err error)

func (*LogSyncContentValue) MarshalTo added in v0.2.15

func (m *LogSyncContentValue) MarshalTo(dAtA []byte) (int, error)

func (*LogSyncContentValue) MarshalToSizedBuffer added in v0.2.15

func (m *LogSyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSyncContentValue) ProtoMessage added in v0.2.15

func (*LogSyncContentValue) ProtoMessage()

func (*LogSyncContentValue) Reset added in v0.2.15

func (m *LogSyncContentValue) Reset()

func (*LogSyncContentValue) Size added in v0.2.15

func (m *LogSyncContentValue) Size() (n int)

func (*LogSyncContentValue) String added in v0.2.15

func (m *LogSyncContentValue) String() string

func (*LogSyncContentValue) Unmarshal added in v0.2.15

func (m *LogSyncContentValue) Unmarshal(dAtA []byte) error

func (*LogSyncContentValue) XXX_DiscardUnknown added in v0.2.15

func (m *LogSyncContentValue) XXX_DiscardUnknown()

func (*LogSyncContentValue) XXX_Marshal added in v0.2.15

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

func (*LogSyncContentValue) XXX_MarshalAppend added in v0.5.0

func (m *LogSyncContentValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogSyncContentValue) XXX_Merge added in v0.2.15

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

func (*LogSyncContentValue) XXX_OneofWrappers added in v0.2.15

func (*LogSyncContentValue) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*LogSyncContentValue) XXX_Size added in v0.2.15

func (m *LogSyncContentValue) XXX_Size() int

func (*LogSyncContentValue) XXX_Unmarshal added in v0.2.15

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

type LogSyncContentValue_FullSyncRequest added in v0.2.15

type LogSyncContentValue_FullSyncRequest struct {
	FullSyncRequest *LogFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"`
}

func (*LogSyncContentValue_FullSyncRequest) MarshalTo added in v0.2.15

func (m *LogSyncContentValue_FullSyncRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogSyncContentValue_FullSyncRequest) MarshalToSizedBuffer added in v0.2.15

func (m *LogSyncContentValue_FullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSyncContentValue_FullSyncRequest) Size added in v0.2.15

type LogSyncContentValue_FullSyncResponse added in v0.2.15

type LogSyncContentValue_FullSyncResponse struct {
	FullSyncResponse *LogFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"`
}

func (*LogSyncContentValue_FullSyncResponse) MarshalTo added in v0.2.15

func (m *LogSyncContentValue_FullSyncResponse) MarshalTo(dAtA []byte) (int, error)

func (*LogSyncContentValue_FullSyncResponse) MarshalToSizedBuffer added in v0.2.15

func (m *LogSyncContentValue_FullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSyncContentValue_FullSyncResponse) Size added in v0.2.15

type LogSyncContentValue_HeadUpdate added in v0.2.15

type LogSyncContentValue_HeadUpdate struct {
	HeadUpdate *LogHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"`
}

func (*LogSyncContentValue_HeadUpdate) MarshalTo added in v0.2.15

func (m *LogSyncContentValue_HeadUpdate) MarshalTo(dAtA []byte) (int, error)

func (*LogSyncContentValue_HeadUpdate) MarshalToSizedBuffer added in v0.2.15

func (m *LogSyncContentValue_HeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSyncContentValue_HeadUpdate) Size added in v0.2.15

func (m *LogSyncContentValue_HeadUpdate) Size() (n int)

type LogSyncMessage added in v0.2.15

type LogSyncMessage struct {
	Id      string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Payload []byte               `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Content *LogSyncContentValue `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}

LogSyncMessage is a message sent when we are syncing logs

func WrapFullRequest added in v0.2.15

func WrapFullRequest(request *LogFullSyncRequest, rootRecord *RawRecordWithId) *LogSyncMessage

func WrapFullResponse added in v0.2.15

func WrapFullResponse(response *LogFullSyncResponse, rootRecord *RawRecordWithId) *LogSyncMessage

func WrapHeadUpdate added in v0.2.15

func WrapHeadUpdate(update *LogHeadUpdate, rootRecord *RawRecordWithId) *LogSyncMessage

func (*LogSyncMessage) Descriptor added in v0.2.15

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

func (*LogSyncMessage) GetContent added in v0.2.15

func (m *LogSyncMessage) GetContent() *LogSyncContentValue

func (*LogSyncMessage) GetId added in v0.2.15

func (m *LogSyncMessage) GetId() string

func (*LogSyncMessage) GetPayload added in v0.2.15

func (m *LogSyncMessage) GetPayload() []byte

func (*LogSyncMessage) Marshal added in v0.2.15

func (m *LogSyncMessage) Marshal() (dAtA []byte, err error)

func (*LogSyncMessage) MarshalTo added in v0.2.15

func (m *LogSyncMessage) MarshalTo(dAtA []byte) (int, error)

func (*LogSyncMessage) MarshalToSizedBuffer added in v0.2.15

func (m *LogSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSyncMessage) ProtoMessage added in v0.2.15

func (*LogSyncMessage) ProtoMessage()

func (*LogSyncMessage) Reset added in v0.2.15

func (m *LogSyncMessage) Reset()

func (*LogSyncMessage) Size added in v0.2.15

func (m *LogSyncMessage) Size() (n int)

func (*LogSyncMessage) String added in v0.2.15

func (m *LogSyncMessage) String() string

func (*LogSyncMessage) Unmarshal added in v0.2.15

func (m *LogSyncMessage) Unmarshal(dAtA []byte) error

func (*LogSyncMessage) XXX_DiscardUnknown added in v0.2.15

func (m *LogSyncMessage) XXX_DiscardUnknown()

func (*LogSyncMessage) XXX_Marshal added in v0.2.15

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

func (*LogSyncMessage) XXX_MarshalAppend added in v0.5.0

func (m *LogSyncMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogSyncMessage) XXX_Merge added in v0.2.15

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

func (*LogSyncMessage) XXX_Size added in v0.2.15

func (m *LogSyncMessage) XXX_Size() int

func (*LogSyncMessage) XXX_Unmarshal added in v0.2.15

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

type LogWatchEvent

type LogWatchEvent struct {
	LogId   string             `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	Error   *Err               `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}

func (*LogWatchEvent) Descriptor

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

func (*LogWatchEvent) GetError

func (m *LogWatchEvent) GetError() *Err

func (*LogWatchEvent) GetLogId

func (m *LogWatchEvent) GetLogId() string

func (*LogWatchEvent) GetRecords

func (m *LogWatchEvent) GetRecords() []*RawRecordWithId

func (*LogWatchEvent) Marshal

func (m *LogWatchEvent) Marshal() (dAtA []byte, err error)

func (*LogWatchEvent) MarshalTo

func (m *LogWatchEvent) MarshalTo(dAtA []byte) (int, error)

func (*LogWatchEvent) MarshalToSizedBuffer

func (m *LogWatchEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogWatchEvent) ProtoMessage

func (*LogWatchEvent) ProtoMessage()

func (*LogWatchEvent) Reset

func (m *LogWatchEvent) Reset()

func (*LogWatchEvent) Size

func (m *LogWatchEvent) Size() (n int)

func (*LogWatchEvent) String

func (m *LogWatchEvent) String() string

func (*LogWatchEvent) Unmarshal

func (m *LogWatchEvent) Unmarshal(dAtA []byte) error

func (*LogWatchEvent) XXX_DiscardUnknown

func (m *LogWatchEvent) XXX_DiscardUnknown()

func (*LogWatchEvent) XXX_Marshal

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

func (*LogWatchEvent) XXX_MarshalAppend added in v0.5.0

func (m *LogWatchEvent) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogWatchEvent) XXX_Merge

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

func (*LogWatchEvent) XXX_Size

func (m *LogWatchEvent) XXX_Size() int

func (*LogWatchEvent) XXX_Unmarshal

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

type LogWatchRequest

type LogWatchRequest struct {
	WatchIds   []string `protobuf:"bytes,1,rep,name=watchIds,proto3" json:"watchIds,omitempty"`
	UnwatchIds []string `protobuf:"bytes,2,rep,name=unwatchIds,proto3" json:"unwatchIds,omitempty"`
}

func (*LogWatchRequest) Descriptor

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

func (*LogWatchRequest) GetUnwatchIds

func (m *LogWatchRequest) GetUnwatchIds() []string

func (*LogWatchRequest) GetWatchIds

func (m *LogWatchRequest) GetWatchIds() []string

func (*LogWatchRequest) Marshal

func (m *LogWatchRequest) Marshal() (dAtA []byte, err error)

func (*LogWatchRequest) MarshalTo

func (m *LogWatchRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogWatchRequest) MarshalToSizedBuffer

func (m *LogWatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogWatchRequest) ProtoMessage

func (*LogWatchRequest) ProtoMessage()

func (*LogWatchRequest) Reset

func (m *LogWatchRequest) Reset()

func (*LogWatchRequest) Size

func (m *LogWatchRequest) Size() (n int)

func (*LogWatchRequest) String

func (m *LogWatchRequest) String() string

func (*LogWatchRequest) Unmarshal

func (m *LogWatchRequest) Unmarshal(dAtA []byte) error

func (*LogWatchRequest) XXX_DiscardUnknown

func (m *LogWatchRequest) XXX_DiscardUnknown()

func (*LogWatchRequest) XXX_Marshal

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

func (*LogWatchRequest) XXX_MarshalAppend added in v0.5.0

func (m *LogWatchRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*LogWatchRequest) XXX_Merge

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

func (*LogWatchRequest) XXX_Size

func (m *LogWatchRequest) XXX_Size() int

func (*LogWatchRequest) XXX_Unmarshal

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

type Ok

type Ok struct {
}

func (*Ok) Descriptor

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

func (*Ok) Marshal

func (m *Ok) Marshal() (dAtA []byte, err error)

func (*Ok) MarshalTo

func (m *Ok) MarshalTo(dAtA []byte) (int, error)

func (*Ok) MarshalToSizedBuffer

func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ok) ProtoMessage

func (*Ok) ProtoMessage()

func (*Ok) Reset

func (m *Ok) Reset()

func (*Ok) Size

func (m *Ok) Size() (n int)

func (*Ok) String

func (m *Ok) String() string

func (*Ok) Unmarshal

func (m *Ok) Unmarshal(dAtA []byte) error

func (*Ok) XXX_DiscardUnknown

func (m *Ok) XXX_DiscardUnknown()

func (*Ok) XXX_Marshal

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

func (*Ok) XXX_MarshalAppend added in v0.5.0

func (m *Ok) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*Ok) XXX_Merge

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

func (*Ok) XXX_Size

func (m *Ok) XXX_Size() int

func (*Ok) XXX_Unmarshal

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

type RawRecord

type RawRecord struct {
	Payload           []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Signature         []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	AcceptorIdentity  []byte `protobuf:"bytes,3,opt,name=acceptorIdentity,proto3" json:"acceptorIdentity,omitempty"`
	AcceptorSignature []byte `protobuf:"bytes,4,opt,name=acceptorSignature,proto3" json:"acceptorSignature,omitempty"`
	AcceptorTimestamp int64  `protobuf:"varint,5,opt,name=acceptorTimestamp,proto3" json:"acceptorTimestamp,omitempty"`
}

RawRecord is a proto message containing the payload in bytes, signature of the account who added it and signature of the acceptor

func (*RawRecord) Descriptor

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

func (*RawRecord) GetAcceptorIdentity

func (m *RawRecord) GetAcceptorIdentity() []byte

func (*RawRecord) GetAcceptorSignature

func (m *RawRecord) GetAcceptorSignature() []byte

func (*RawRecord) GetAcceptorTimestamp added in v0.2.17

func (m *RawRecord) GetAcceptorTimestamp() int64

func (*RawRecord) GetPayload

func (m *RawRecord) GetPayload() []byte

func (*RawRecord) GetSignature

func (m *RawRecord) GetSignature() []byte

func (*RawRecord) Marshal

func (m *RawRecord) Marshal() (dAtA []byte, err error)

func (*RawRecord) MarshalTo

func (m *RawRecord) MarshalTo(dAtA []byte) (int, error)

func (*RawRecord) MarshalToSizedBuffer

func (m *RawRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RawRecord) ProtoMessage

func (*RawRecord) ProtoMessage()

func (*RawRecord) Reset

func (m *RawRecord) Reset()

func (*RawRecord) Size

func (m *RawRecord) Size() (n int)

func (*RawRecord) String

func (m *RawRecord) String() string

func (*RawRecord) Unmarshal

func (m *RawRecord) Unmarshal(dAtA []byte) error

func (*RawRecord) XXX_DiscardUnknown

func (m *RawRecord) XXX_DiscardUnknown()

func (*RawRecord) XXX_Marshal

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

func (*RawRecord) XXX_MarshalAppend added in v0.5.0

func (m *RawRecord) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*RawRecord) XXX_Merge

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

func (*RawRecord) XXX_Size

func (m *RawRecord) XXX_Size() int

func (*RawRecord) XXX_Unmarshal

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

type RawRecordWithId

type RawRecordWithId struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Id      string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}

RawRecordWithId is a raw record and the id for convenience

func (*RawRecordWithId) Descriptor

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

func (*RawRecordWithId) GetId

func (m *RawRecordWithId) GetId() string

func (*RawRecordWithId) GetPayload

func (m *RawRecordWithId) GetPayload() []byte

func (*RawRecordWithId) Marshal

func (m *RawRecordWithId) Marshal() (dAtA []byte, err error)

func (*RawRecordWithId) MarshalTo

func (m *RawRecordWithId) MarshalTo(dAtA []byte) (int, error)

func (*RawRecordWithId) MarshalToSizedBuffer

func (m *RawRecordWithId) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RawRecordWithId) ProtoMessage

func (*RawRecordWithId) ProtoMessage()

func (*RawRecordWithId) Reset

func (m *RawRecordWithId) Reset()

func (*RawRecordWithId) Size

func (m *RawRecordWithId) Size() (n int)

func (*RawRecordWithId) String

func (m *RawRecordWithId) String() string

func (*RawRecordWithId) Unmarshal

func (m *RawRecordWithId) Unmarshal(dAtA []byte) error

func (*RawRecordWithId) XXX_DiscardUnknown

func (m *RawRecordWithId) XXX_DiscardUnknown()

func (*RawRecordWithId) XXX_Marshal

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

func (*RawRecordWithId) XXX_MarshalAppend added in v0.5.0

func (m *RawRecordWithId) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*RawRecordWithId) XXX_Merge

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

func (*RawRecordWithId) XXX_Size

func (m *RawRecordWithId) XXX_Size() int

func (*RawRecordWithId) XXX_Unmarshal

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

type Record

type Record struct {
	PrevId    string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"`
	Identity  []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	Data      []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

Record is a record containing a data

func (*Record) Descriptor

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

func (*Record) GetData

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

func (*Record) GetIdentity

func (m *Record) GetIdentity() []byte

func (*Record) GetPrevId

func (m *Record) GetPrevId() string

func (*Record) GetTimestamp

func (m *Record) GetTimestamp() int64

func (*Record) Marshal

func (m *Record) Marshal() (dAtA []byte, err error)

func (*Record) MarshalTo

func (m *Record) MarshalTo(dAtA []byte) (int, error)

func (*Record) MarshalToSizedBuffer

func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) Size

func (m *Record) Size() (n int)

func (*Record) String

func (m *Record) String() string

func (*Record) Unmarshal

func (m *Record) Unmarshal(dAtA []byte) error

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

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

func (*Record) XXX_MarshalAppend added in v0.5.0

func (m *Record) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*Record) XXX_Merge

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

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

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

type RecordAddRequest

type RecordAddRequest struct {
	LogId  string     `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	Record *RawRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
}

func (*RecordAddRequest) Descriptor

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

func (*RecordAddRequest) GetLogId

func (m *RecordAddRequest) GetLogId() string

func (*RecordAddRequest) GetRecord

func (m *RecordAddRequest) GetRecord() *RawRecord

func (*RecordAddRequest) Marshal

func (m *RecordAddRequest) Marshal() (dAtA []byte, err error)

func (*RecordAddRequest) MarshalTo

func (m *RecordAddRequest) MarshalTo(dAtA []byte) (int, error)

func (*RecordAddRequest) MarshalToSizedBuffer

func (m *RecordAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RecordAddRequest) ProtoMessage

func (*RecordAddRequest) ProtoMessage()

func (*RecordAddRequest) Reset

func (m *RecordAddRequest) Reset()

func (*RecordAddRequest) Size

func (m *RecordAddRequest) Size() (n int)

func (*RecordAddRequest) String

func (m *RecordAddRequest) String() string

func (*RecordAddRequest) Unmarshal

func (m *RecordAddRequest) Unmarshal(dAtA []byte) error

func (*RecordAddRequest) XXX_DiscardUnknown

func (m *RecordAddRequest) XXX_DiscardUnknown()

func (*RecordAddRequest) XXX_Marshal

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

func (*RecordAddRequest) XXX_MarshalAppend added in v0.5.0

func (m *RecordAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error)

func (*RecordAddRequest) XXX_Merge

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

func (*RecordAddRequest) XXX_Size

func (m *RecordAddRequest) XXX_Size() int

func (*RecordAddRequest) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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