accumulator

package
v0.0.0-...-08e4530 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Accumulator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "accumulator.Accumulator",
	HandlerType: (*AccumulatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Append",
			Handler:    _Accumulator_Append_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Accumulator_Get_Handler,
		},
		{
			MethodName: "Search",
			Handler:    _Accumulator_Search_Handler,
		},
		{
			MethodName: "GetDigest",
			Handler:    _Accumulator_GetDigest_Handler,
		},
		{
			MethodName: "GetProofByID",
			Handler:    _Accumulator_GetProofByID_Handler,
		},
		{
			MethodName: "GetProofByHash",
			Handler:    _Accumulator_GetProofByHash_Handler,
		},
		{
			MethodName: "GetOldProofByID",
			Handler:    _Accumulator_GetOldProofByID_Handler,
		},
		{
			MethodName: "GetOldProofByHash",
			Handler:    _Accumulator_GetOldProofByHash_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "accumulator.proto",
}

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

View Source
var File_accumulator_proto protoreflect.FileDescriptor

Functions

func RegisterAccumulatorServer

func RegisterAccumulatorServer(s grpc.ServiceRegistrar, srv AccumulatorServer)

Types

type AccumulatorClient

type AccumulatorClient interface {
	// Append a new hash
	Append(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*ID, error)
	Get(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Hash, error)
	Search(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*ID, error)
	GetDigest(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Hash, error)
	GetProofByID(ctx context.Context, in *ID, opts ...grpc.CallOption) (*HashProof, error)
	GetProofByHash(ctx context.Context, in *Hash, opts ...grpc.CallOption) (*HashProof, error)
	GetOldProofByID(ctx context.Context, in *GetOldProofByIDRequest, opts ...grpc.CallOption) (*HashProof, error)
	GetOldProofByHash(ctx context.Context, in *GetOldProofByHashRequest, opts ...grpc.CallOption) (*HashProof, error)
}

AccumulatorClient is the client API for Accumulator 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.

type AccumulatorServer

type AccumulatorServer interface {
	// Append a new hash
	Append(context.Context, *Hash) (*ID, error)
	Get(context.Context, *ID) (*Hash, error)
	Search(context.Context, *Hash) (*ID, error)
	GetDigest(context.Context, *Empty) (*Hash, error)
	GetProofByID(context.Context, *ID) (*HashProof, error)
	GetProofByHash(context.Context, *Hash) (*HashProof, error)
	GetOldProofByID(context.Context, *GetOldProofByIDRequest) (*HashProof, error)
	GetOldProofByHash(context.Context, *GetOldProofByHashRequest) (*HashProof, error)
	// contains filtered or unexported methods
}

AccumulatorServer is the server API for Accumulator service. All implementations must embed UnimplementedAccumulatorServer for forward compatibility

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetOldProofByHashRequest

type GetOldProofByHashRequest struct {
	Hash   []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOldProofByHashRequest) Descriptor deprecated

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

Deprecated: Use GetOldProofByHashRequest.ProtoReflect.Descriptor instead.

func (*GetOldProofByHashRequest) GetDigest

func (x *GetOldProofByHashRequest) GetDigest() []byte

func (*GetOldProofByHashRequest) GetHash

func (x *GetOldProofByHashRequest) GetHash() []byte

func (*GetOldProofByHashRequest) ProtoMessage

func (*GetOldProofByHashRequest) ProtoMessage()

func (*GetOldProofByHashRequest) ProtoReflect

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

func (*GetOldProofByHashRequest) Reset

func (x *GetOldProofByHashRequest) Reset()

func (*GetOldProofByHashRequest) String

func (x *GetOldProofByHashRequest) String() string

type GetOldProofByIDRequest

type GetOldProofByIDRequest struct {
	Id     uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOldProofByIDRequest) Descriptor deprecated

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

Deprecated: Use GetOldProofByIDRequest.ProtoReflect.Descriptor instead.

func (*GetOldProofByIDRequest) GetDigest

func (x *GetOldProofByIDRequest) GetDigest() []byte

func (*GetOldProofByIDRequest) GetId

func (x *GetOldProofByIDRequest) GetId() uint64

func (*GetOldProofByIDRequest) ProtoMessage

func (*GetOldProofByIDRequest) ProtoMessage()

func (*GetOldProofByIDRequest) ProtoReflect

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

func (*GetOldProofByIDRequest) Reset

func (x *GetOldProofByIDRequest) Reset()

func (*GetOldProofByIDRequest) String

func (x *GetOldProofByIDRequest) String() string

type Hash

type Hash struct {
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*Hash) Descriptor deprecated

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

Deprecated: Use Hash.ProtoReflect.Descriptor instead.

func (*Hash) GetHash

func (x *Hash) GetHash() []byte

func (*Hash) ProtoMessage

func (*Hash) ProtoMessage()

func (*Hash) ProtoReflect

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

func (*Hash) Reset

func (x *Hash) Reset()

func (*Hash) String

func (x *Hash) String() string

type HashProof

type HashProof struct {
	Hash   []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Digest []byte   `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
	Path   [][]byte `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*HashProof) Descriptor deprecated

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

Deprecated: Use HashProof.ProtoReflect.Descriptor instead.

func (*HashProof) GetDigest

func (x *HashProof) GetDigest() []byte

func (*HashProof) GetHash

func (x *HashProof) GetHash() []byte

func (*HashProof) GetPath

func (x *HashProof) GetPath() [][]byte

func (*HashProof) ProtoMessage

func (*HashProof) ProtoMessage()

func (*HashProof) ProtoReflect

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

func (*HashProof) Reset

func (x *HashProof) Reset()

func (*HashProof) String

func (x *HashProof) String() string

type ID

type ID struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ID) Descriptor deprecated

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

Deprecated: Use ID.ProtoReflect.Descriptor instead.

func (*ID) GetId

func (x *ID) GetId() uint64

func (*ID) ProtoMessage

func (*ID) ProtoMessage()

func (*ID) ProtoReflect

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

func (*ID) Reset

func (x *ID) Reset()

func (*ID) String

func (x *ID) String() string

type UnimplementedAccumulatorServer

type UnimplementedAccumulatorServer struct {
}

UnimplementedAccumulatorServer must be embedded to have forward compatible implementations.

func (UnimplementedAccumulatorServer) Append

func (UnimplementedAccumulatorServer) Get

func (UnimplementedAccumulatorServer) GetDigest

func (UnimplementedAccumulatorServer) GetOldProofByHash

func (UnimplementedAccumulatorServer) GetOldProofByID

func (UnimplementedAccumulatorServer) GetProofByHash

func (UnimplementedAccumulatorServer) GetProofByID

func (UnimplementedAccumulatorServer) Search

type UnsafeAccumulatorServer

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

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

Jump to

Keyboard shortcuts

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