pb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEchoServer

func RegisterEchoServer(s *grpc.Server, srv EchoServer)

func RegisterPrepareServer

func RegisterPrepareServer(s *grpc.Server, srv PrepareServer)

func RegisterReadyServer

func RegisterReadyServer(s *grpc.Server, srv ReadyServer)

Types

type EchoClient

type EchoClient interface {
	Echo(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*EchoResponse, error)
}

EchoClient is the client API for Echo service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewEchoClient

func NewEchoClient(cc *grpc.ClientConn) EchoClient

type EchoResponse

type EchoResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EchoResponse) Descriptor

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

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) Reset

func (m *EchoResponse) Reset()

func (*EchoResponse) String

func (m *EchoResponse) String() string

func (*EchoResponse) XXX_DiscardUnknown

func (m *EchoResponse) XXX_DiscardUnknown()

func (*EchoResponse) XXX_Marshal

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

func (*EchoResponse) XXX_Merge

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

func (*EchoResponse) XXX_Size

func (m *EchoResponse) XXX_Size() int

func (*EchoResponse) XXX_Unmarshal

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

type EchoServer

type EchoServer interface {
	Echo(context.Context, *Payload) (*EchoResponse, error)
}

EchoServer is the server API for Echo service.

type MerkleProof

type MerkleProof struct {
	// The root of Merkle tree, it's a SHA256 hash.
	Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
	// the proof pairs from bottom up.
	ProofPairs           []*ProofPair `protobuf:"bytes,2,rep,name=proof_pairs,json=proofPairs,proto3" json:"proof_pairs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

A merkle proof is a data structure that proves a content is stored in the Merkle tree.

func (*MerkleProof) Descriptor

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

func (*MerkleProof) GetProofPairs

func (m *MerkleProof) GetProofPairs() []*ProofPair

func (*MerkleProof) GetRoot

func (m *MerkleProof) GetRoot() []byte

func (*MerkleProof) ProtoMessage

func (*MerkleProof) ProtoMessage()

func (*MerkleProof) Reset

func (m *MerkleProof) Reset()

func (*MerkleProof) String

func (m *MerkleProof) String() string

func (*MerkleProof) XXX_DiscardUnknown

func (m *MerkleProof) XXX_DiscardUnknown()

func (*MerkleProof) XXX_Marshal

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

func (*MerkleProof) XXX_Merge

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

func (*MerkleProof) XXX_Size

func (m *MerkleProof) XXX_Size() int

func (*MerkleProof) XXX_Unmarshal

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

type Payload

type Payload struct {
	MerkleProof          *MerkleProof `protobuf:"bytes,1,opt,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"`
	Data                 []byte       `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Payload) Descriptor

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

func (*Payload) GetData

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

func (*Payload) GetMerkleProof

func (m *Payload) GetMerkleProof() *MerkleProof

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

func (*Payload) XXX_DiscardUnknown

func (m *Payload) XXX_DiscardUnknown()

func (*Payload) XXX_Marshal

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

func (*Payload) XXX_Merge

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

func (*Payload) XXX_Size

func (m *Payload) XXX_Size() int

func (*Payload) XXX_Unmarshal

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

type PrepareClient

type PrepareClient interface {
	Prepare(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*PrepareResponse, error)
}

PrepareClient is the client API for Prepare service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPrepareClient

func NewPrepareClient(cc *grpc.ClientConn) PrepareClient

type PrepareResponse

type PrepareResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PrepareResponse) Descriptor

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

func (*PrepareResponse) ProtoMessage

func (*PrepareResponse) ProtoMessage()

func (*PrepareResponse) Reset

func (m *PrepareResponse) Reset()

func (*PrepareResponse) String

func (m *PrepareResponse) String() string

func (*PrepareResponse) XXX_DiscardUnknown

func (m *PrepareResponse) XXX_DiscardUnknown()

func (*PrepareResponse) XXX_Marshal

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

func (*PrepareResponse) XXX_Merge

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

func (*PrepareResponse) XXX_Size

func (m *PrepareResponse) XXX_Size() int

func (*PrepareResponse) XXX_Unmarshal

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

type PrepareServer

