Documentation ¶
Index ¶
- Variables
- func RegisterKeyValueServer(s grpc.ServiceRegistrar, srv KeyValueServer)
- type KeyValueClient
- type KeyValueDeleteRequest
- func (*KeyValueDeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValueDeleteRequest) GetRef() *ValueRef
- func (*KeyValueDeleteRequest) ProtoMessage()
- func (x *KeyValueDeleteRequest) ProtoReflect() protoreflect.Message
- func (x *KeyValueDeleteRequest) Reset()
- func (x *KeyValueDeleteRequest) String() string
- type KeyValueDeleteResponse
- type KeyValueGetRequest
- func (*KeyValueGetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValueGetRequest) GetRef() *ValueRef
- func (*KeyValueGetRequest) ProtoMessage()
- func (x *KeyValueGetRequest) ProtoReflect() protoreflect.Message
- func (x *KeyValueGetRequest) Reset()
- func (x *KeyValueGetRequest) String() string
- type KeyValueGetResponse
- func (*KeyValueGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValueGetResponse) GetValue() *Value
- func (*KeyValueGetResponse) ProtoMessage()
- func (x *KeyValueGetResponse) ProtoReflect() protoreflect.Message
- func (x *KeyValueGetResponse) Reset()
- func (x *KeyValueGetResponse) String() string
- type KeyValueServer
- type KeyValueSetRequest
- func (*KeyValueSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValueSetRequest) GetContent() *structpb.Struct
- func (x *KeyValueSetRequest) GetRef() *ValueRef
- func (*KeyValueSetRequest) ProtoMessage()
- func (x *KeyValueSetRequest) ProtoReflect() protoreflect.Message
- func (x *KeyValueSetRequest) Reset()
- func (x *KeyValueSetRequest) String() string
- type KeyValueSetResponse
- type Store
- type UnimplementedKeyValueServer
- func (UnimplementedKeyValueServer) Delete(context.Context, *KeyValueDeleteRequest) (*KeyValueDeleteResponse, error)
- func (UnimplementedKeyValueServer) Get(context.Context, *KeyValueGetRequest) (*KeyValueGetResponse, error)
- func (UnimplementedKeyValueServer) Set(context.Context, *KeyValueSetRequest) (*KeyValueSetResponse, error)
- type UnsafeKeyValueServer
- type Value
- type ValueRef
Constants ¶
This section is empty.
Variables ¶
var File_nitric_proto_keyvalue_v1_keyvalue_proto protoreflect.FileDescriptor
var KeyValue_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nitric.proto.KeyValue.v1.KeyValue", HandlerType: (*KeyValueServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _KeyValue_Get_Handler, }, { MethodName: "Set", Handler: _KeyValue_Set_Handler, }, { MethodName: "Delete", Handler: _KeyValue_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "nitric/proto/keyvalue/v1/keyvalue.proto", }
KeyValue_ServiceDesc is the grpc.ServiceDesc for KeyValue service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKeyValueServer ¶
func RegisterKeyValueServer(s grpc.ServiceRegistrar, srv KeyValueServer)
Types ¶
type KeyValueClient ¶
type KeyValueClient interface { // Get an existing value Get(ctx context.Context, in *KeyValueGetRequest, opts ...grpc.CallOption) (*KeyValueGetResponse, error) // Create a new or overwrite an existing value Set(ctx context.Context, in *KeyValueSetRequest, opts ...grpc.CallOption) (*KeyValueSetResponse, error) // Delete a key and its value Delete(ctx context.Context, in *KeyValueDeleteRequest, opts ...grpc.CallOption) (*KeyValueDeleteResponse, error) }
KeyValueClient is the client API for KeyValue 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 NewKeyValueClient ¶
func NewKeyValueClient(cc grpc.ClientConnInterface) KeyValueClient
type KeyValueDeleteRequest ¶
type KeyValueDeleteRequest 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 (*KeyValueDeleteRequest) Descriptor
deprecated
func (*KeyValueDeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueDeleteRequest.ProtoReflect.Descriptor instead.
func (*KeyValueDeleteRequest) GetRef ¶
func (x *KeyValueDeleteRequest) GetRef() *ValueRef
func (*KeyValueDeleteRequest) ProtoMessage ¶
func (*KeyValueDeleteRequest) ProtoMessage()
func (*KeyValueDeleteRequest) ProtoReflect ¶
func (x *KeyValueDeleteRequest) ProtoReflect() protoreflect.Message
func (*KeyValueDeleteRequest) Reset ¶
func (x *KeyValueDeleteRequest) Reset()
func (*KeyValueDeleteRequest) String ¶
func (x *KeyValueDeleteRequest) String() string
type KeyValueDeleteResponse ¶
type KeyValueDeleteResponse struct {
// contains filtered or unexported fields
}
func (*KeyValueDeleteResponse) Descriptor
deprecated
func (*KeyValueDeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueDeleteResponse.ProtoReflect.Descriptor instead.
func (*KeyValueDeleteResponse) ProtoMessage ¶
func (*KeyValueDeleteResponse) ProtoMessage()
func (*KeyValueDeleteResponse) ProtoReflect ¶
func (x *KeyValueDeleteResponse) ProtoReflect() protoreflect.Message
func (*KeyValueDeleteResponse) Reset ¶
func (x *KeyValueDeleteResponse) Reset()
func (*KeyValueDeleteResponse) String ¶
func (x *KeyValueDeleteResponse) String() string
type KeyValueGetRequest ¶
type KeyValueGetRequest 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 (*KeyValueGetRequest) Descriptor
deprecated
func (*KeyValueGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueGetRequest.ProtoReflect.Descriptor instead.
func (*KeyValueGetRequest) GetRef ¶
func (x *KeyValueGetRequest) GetRef() *ValueRef
func (*KeyValueGetRequest) ProtoMessage ¶
func (*KeyValueGetRequest) ProtoMessage()
func (*KeyValueGetRequest) ProtoReflect ¶
func (x *KeyValueGetRequest) ProtoReflect() protoreflect.Message
func (*KeyValueGetRequest) Reset ¶
func (x *KeyValueGetRequest) Reset()
func (*KeyValueGetRequest) String ¶
func (x *KeyValueGetRequest) String() string
type KeyValueGetResponse ¶
type KeyValueGetResponse struct { // The retrieved value Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KeyValueGetResponse) Descriptor
deprecated
func (*KeyValueGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueGetResponse.ProtoReflect.Descriptor instead.
func (*KeyValueGetResponse) GetValue ¶
func (x *KeyValueGetResponse) GetValue() *Value
func (*KeyValueGetResponse) ProtoMessage ¶
func (*KeyValueGetResponse) ProtoMessage()
func (*KeyValueGetResponse) ProtoReflect ¶
func (x *KeyValueGetResponse) ProtoReflect() protoreflect.Message
func (*KeyValueGetResponse) Reset ¶
func (x *KeyValueGetResponse) Reset()
func (*KeyValueGetResponse) String ¶
func (x *KeyValueGetResponse) String() string
type KeyValueServer ¶
type KeyValueServer interface { // Get an existing value Get(context.Context, *KeyValueGetRequest) (*KeyValueGetResponse, error) // Create a new or overwrite an existing value Set(context.Context, *KeyValueSetRequest) (*KeyValueSetResponse, error) // Delete a key and its value Delete(context.Context, *KeyValueDeleteRequest) (*KeyValueDeleteResponse, error) }
KeyValueServer is the server API for KeyValue service. All implementations should embed UnimplementedKeyValueServer for forward compatibility
type KeyValueSetRequest ¶
type KeyValueSetRequest 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 (*KeyValueSetRequest) Descriptor
deprecated
func (*KeyValueSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueSetRequest.ProtoReflect.Descriptor instead.
func (*KeyValueSetRequest) GetContent ¶
func (x *KeyValueSetRequest) GetContent() *structpb.Struct
func (*KeyValueSetRequest) GetRef ¶
func (x *KeyValueSetRequest) GetRef() *ValueRef
func (*KeyValueSetRequest) ProtoMessage ¶
func (*KeyValueSetRequest) ProtoMessage()
func (*KeyValueSetRequest) ProtoReflect ¶
func (x *KeyValueSetRequest) ProtoReflect() protoreflect.Message
func (*KeyValueSetRequest) Reset ¶
func (x *KeyValueSetRequest) Reset()
func (*KeyValueSetRequest) String ¶
func (x *KeyValueSetRequest) String() string
type KeyValueSetResponse ¶
type KeyValueSetResponse struct {
// contains filtered or unexported fields
}
func (*KeyValueSetResponse) Descriptor
deprecated
func (*KeyValueSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeyValueSetResponse.ProtoReflect.Descriptor instead.
func (*KeyValueSetResponse) ProtoMessage ¶
func (*KeyValueSetResponse) ProtoMessage()
func (*KeyValueSetResponse) ProtoReflect ¶
func (x *KeyValueSetResponse) ProtoReflect() protoreflect.Message
func (*KeyValueSetResponse) Reset ¶
func (x *KeyValueSetResponse) Reset()
func (*KeyValueSetResponse) String ¶
func (x *KeyValueSetResponse) String() string
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 UnimplementedKeyValueServer ¶
type UnimplementedKeyValueServer struct { }
UnimplementedKeyValueServer should be embedded to have forward compatible implementations.
func (UnimplementedKeyValueServer) Delete ¶
func (UnimplementedKeyValueServer) Delete(context.Context, *KeyValueDeleteRequest) (*KeyValueDeleteResponse, error)
func (UnimplementedKeyValueServer) Get ¶
func (UnimplementedKeyValueServer) Get(context.Context, *KeyValueGetRequest) (*KeyValueGetResponse, error)
func (UnimplementedKeyValueServer) Set ¶
func (UnimplementedKeyValueServer) Set(context.Context, *KeyValueSetRequest) (*KeyValueSetResponse, error)
type UnsafeKeyValueServer ¶
type UnsafeKeyValueServer interface {
// contains filtered or unexported methods
}
UnsafeKeyValueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KeyValueServer 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