storagev1alpha1

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthStorage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStorage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStorage = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterQueryServiceServer

func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)

Types

type KeyValueRequest

type KeyValueRequest struct {
	// The expected chain id (empty string if no expectation).
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// If set, the key to fetch from storage.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// whether to return a proof
	Proof bool `protobuf:"varint,3,opt,name=proof,proto3" json:"proof,omitempty"`
}

Performs a key-value query, either by key or by key hash.

Proofs are only supported by key.

func (*KeyValueRequest) Descriptor

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

func (*KeyValueRequest) GetChainId

func (m *KeyValueRequest) GetChainId() string

func (*KeyValueRequest) GetKey

func (m *KeyValueRequest) GetKey() string

func (*KeyValueRequest) GetProof

func (m *KeyValueRequest) GetProof() bool

func (*KeyValueRequest) Marshal

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

func (*KeyValueRequest) MarshalTo

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

func (*KeyValueRequest) MarshalToSizedBuffer

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

func (*KeyValueRequest) ProtoMessage

func (*KeyValueRequest) ProtoMessage()

func (*KeyValueRequest) Reset

func (m *KeyValueRequest) Reset()

func (*KeyValueRequest) Size

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

func (*KeyValueRequest) String

func (m *KeyValueRequest) String() string

func (*KeyValueRequest) Unmarshal

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

func (*KeyValueRequest) XXX_DiscardUnknown

func (m *KeyValueRequest) XXX_DiscardUnknown()

func (*KeyValueRequest) XXX_Marshal

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

func (*KeyValueRequest) XXX_Merge

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

func (*KeyValueRequest) XXX_Size

func (m *KeyValueRequest) XXX_Size() int

func (*KeyValueRequest) XXX_Unmarshal

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

type KeyValueResponse

type KeyValueResponse struct {
	// The value corresponding to the specified key, if it was found.
	Value *KeyValueResponse_Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// A proof of existence or non-existence.
	Proof *types.MerkleProof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
}

func (*KeyValueResponse) Descriptor

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

func (*KeyValueResponse) GetProof

func (m *KeyValueResponse) GetProof() *types.MerkleProof

func (*KeyValueResponse) GetValue

func (*KeyValueResponse) Marshal

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

func (*KeyValueResponse) MarshalTo

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

func (*KeyValueResponse) MarshalToSizedBuffer

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

func (*KeyValueResponse) ProtoMessage

func (*KeyValueResponse) ProtoMessage()

func (*KeyValueResponse) Reset

func (m *KeyValueResponse) Reset()

func (*KeyValueResponse) Size

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

func (*KeyValueResponse) String

func (m *KeyValueResponse) String() string

func (*KeyValueResponse) Unmarshal

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

func (*KeyValueResponse) XXX_DiscardUnknown

func (m *KeyValueResponse) XXX_DiscardUnknown()

func (*KeyValueResponse) XXX_Marshal

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

func (*KeyValueResponse) XXX_Merge

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

func (*KeyValueResponse) XXX_Size

func (m *KeyValueResponse) XXX_Size() int

func (*KeyValueResponse) XXX_Unmarshal

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

type KeyValueResponse_Value

type KeyValueResponse_Value struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

func (*KeyValueResponse_Value) Descriptor

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

func (*KeyValueResponse_Value) GetValue

func (m *KeyValueResponse_Value) GetValue() []byte

func (*KeyValueResponse_Value) Marshal

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

func (*KeyValueResponse_Value) MarshalTo

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

func (*KeyValueResponse_Value) MarshalToSizedBuffer

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

func (*KeyValueResponse_Value) ProtoMessage

func (*KeyValueResponse_Value) ProtoMessage()

func (*KeyValueResponse_Value) Reset

func (m *KeyValueResponse_Value) Reset()

func (*KeyValueResponse_Value) Size

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

func (*KeyValueResponse_Value) String

func (m *KeyValueResponse_Value) String() string

func (*KeyValueResponse_Value) Unmarshal

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

func (*KeyValueResponse_Value) XXX_DiscardUnknown

func (m *KeyValueResponse_Value) XXX_DiscardUnknown()

func (*KeyValueResponse_Value) XXX_Marshal

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

func (*KeyValueResponse_Value) XXX_Merge

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

func (*KeyValueResponse_Value) XXX_Size

func (m *KeyValueResponse_Value) XXX_Size() int

func (*KeyValueResponse_Value) XXX_Unmarshal

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

type PrefixValueRequest

