Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterStorageServiceServer(s grpc.ServiceRegistrar, srv StorageServiceServer)
- type DeleteManyRequest
- func (*DeleteManyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteManyRequest) GetLabels() map[string]string
- func (*DeleteManyRequest) ProtoMessage()
- func (x *DeleteManyRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteManyRequest) Reset()
- func (x *DeleteManyRequest) String() string
- type DeleteManyResponse
- func (*DeleteManyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteManyResponse) GetDeleted() uint64
- func (*DeleteManyResponse) ProtoMessage()
- func (x *DeleteManyResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteManyResponse) Reset()
- func (x *DeleteManyResponse) String() string
- type DeleteOneRequest
- type DeleteOneResponse
- type FindRequest
- type FindResponse
- type GetRequest
- type GetResponse
- type Item
- type ReplaceRequest
- type ReplaceResponse
- type StorageServiceClient
- type StorageServiceServer
- type UnimplementedStorageServiceServer
- func (UnimplementedStorageServiceServer) DeleteMany(context.Context, *DeleteManyRequest) (*DeleteManyResponse, error)
- func (UnimplementedStorageServiceServer) DeleteOne(context.Context, *DeleteOneRequest) (*DeleteOneResponse, error)
- func (UnimplementedStorageServiceServer) Find(context.Context, *FindRequest) (*FindResponse, error)
- func (UnimplementedStorageServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedStorageServiceServer) Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error)
- type UnsafeStorageServiceServer
Constants ¶
const ( StorageService_Get_FullMethodName = "/storage.StorageService/Get" StorageService_Find_FullMethodName = "/storage.StorageService/Find" StorageService_Replace_FullMethodName = "/storage.StorageService/Replace" StorageService_DeleteOne_FullMethodName = "/storage.StorageService/DeleteOne" StorageService_DeleteMany_FullMethodName = "/storage.StorageService/DeleteMany" )
Variables ¶
var File_api_storage_proto protoreflect.FileDescriptor
var StorageService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "storage.StorageService", HandlerType: (*StorageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _StorageService_Get_Handler, }, { MethodName: "Find", Handler: _StorageService_Find_Handler, }, { MethodName: "Replace", Handler: _StorageService_Replace_Handler, }, { MethodName: "DeleteOne", Handler: _StorageService_DeleteOne_Handler, }, { MethodName: "DeleteMany", Handler: _StorageService_DeleteMany_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/storage.proto", }
StorageService_ServiceDesc is the grpc.ServiceDesc for StorageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStorageServiceServer ¶
func RegisterStorageServiceServer(s grpc.ServiceRegistrar, srv StorageServiceServer)
Types ¶
type DeleteManyRequest ¶
type DeleteManyRequest struct {
// The labels to delete items with.
Labels map[string]string `` /* 154-byte string literal not displayed */
// contains filtered or unexported fields
}
DeleteManyRequest specifies the labels to delete items with.
func (*DeleteManyRequest) Descriptor
deprecated
func (*DeleteManyRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteManyRequest.ProtoReflect.Descriptor instead.
func (*DeleteManyRequest) GetLabels ¶
func (x *DeleteManyRequest) GetLabels() map[string]string
func (*DeleteManyRequest) ProtoMessage ¶
func (*DeleteManyRequest) ProtoMessage()
func (*DeleteManyRequest) ProtoReflect ¶
func (x *DeleteManyRequest) ProtoReflect() protoreflect.Message
func (*DeleteManyRequest) Reset ¶
func (x *DeleteManyRequest) Reset()
func (*DeleteManyRequest) String ¶
func (x *DeleteManyRequest) String() string
type DeleteManyResponse ¶
type DeleteManyResponse struct {
// The number of items deleted.
Deleted uint64 `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"`
// contains filtered or unexported fields
}
DeleteManyResponse contains the number of items deleted.
func (*DeleteManyResponse) Descriptor
deprecated
func (*DeleteManyResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteManyResponse.ProtoReflect.Descriptor instead.
func (*DeleteManyResponse) GetDeleted ¶
func (x *DeleteManyResponse) GetDeleted() uint64
func (*DeleteManyResponse) ProtoMessage ¶
func (*DeleteManyResponse) ProtoMessage()
func (*DeleteManyResponse) ProtoReflect ¶
func (x *DeleteManyResponse) ProtoReflect() protoreflect.Message
func (*DeleteManyResponse) Reset ¶
func (x *DeleteManyResponse) Reset()
func (*DeleteManyResponse) String ¶
func (x *DeleteManyResponse) String() string
type DeleteOneRequest ¶
type DeleteOneRequest struct {
// The key of the item to delete.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
DeleteOneRequest specifies the key of the item to delete.
func (*DeleteOneRequest) Descriptor
deprecated
func (*DeleteOneRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOneRequest.ProtoReflect.Descriptor instead.
func (*DeleteOneRequest) GetKey ¶
func (x *DeleteOneRequest) GetKey() string
func (*DeleteOneRequest) ProtoMessage ¶
func (*DeleteOneRequest) ProtoMessage()
func (*DeleteOneRequest) ProtoReflect ¶
func (x *DeleteOneRequest) ProtoReflect() protoreflect.Message
func (*DeleteOneRequest) Reset ¶
func (x *DeleteOneRequest) Reset()
func (*DeleteOneRequest) String ¶
func (x *DeleteOneRequest) String() string
type DeleteOneResponse ¶
type DeleteOneResponse struct {
// contains filtered or unexported fields
}
DeleteOneResponse is empty as there is no response to delete one request.
func (*DeleteOneResponse) Descriptor
deprecated
func (*DeleteOneResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOneResponse.ProtoReflect.Descriptor instead.
func (*DeleteOneResponse) ProtoMessage ¶
func (*DeleteOneResponse) ProtoMessage()
func (*DeleteOneResponse) ProtoReflect ¶
func (x *DeleteOneResponse) ProtoReflect() protoreflect.Message
func (*DeleteOneResponse) Reset ¶
func (x *DeleteOneResponse) Reset()
func (*DeleteOneResponse) String ¶
func (x *DeleteOneResponse) String() string
type FindRequest ¶
type FindRequest struct {
// The labels to search for.
Labels map[string]string `` /* 154-byte string literal not displayed */
// contains filtered or unexported fields
}
FindRequest specifies the labels to search for.
func (*FindRequest) Descriptor
deprecated
func (*FindRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindRequest.ProtoReflect.Descriptor instead.
func (*FindRequest) GetLabels ¶
func (x *FindRequest) GetLabels() map[string]string
func (*FindRequest) ProtoMessage ¶
func (*FindRequest) ProtoMessage()
func (*FindRequest) ProtoReflect ¶
func (x *FindRequest) ProtoReflect() protoreflect.Message
func (*FindRequest) Reset ¶
func (x *FindRequest) Reset()
func (*FindRequest) String ¶
func (x *FindRequest) String() string
type FindResponse ¶
type FindResponse struct {
// The items with the specified labels.
Items []*Item `protobuf:"bytes,21,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
FindResponse contains the items with the specified labels.
func (*FindResponse) Descriptor
deprecated
func (*FindResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindResponse.ProtoReflect.Descriptor instead.
func (*FindResponse) GetItems ¶
func (x *FindResponse) GetItems() []*Item
func (*FindResponse) ProtoMessage ¶
func (*FindResponse) ProtoMessage()
func (*FindResponse) ProtoReflect ¶
func (x *FindResponse) ProtoReflect() protoreflect.Message
func (*FindResponse) Reset ¶
func (x *FindResponse) Reset()
func (*FindResponse) String ¶
func (x *FindResponse) String() string
type GetRequest ¶
type GetRequest struct {
// The key of the item to get.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
GetRequest specifies the key of the item to get.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct {
// The item with the specified key.
Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
// contains filtered or unexported fields
}
GetResponse contains the item with the specified key.
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetItem ¶
func (x *GetResponse) GetItem() *Item
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Item ¶
type Item struct {
// The key of the item.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The value of the item.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// The labels associated with the item.
Labels map[string]string `` /* 154-byte string literal not displayed */
// contains filtered or unexported fields
}
Item represents a labeled value in the storage.
func (*Item) Descriptor
deprecated
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type ReplaceRequest ¶
type ReplaceRequest struct {
// The item to replace.
Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
// contains filtered or unexported fields
}
ReplaceRequest specifies the item to replace.
func (*ReplaceRequest) Descriptor
deprecated
func (*ReplaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReplaceRequest.ProtoReflect.Descriptor instead.
func (*ReplaceRequest) GetItem ¶
func (x *ReplaceRequest) GetItem() *Item
func (*ReplaceRequest) ProtoMessage ¶
func (*ReplaceRequest) ProtoMessage()
func (*ReplaceRequest) ProtoReflect ¶
func (x *ReplaceRequest) ProtoReflect() protoreflect.Message
func (*ReplaceRequest) Reset ¶
func (x *ReplaceRequest) Reset()
func (*ReplaceRequest) String ¶
func (x *ReplaceRequest) String() string
type ReplaceResponse ¶
type ReplaceResponse struct {
// The item that was replaced.
Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
// contains filtered or unexported fields
}
ReplaceResponse contains the item that was replaced.
func (*ReplaceResponse) Descriptor
deprecated
func (*ReplaceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReplaceResponse.ProtoReflect.Descriptor instead.
func (*ReplaceResponse) GetItem ¶
func (x *ReplaceResponse) GetItem() *Item
func (*ReplaceResponse) ProtoMessage ¶
func (*ReplaceResponse) ProtoMessage()
func (*ReplaceResponse) ProtoReflect ¶
func (x *ReplaceResponse) ProtoReflect() protoreflect.Message
func (*ReplaceResponse) Reset ¶
func (x *ReplaceResponse) Reset()
func (*ReplaceResponse) String ¶
func (x *ReplaceResponse) String() string
type StorageServiceClient ¶
type StorageServiceClient interface {
// Get retrieves the item with the specified key.
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
// Find retrieves items with the specified labels.
Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*FindResponse, error)
// Replace replaces the item with the specified key.
Replace(ctx context.Context, in *ReplaceRequest, opts ...grpc.CallOption) (*ReplaceResponse, error)
// DeleteOne deletes the item with the specified key.
DeleteOne(ctx context.Context, in *DeleteOneRequest, opts ...grpc.CallOption) (*DeleteOneResponse, error)
// DeleteMany deletes items with the specified labels.
DeleteMany(ctx context.Context, in *DeleteManyRequest, opts ...grpc.CallOption) (*DeleteManyResponse, error)
}
StorageServiceClient is the client API for StorageService 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.
StorageService is the service that provides storage operations.
func NewStorageServiceClient ¶
func NewStorageServiceClient(cc grpc.ClientConnInterface) StorageServiceClient
type StorageServiceServer ¶
type StorageServiceServer interface {
// Get retrieves the item with the specified key.
Get(context.Context, *GetRequest) (*GetResponse, error)
// Find retrieves items with the specified labels.
Find(context.Context, *FindRequest) (*FindResponse, error)
// Replace replaces the item with the specified key.
Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error)
// DeleteOne deletes the item with the specified key.
DeleteOne(context.Context, *DeleteOneRequest) (*DeleteOneResponse, error)
// DeleteMany deletes items with the specified labels.
DeleteMany(context.Context, *DeleteManyRequest) (*DeleteManyResponse, error)
// contains filtered or unexported methods
}
StorageServiceServer is the server API for StorageService service. All implementations must embed UnimplementedStorageServiceServer for forward compatibility.
StorageService is the service that provides storage operations.
type UnimplementedStorageServiceServer ¶
type UnimplementedStorageServiceServer struct{}
UnimplementedStorageServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedStorageServiceServer) DeleteMany ¶
func (UnimplementedStorageServiceServer) DeleteMany(context.Context, *DeleteManyRequest) (*DeleteManyResponse, error)
func (UnimplementedStorageServiceServer) DeleteOne ¶
func (UnimplementedStorageServiceServer) DeleteOne(context.Context, *DeleteOneRequest) (*DeleteOneResponse, error)
func (UnimplementedStorageServiceServer) Find ¶
func (UnimplementedStorageServiceServer) Find(context.Context, *FindRequest) (*FindResponse, error)
func (UnimplementedStorageServiceServer) Get ¶
func (UnimplementedStorageServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedStorageServiceServer) Replace ¶
func (UnimplementedStorageServiceServer) Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error)
type UnsafeStorageServiceServer ¶
type UnsafeStorageServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServiceServer will result in compilation errors.