Documentation ¶
Index ¶
- Variables
- func RegisterKvStoreServer(s grpc.ServiceRegistrar, srv KvStoreServer)
- type KvStoreClient
- type KvStoreDeleteKeyRequest
- func (*KvStoreDeleteKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreDeleteKeyRequest) GetRef() *ValueRef
- func (*KvStoreDeleteKeyRequest) ProtoMessage()
- func (x *KvStoreDeleteKeyRequest) ProtoReflect() protoreflect.Message
- func (x *KvStoreDeleteKeyRequest) Reset()
- func (x *KvStoreDeleteKeyRequest) String() string
- type KvStoreDeleteKeyResponse
- type KvStoreGetValueRequest
- func (*KvStoreGetValueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreGetValueRequest) GetRef() *ValueRef
- func (*KvStoreGetValueRequest) ProtoMessage()
- func (x *KvStoreGetValueRequest) ProtoReflect() protoreflect.Message
- func (x *KvStoreGetValueRequest) Reset()
- func (x *KvStoreGetValueRequest) String() string
- type KvStoreGetValueResponse
- func (*KvStoreGetValueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreGetValueResponse) GetValue() *Value
- func (*KvStoreGetValueResponse) ProtoMessage()
- func (x *KvStoreGetValueResponse) ProtoReflect() protoreflect.Message
- func (x *KvStoreGetValueResponse) Reset()
- func (x *KvStoreGetValueResponse) String() string
- type KvStoreScanKeysRequest
- func (*KvStoreScanKeysRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreScanKeysRequest) GetPrefix() string
- func (x *KvStoreScanKeysRequest) GetStore() *Store
- func (*KvStoreScanKeysRequest) ProtoMessage()
- func (x *KvStoreScanKeysRequest) ProtoReflect() protoreflect.Message
- func (x *KvStoreScanKeysRequest) Reset()
- func (x *KvStoreScanKeysRequest) String() string
- type KvStoreScanKeysResponse
- func (*KvStoreScanKeysResponse) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreScanKeysResponse) GetKey() string
- func (*KvStoreScanKeysResponse) ProtoMessage()
- func (x *KvStoreScanKeysResponse) ProtoReflect() protoreflect.Message
- func (x *KvStoreScanKeysResponse) Reset()
- func (x *KvStoreScanKeysResponse) String() string
- type KvStoreServer
- type KvStoreSetValueRequest
- func (*KvStoreSetValueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KvStoreSetValueRequest) GetContent() *structpb.Struct
- func (x *KvStoreSetValueRequest) GetRef() *ValueRef
- func (*KvStoreSetValueRequest) ProtoMessage()
- func (x *KvStoreSetValueRequest) ProtoReflect() protoreflect.Message
- func (x *KvStoreSetValueRequest) Reset()
- func (x *KvStoreSetValueRequest) String() string
- type KvStoreSetValueResponse
- type KvStore_ScanKeysClient
- type KvStore_ScanKeysServer
- type Store
- type UnimplementedKvStoreServer
- func (UnimplementedKvStoreServer) DeleteKey(context.Context, *KvStoreDeleteKeyRequest) (*KvStoreDeleteKeyResponse, error)
- func (UnimplementedKvStoreServer) GetValue(context.Context, *KvStoreGetValueRequest) (*KvStoreGetValueResponse, error)
- func (UnimplementedKvStoreServer) ScanKeys(*KvStoreScanKeysRequest, KvStore_ScanKeysServer) error
- func (UnimplementedKvStoreServer) SetValue(context.Context, *KvStoreSetValueRequest) (*KvStoreSetValueResponse, error)
- type UnsafeKvStoreServer
- type Value
- type ValueRef
Constants ¶
This section is empty.
Variables ¶
var File_nitric_proto_kvstore_v1_kvstore_proto protoreflect.FileDescriptor
var KvStore_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nitric.proto.kvstore.v1.KvStore", HandlerType: (*KvStoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetValue", Handler: _KvStore_GetValue_Handler, }, { MethodName: "SetValue", Handler: _KvStore_SetValue_Handler, }, { MethodName: "DeleteKey", Handler: _KvStore_DeleteKey_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ScanKeys", Handler: _KvStore_ScanKeys_Handler, ServerStreams: true, }, }, Metadata: "nitric/proto/kvstore/v1/kvstore.proto", }
KvStore_ServiceDesc is the grpc.ServiceDesc for KvStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKvStoreServer ¶
func RegisterKvStoreServer(s grpc.ServiceRegistrar, srv KvStoreServer)
Types ¶
type KvStoreClient ¶
type KvStoreClient interface { // Get an existing value GetValue(ctx context.Context, in *KvStoreGetValueRequest, opts ...grpc.CallOption) (*KvStoreGetValueResponse, error) // Create a new or overwrite an existing value SetValue(ctx context.Context, in *KvStoreSetValueRequest, opts ...grpc.CallOption) (*KvStoreSetValueResponse, error) // Delete a key and its value DeleteKey(ctx context.Context, in *KvStoreDeleteKeyRequest, opts ...grpc.CallOption) (*KvStoreDeleteKeyResponse, error) // Iterate over all keys in a store ScanKeys(ctx context.Context, in *KvStoreScanKeysRequest, opts ...grpc.CallOption) (KvStore_ScanKeysClient, error) }
KvStoreClient is the client API for KvStore 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.
func NewKvStoreClient ¶
func NewKvStoreClient(cc grpc.ClientConnInterface) KvStoreClient
type KvStoreDeleteKeyRequest ¶
type KvStoreDeleteKeyRequest struct { // ValueRef of the key/value pair to delete, which includes the store and key Ref *ValueRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // contains filtered or unexported fields }
func (*KvStoreDeleteKeyRequest) Descriptor
deprecated
func (*KvStoreDeleteKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreDeleteKeyRequest.ProtoReflect.Descriptor instead.
func (*KvStoreDeleteKeyRequest) GetRef ¶
func (x *KvStoreDeleteKeyRequest) GetRef() *ValueRef
func (*KvStoreDeleteKeyRequest) ProtoMessage ¶
func (*KvStoreDeleteKeyRequest) ProtoMessage()
func (*KvStoreDeleteKeyRequest) ProtoReflect ¶
func (x *KvStoreDeleteKeyRequest) ProtoReflect() protoreflect.Message
func (*KvStoreDeleteKeyRequest) Reset ¶
func (x *KvStoreDeleteKeyRequest) Reset()
func (*KvStoreDeleteKeyRequest) String ¶
func (x *KvStoreDeleteKeyRequest) String() string
type KvStoreDeleteKeyResponse ¶
type KvStoreDeleteKeyResponse struct {
// contains filtered or unexported fields
}
func (*KvStoreDeleteKeyResponse) Descriptor
deprecated
func (*KvStoreDeleteKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreDeleteKeyResponse.ProtoReflect.Descriptor instead.
func (*KvStoreDeleteKeyResponse) ProtoMessage ¶
func (*KvStoreDeleteKeyResponse) ProtoMessage()
func (*KvStoreDeleteKeyResponse) ProtoReflect ¶
func (x *KvStoreDeleteKeyResponse) ProtoReflect() protoreflect.Message
func (*KvStoreDeleteKeyResponse) Reset ¶
func (x *KvStoreDeleteKeyResponse) Reset()
func (*KvStoreDeleteKeyResponse) String ¶
func (x *KvStoreDeleteKeyResponse) String() string
type KvStoreGetValueRequest ¶
type KvStoreGetValueRequest struct { // ValueRef of the key/value pair to get, which includes the store and key Ref *ValueRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // contains filtered or unexported fields }
func (*KvStoreGetValueRequest) Descriptor
deprecated
func (*KvStoreGetValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreGetValueRequest.ProtoReflect.Descriptor instead.
func (*KvStoreGetValueRequest) GetRef ¶
func (x *KvStoreGetValueRequest) GetRef() *ValueRef
func (*KvStoreGetValueRequest) ProtoMessage ¶
func (*KvStoreGetValueRequest) ProtoMessage()
func (*KvStoreGetValueRequest) ProtoReflect ¶
func (x *KvStoreGetValueRequest) ProtoReflect() protoreflect.Message
func (*KvStoreGetValueRequest) Reset ¶
func (x *KvStoreGetValueRequest) Reset()
func (*KvStoreGetValueRequest) String ¶
func (x *KvStoreGetValueRequest) String() string
type KvStoreGetValueResponse ¶
type KvStoreGetValueResponse struct { // The retrieved value Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KvStoreGetValueResponse) Descriptor
deprecated
func (*KvStoreGetValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreGetValueResponse.ProtoReflect.Descriptor instead.
func (*KvStoreGetValueResponse) GetValue ¶
func (x *KvStoreGetValueResponse) GetValue() *Value
func (*KvStoreGetValueResponse) ProtoMessage ¶
func (*KvStoreGetValueResponse) ProtoMessage()
func (*KvStoreGetValueResponse) ProtoReflect ¶
func (x *KvStoreGetValueResponse) ProtoReflect() protoreflect.Message
func (*KvStoreGetValueResponse) Reset ¶
func (x *KvStoreGetValueResponse) Reset()
func (*KvStoreGetValueResponse) String ¶
func (x *KvStoreGetValueResponse) String() string
type KvStoreScanKeysRequest ¶
type KvStoreScanKeysRequest struct { // The store to iterate over Store *Store `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` // The prefix to filter keys by Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // contains filtered or unexported fields }
func (*KvStoreScanKeysRequest) Descriptor
deprecated
func (*KvStoreScanKeysRequest) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreScanKeysRequest.ProtoReflect.Descriptor instead.
func (*KvStoreScanKeysRequest) GetPrefix ¶
func (x *KvStoreScanKeysRequest) GetPrefix() string
func (*KvStoreScanKeysRequest) GetStore ¶
func (x *KvStoreScanKeysRequest) GetStore() *Store
func (*KvStoreScanKeysRequest) ProtoMessage ¶
func (*KvStoreScanKeysRequest) ProtoMessage()
func (*KvStoreScanKeysRequest) ProtoReflect ¶
func (x *KvStoreScanKeysRequest) ProtoReflect() protoreflect.Message
func (*KvStoreScanKeysRequest) Reset ¶
func (x *KvStoreScanKeysRequest) Reset()
func (*KvStoreScanKeysRequest) String ¶
func (x *KvStoreScanKeysRequest) String() string
type KvStoreScanKeysResponse ¶
type KvStoreScanKeysResponse struct { // The key of the key/value pair Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*KvStoreScanKeysResponse) Descriptor
deprecated
func (*KvStoreScanKeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreScanKeysResponse.ProtoReflect.Descriptor instead.
func (*KvStoreScanKeysResponse) GetKey ¶
func (x *KvStoreScanKeysResponse) GetKey() string
func (*KvStoreScanKeysResponse) ProtoMessage ¶
func (*KvStoreScanKeysResponse) ProtoMessage()
func (*KvStoreScanKeysResponse) ProtoReflect ¶
func (x *KvStoreScanKeysResponse) ProtoReflect() protoreflect.Message
func (*KvStoreScanKeysResponse) Reset ¶
func (x *KvStoreScanKeysResponse) Reset()
func (*KvStoreScanKeysResponse) String ¶
func (x *KvStoreScanKeysResponse) String() string
type KvStoreServer ¶
type KvStoreServer interface { // Get an existing value GetValue(context.Context, *KvStoreGetValueRequest) (*KvStoreGetValueResponse, error) // Create a new or overwrite an existing value SetValue(context.Context, *KvStoreSetValueRequest) (*KvStoreSetValueResponse, error) // Delete a key and its value DeleteKey(context.Context, *KvStoreDeleteKeyRequest) (*KvStoreDeleteKeyResponse, error) // Iterate over all keys in a store ScanKeys(*KvStoreScanKeysRequest, KvStore_ScanKeysServer) error }
KvStoreServer is the server API for KvStore service. All implementations should embed UnimplementedKvStoreServer for forward compatibility
type KvStoreSetValueRequest ¶
type KvStoreSetValueRequest struct { // ValueRef of the key/value pair to set, which includes the store and key Ref *ValueRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // The value content to store (JSON object) Content *structpb.Struct `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*KvStoreSetValueRequest) Descriptor
deprecated
func (*KvStoreSetValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreSetValueRequest.ProtoReflect.Descriptor instead.
func (*KvStoreSetValueRequest) GetContent ¶
func (x *KvStoreSetValueRequest) GetContent() *structpb.Struct
func (*KvStoreSetValueRequest) GetRef ¶
func (x *KvStoreSetValueRequest) GetRef() *ValueRef
func (*KvStoreSetValueRequest) ProtoMessage ¶
func (*KvStoreSetValueRequest) ProtoMessage()
func (*KvStoreSetValueRequest) ProtoReflect ¶
func (x *KvStoreSetValueRequest) ProtoReflect() protoreflect.Message
func (*KvStoreSetValueRequest) Reset ¶
func (x *KvStoreSetValueRequest) Reset()
func (*KvStoreSetValueRequest) String ¶
func (x *KvStoreSetValueRequest) String() string
type KvStoreSetValueResponse ¶
type KvStoreSetValueResponse struct {
// contains filtered or unexported fields
}
func (*KvStoreSetValueResponse) Descriptor
deprecated
func (*KvStoreSetValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use KvStoreSetValueResponse.ProtoReflect.Descriptor instead.
func (*KvStoreSetValueResponse) ProtoMessage ¶
func (*KvStoreSetValueResponse) ProtoMessage()
func (*KvStoreSetValueResponse) ProtoReflect ¶
func (x *KvStoreSetValueResponse) ProtoReflect() protoreflect.Message
func (*KvStoreSetValueResponse) Reset ¶
func (x *KvStoreSetValueResponse) Reset()
func (*KvStoreSetValueResponse) String ¶
func (x *KvStoreSetValueResponse) String() string
type KvStore_ScanKeysClient ¶
type KvStore_ScanKeysClient interface { Recv() (*KvStoreScanKeysResponse, error) grpc.ClientStream }
type KvStore_ScanKeysServer ¶
type KvStore_ScanKeysServer interface { Send(*KvStoreScanKeysResponse) error grpc.ServerStream }
type Store ¶
type Store struct { // The store name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Provides a Key/Value Store
func (*Store) Descriptor
deprecated
func (*Store) ProtoMessage ¶
func (*Store) ProtoMessage()
func (*Store) ProtoReflect ¶
func (x *Store) ProtoReflect() protoreflect.Message
type UnimplementedKvStoreServer ¶
type UnimplementedKvStoreServer struct { }
UnimplementedKvStoreServer should be embedded to have forward compatible implementations.
func (UnimplementedKvStoreServer) DeleteKey ¶
func (UnimplementedKvStoreServer) DeleteKey(context.Context, *KvStoreDeleteKeyRequest) (*KvStoreDeleteKeyResponse, error)
func (UnimplementedKvStoreServer) GetValue ¶
func (UnimplementedKvStoreServer) GetValue(context.Context, *KvStoreGetValueRequest) (*KvStoreGetValueResponse, error)
func (UnimplementedKvStoreServer) ScanKeys ¶
func (UnimplementedKvStoreServer) ScanKeys(*KvStoreScanKeysRequest, KvStore_ScanKeysServer) error
func (UnimplementedKvStoreServer) SetValue ¶
func (UnimplementedKvStoreServer) SetValue(context.Context, *KvStoreSetValueRequest) (*KvStoreSetValueResponse, error)
type UnsafeKvStoreServer ¶
type UnsafeKvStoreServer interface {
// contains filtered or unexported methods
}
UnsafeKvStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KvStoreServer will result in compilation errors.
type Value ¶
type Value struct { // ValueRef of the key/value pair, which includes the store and key Ref *ValueRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // The content (JSON object) Content *structpb.Struct `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
Value provides a return value type
func (*Value) Descriptor
deprecated
func (*Value) GetContent ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type ValueRef ¶
type ValueRef struct { // The key/value store name Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` // The item's unique key within the store Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
ValueRef provides a unique identifier for a value
func (*ValueRef) Descriptor
deprecated
func (*ValueRef) ProtoMessage ¶
func (*ValueRef) ProtoMessage()
func (*ValueRef) ProtoReflect ¶
func (x *ValueRef) ProtoReflect() protoreflect.Message