type PrefixValueRequest struct {
	// The expected chain id (empty string if no expectation).
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// The prefix to fetch subkeys from storage.
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

Performs a prefixed key-value query, by string prefix.

func (*PrefixValueRequest) Descriptor

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

func (*PrefixValueRequest) GetChainId

func (m *PrefixValueRequest) GetChainId() string

func (*PrefixValueRequest) GetPrefix

func (m *PrefixValueRequest) GetPrefix() string

func (*PrefixValueRequest) Marshal

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

func (*PrefixValueRequest) MarshalTo

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

func (*PrefixValueRequest) MarshalToSizedBuffer

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

func (*PrefixValueRequest) ProtoMessage

func (*PrefixValueRequest) ProtoMessage()

func (*PrefixValueRequest) Reset

func (m *PrefixValueRequest) Reset()

func (*PrefixValueRequest) Size

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

func (*PrefixValueRequest) String

func (m *PrefixValueRequest) String() string

func (*PrefixValueRequest) Unmarshal

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

func (*PrefixValueRequest) XXX_DiscardUnknown

func (m *PrefixValueRequest) XXX_DiscardUnknown()

func (*PrefixValueRequest) XXX_Marshal

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

func (*PrefixValueRequest) XXX_Merge

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

func (*PrefixValueRequest) XXX_Size

func (m *PrefixValueRequest) XXX_Size() int

func (*PrefixValueRequest) XXX_Unmarshal

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

type PrefixValueResponse

type PrefixValueResponse struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*PrefixValueResponse) Descriptor

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

func (*PrefixValueResponse) GetKey

func (m *PrefixValueResponse) GetKey() string

func (*PrefixValueResponse) GetValue

func (m *PrefixValueResponse) GetValue() []byte

func (*PrefixValueResponse) Marshal

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

func (*PrefixValueResponse) MarshalTo

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

func (*PrefixValueResponse) MarshalToSizedBuffer

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

func (*PrefixValueResponse) ProtoMessage

func (*PrefixValueResponse) ProtoMessage()

func (*PrefixValueResponse) Reset

func (m *PrefixValueResponse) Reset()

func (*PrefixValueResponse) Size

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

func (*PrefixValueResponse) String

func (m *PrefixValueResponse) String() string

func (*PrefixValueResponse) Unmarshal

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

func (*PrefixValueResponse) XXX_DiscardUnknown

func (m *PrefixValueResponse) XXX_DiscardUnknown()

func (*PrefixValueResponse) XXX_Marshal

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

func (*PrefixValueResponse) XXX_Merge

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

func (*PrefixValueResponse) XXX_Size

func (m *PrefixValueResponse) XXX_Size() int

func (*PrefixValueResponse) XXX_Unmarshal

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

type QueryServiceClient

type QueryServiceClient interface {
	// General-purpose key-value state query API, that can be used to query
	// arbitrary keys in the JMT storage.
	KeyValue(ctx context.Context, in *KeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error)
	// General-purpose prefixed key-value state query API, that can be used to query
	// arbitrary prefixes in the JMT storage.
	// Returns a stream of `PrefixValueResponse`s.
	PrefixValue(ctx context.Context, in *PrefixValueRequest, opts ...grpc.CallOption) (QueryService_PrefixValueClient, error)
}

QueryServiceClient is the client API for QueryService service.

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

func NewQueryServiceClient

func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient

type QueryServiceServer

type QueryServiceServer interface {
	// General-purpose key-value state query API, that can be used to query
	// arbitrary keys in the JMT storage.
	KeyValue(context.Context, *KeyValueRequest) (*KeyValueResponse, error)
	// General-purpose prefixed key-value state query API, that can be used to query
	// arbitrary prefixes in the JMT storage.
	// Returns a stream of `PrefixValueResponse`s.
	PrefixValue(*PrefixValueRequest, QueryService_PrefixValueServer) error
}

QueryServiceServer is the server API for QueryService service.

type QueryService_PrefixValueClient

type QueryService_PrefixValueClient interface {
	Recv() (*PrefixValueResponse, error)
	grpc.ClientStream
}

type QueryService_PrefixValueServer

type QueryService_PrefixValueServer interface {
	Send(*PrefixValueResponse) error
	grpc.ServerStream
}

type UnimplementedQueryServiceServer

type UnimplementedQueryServiceServer struct {
}

UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServiceServer) KeyValue

func (*UnimplementedQueryServiceServer) PrefixValue

Jump to

Keyboard shortcuts

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