kvstorepb

package
v0.0.0-...-997c607 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_nitric_proto_kvstore_v1_kvstore_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Store.ProtoReflect.Descriptor instead.

func (*Store) GetName

func (x *Store) GetName() string

func (*Store) ProtoMessage

func (*Store) ProtoMessage()

func (*Store) ProtoReflect

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

func (*Store) Reset

func (x *Store) Reset()

func (*Store) String

func (x *Store) String() string

type UnimplementedKvStoreServer

type UnimplementedKvStoreServer struct {
}

UnimplementedKvStoreServer should be embedded to have forward compatible implementations.

func (UnimplementedKvStoreServer) ScanKeys

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) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetContent

func (x *Value) GetContent() *structpb.Struct

func (*Value) GetRef

func (x *Value) GetRef() *ValueRef

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ValueRef.ProtoReflect.Descriptor instead.

func (*ValueRef) GetKey

func (x *ValueRef) GetKey() string

func (*ValueRef) GetStore

func (x *ValueRef) GetStore() string

func (*ValueRef) ProtoMessage

func (*ValueRef) ProtoMessage()

func (*ValueRef) ProtoReflect

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

func (*ValueRef) Reset

func (x *ValueRef) Reset()

func (*ValueRef) String

func (x *ValueRef) String() string

Jump to

Keyboard shortcuts

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