type PrepareServer interface {
	Prepare(context.Context, *Payload) (*PrepareResponse, error)
}

PrepareServer is the server API for Prepare service.

type ProofPair

type ProofPair struct {
	// primary is the content's ancestor node hash value.
	Primary []byte `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"`
	// secondary is the helper of primary, in order to get the parent node's hash.
	Secondary            []byte   `protobuf:"bytes,2,opt,name=secondary,proto3" json:"secondary,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ProofPair defines 2 hash values in the same layer of Merkle tree, that jointly calculate the parent. For example: * (parent primary) | \ * * secondary primary

func (*ProofPair) Descriptor

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

func (*ProofPair) GetPrimary

func (m *ProofPair) GetPrimary() []byte

func (*ProofPair) GetSecondary

func (m *ProofPair) GetSecondary() []byte

func (*ProofPair) ProtoMessage

func (*ProofPair) ProtoMessage()

func (*ProofPair) Reset

func (m *ProofPair) Reset()

func (*ProofPair) String

func (m *ProofPair) String() string

func (*ProofPair) XXX_DiscardUnknown

func (m *ProofPair) XXX_DiscardUnknown()

func (*ProofPair) XXX_Marshal

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

func (*ProofPair) XXX_Merge

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

func (*ProofPair) XXX_Size

func (m *ProofPair) XXX_Size() int

func (*ProofPair) XXX_Unmarshal

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

type ReadyClient

type ReadyClient interface {
	Ready(ctx context.Context, in *ReadyRequest, opts ...grpc.CallOption) (*ReadyResponse, error)
}

ReadyClient is the client API for Ready service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReadyClient

func NewReadyClient(cc *grpc.ClientConn) ReadyClient

type ReadyRequest

type ReadyRequest struct {
	MerkleRoot           []byte   `protobuf:"bytes,1,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadyRequest) Descriptor

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

func (*ReadyRequest) GetMerkleRoot

func (m *ReadyRequest) GetMerkleRoot() []byte

func (*ReadyRequest) ProtoMessage

func (*ReadyRequest) ProtoMessage()

func (*ReadyRequest) Reset

func (m *ReadyRequest) Reset()

func (*ReadyRequest) String

func (m *ReadyRequest) String() string

func (*ReadyRequest) XXX_DiscardUnknown

func (m *ReadyRequest) XXX_DiscardUnknown()

func (*ReadyRequest) XXX_Marshal

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

func (*ReadyRequest) XXX_Merge

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

func (*ReadyRequest) XXX_Size

func (m *ReadyRequest) XXX_Size() int

func (*ReadyRequest) XXX_Unmarshal

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

type ReadyResponse

type ReadyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadyResponse) Descriptor

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

func (*ReadyResponse) ProtoMessage

func (*ReadyResponse) ProtoMessage()

func (*ReadyResponse) Reset

func (m *ReadyResponse) Reset()

func (*ReadyResponse) String

func (m *ReadyResponse) String() string

func (*ReadyResponse) XXX_DiscardUnknown

func (m *ReadyResponse) XXX_DiscardUnknown()

func (*ReadyResponse) XXX_Marshal

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

func (*ReadyResponse) XXX_Merge

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

func (*ReadyResponse) XXX_Size

func (m *ReadyResponse) XXX_Size() int

func (*ReadyResponse) XXX_Unmarshal

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

type ReadyServer

type ReadyServer interface {
	Ready(context.Context, *ReadyRequest) (*ReadyResponse, error)
}

ReadyServer is the server API for Ready service.

type UnimplementedEchoServer

type UnimplementedEchoServer struct {
}

UnimplementedEchoServer can be embedded to have forward compatible implementations.

func (*UnimplementedEchoServer) Echo

type UnimplementedPrepareServer

type UnimplementedPrepareServer struct {
}

UnimplementedPrepareServer can be embedded to have forward compatible implementations.

func (*UnimplementedPrepareServer) Prepare

type UnimplementedReadyServer

type UnimplementedReadyServer struct {
}

UnimplementedReadyServer can be embedded to have forward compatible implementations.

func (*UnimplementedReadyServer) Ready

Jump to

Keyboard shortcuts

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