Documentation ¶
Index ¶
- Variables
- func RegisterDatabaseServer(s grpc.ServiceRegistrar, srv DatabaseServer)
- type AppendItem
- func (*AppendItem) Descriptor() ([]byte, []int)deprecated
- func (x *AppendItem) GetExpiry() int64
- func (x *AppendItem) GetKeygroup() string
- func (x *AppendItem) GetVal() string
- func (*AppendItem) ProtoMessage()
- func (x *AppendItem) ProtoReflect() protoreflect.Message
- func (x *AppendItem) Reset()
- func (x *AppendItem) String() string
- type DatabaseClient
- type DatabaseServer
- type Database_GetKeygroupTriggerClient
- type Database_GetKeygroupTriggerServer
- type Database_IDsClient
- type Database_IDsServer
- type Database_ReadAllClient
- type Database_ReadAllServer
- type Database_ScanClient
- type Database_ScanServer
- type Item
- type Key
- type Keygroup
- type KeygroupTrigger
- func (*KeygroupTrigger) Descriptor() ([]byte, []int)deprecated
- func (x *KeygroupTrigger) GetKeygroup() string
- func (x *KeygroupTrigger) GetTrigger() *Trigger
- func (*KeygroupTrigger) ProtoMessage()
- func (x *KeygroupTrigger) ProtoReflect() protoreflect.Message
- func (x *KeygroupTrigger) Reset()
- func (x *KeygroupTrigger) String() string
- type Response
- type ScanRequest
- type Trigger
- type UnimplementedDatabaseServer
- func (UnimplementedDatabaseServer) AddKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error)
- func (UnimplementedDatabaseServer) Append(context.Context, *AppendItem) (*Key, error)
- func (UnimplementedDatabaseServer) CreateKeygroup(context.Context, *Keygroup) (*Response, error)
- func (UnimplementedDatabaseServer) Delete(context.Context, *Key) (*Response, error)
- func (UnimplementedDatabaseServer) DeleteKeygroup(context.Context, *Keygroup) (*Response, error)
- func (UnimplementedDatabaseServer) DeleteKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error)
- func (UnimplementedDatabaseServer) Exists(context.Context, *Key) (*Response, error)
- func (UnimplementedDatabaseServer) ExistsKeygroup(context.Context, *Keygroup) (*Response, error)
- func (UnimplementedDatabaseServer) GetKeygroupTrigger(*Keygroup, Database_GetKeygroupTriggerServer) error
- func (UnimplementedDatabaseServer) IDs(*Keygroup, Database_IDsServer) error
- func (UnimplementedDatabaseServer) Read(context.Context, *Key) (*Val, error)
- func (UnimplementedDatabaseServer) ReadAll(*Keygroup, Database_ReadAllServer) error
- func (UnimplementedDatabaseServer) Scan(*ScanRequest, Database_ScanServer) error
- func (UnimplementedDatabaseServer) Update(context.Context, *UpdateItem) (*Response, error)
- type UnsafeDatabaseServer
- type UpdateItem
- func (*UpdateItem) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateItem) GetAppend() bool
- func (x *UpdateItem) GetExpiry() int64
- func (x *UpdateItem) GetId() string
- func (x *UpdateItem) GetKeygroup() string
- func (x *UpdateItem) GetVal() string
- func (*UpdateItem) ProtoMessage()
- func (x *UpdateItem) ProtoReflect() protoreflect.Message
- func (x *UpdateItem) Reset()
- func (x *UpdateItem) String() string
- type Val
Constants ¶
This section is empty.
Variables ¶
var Database_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mcc.fred.storage.Database", HandlerType: (*DatabaseServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Update", Handler: _Database_Update_Handler, }, { MethodName: "Delete", Handler: _Database_Delete_Handler, }, { MethodName: "Append", Handler: _Database_Append_Handler, }, { MethodName: "Read", Handler: _Database_Read_Handler, }, { MethodName: "Exists", Handler: _Database_Exists_Handler, }, { MethodName: "CreateKeygroup", Handler: _Database_CreateKeygroup_Handler, }, { MethodName: "DeleteKeygroup", Handler: _Database_DeleteKeygroup_Handler, }, { MethodName: "ExistsKeygroup", Handler: _Database_ExistsKeygroup_Handler, }, { MethodName: "AddKeygroupTrigger", Handler: _Database_AddKeygroupTrigger_Handler, }, { MethodName: "DeleteKeygroupTrigger", Handler: _Database_DeleteKeygroupTrigger_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Scan", Handler: _Database_Scan_Handler, ServerStreams: true, }, { StreamName: "ReadAll", Handler: _Database_ReadAll_Handler, ServerStreams: true, }, { StreamName: "IDs", Handler: _Database_IDs_Handler, ServerStreams: true, }, { StreamName: "GetKeygroupTrigger", Handler: _Database_GetKeygroupTrigger_Handler, ServerStreams: true, }, }, Metadata: "storage.proto", }
Database_ServiceDesc is the grpc.ServiceDesc for Database service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_storage_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDatabaseServer ¶
func RegisterDatabaseServer(s grpc.ServiceRegistrar, srv DatabaseServer)
Types ¶
type AppendItem ¶
type AppendItem struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"` Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` // contains filtered or unexported fields }
func (*AppendItem) Descriptor
deprecated
func (*AppendItem) Descriptor() ([]byte, []int)
Deprecated: Use AppendItem.ProtoReflect.Descriptor instead.
func (*AppendItem) GetExpiry ¶
func (x *AppendItem) GetExpiry() int64
func (*AppendItem) GetKeygroup ¶
func (x *AppendItem) GetKeygroup() string
func (*AppendItem) GetVal ¶
func (x *AppendItem) GetVal() string
func (*AppendItem) ProtoMessage ¶
func (*AppendItem) ProtoMessage()
func (*AppendItem) ProtoReflect ¶
func (x *AppendItem) ProtoReflect() protoreflect.Message
func (*AppendItem) Reset ¶
func (x *AppendItem) Reset()
func (*AppendItem) String ¶
func (x *AppendItem) String() string
type DatabaseClient ¶
type DatabaseClient interface { Update(ctx context.Context, in *UpdateItem, opts ...grpc.CallOption) (*Response, error) Delete(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Response, error) Append(ctx context.Context, in *AppendItem, opts ...grpc.CallOption) (*Key, error) Read(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Val, error) Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (Database_ScanClient, error) ReadAll(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (Database_ReadAllClient, error) IDs(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (Database_IDsClient, error) Exists(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Response, error) CreateKeygroup(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (*Response, error) DeleteKeygroup(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (*Response, error) ExistsKeygroup(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (*Response, error) AddKeygroupTrigger(ctx context.Context, in *KeygroupTrigger, opts ...grpc.CallOption) (*Response, error) DeleteKeygroupTrigger(ctx context.Context, in *KeygroupTrigger, opts ...grpc.CallOption) (*Response, error) GetKeygroupTrigger(ctx context.Context, in *Keygroup, opts ...grpc.CallOption) (Database_GetKeygroupTriggerClient, error) }
DatabaseClient is the client API for Database 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 NewDatabaseClient ¶
func NewDatabaseClient(cc grpc.ClientConnInterface) DatabaseClient
type DatabaseServer ¶
type DatabaseServer interface { Update(context.Context, *UpdateItem) (*Response, error) Delete(context.Context, *Key) (*Response, error) Append(context.Context, *AppendItem) (*Key, error) Read(context.Context, *Key) (*Val, error) Scan(*ScanRequest, Database_ScanServer) error ReadAll(*Keygroup, Database_ReadAllServer) error IDs(*Keygroup, Database_IDsServer) error Exists(context.Context, *Key) (*Response, error) CreateKeygroup(context.Context, *Keygroup) (*Response, error) DeleteKeygroup(context.Context, *Keygroup) (*Response, error) ExistsKeygroup(context.Context, *Keygroup) (*Response, error) AddKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error) DeleteKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error) GetKeygroupTrigger(*Keygroup, Database_GetKeygroupTriggerServer) error }
DatabaseServer is the server API for Database service. All implementations should embed UnimplementedDatabaseServer for forward compatibility
type Database_GetKeygroupTriggerClient ¶
type Database_GetKeygroupTriggerClient interface { Recv() (*Trigger, error) grpc.ClientStream }
type Database_GetKeygroupTriggerServer ¶
type Database_GetKeygroupTriggerServer interface { Send(*Trigger) error grpc.ServerStream }
type Database_IDsClient ¶
type Database_IDsClient interface { Recv() (*Key, error) grpc.ClientStream }
type Database_IDsServer ¶
type Database_IDsServer interface { Send(*Key) error grpc.ServerStream }
type Database_ReadAllClient ¶
type Database_ReadAllClient interface { Recv() (*Item, error) grpc.ClientStream }
type Database_ReadAllServer ¶
type Database_ReadAllServer interface { Send(*Item) error grpc.ServerStream }
type Database_ScanClient ¶
type Database_ScanClient interface { Recv() (*Item, error) grpc.ClientStream }
type Database_ScanServer ¶
type Database_ScanServer interface { Send(*Item) error grpc.ServerStream }
type Item ¶
type Item struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Val string `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetKeygroup ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type Key ¶
type Key struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
A Key uniquely identifies data. In our case it contains a keygroup and the id
func (*Key) Descriptor
deprecated
func (*Key) GetKeygroup ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type Keygroup ¶
type Keygroup struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` // contains filtered or unexported fields }
func (*Keygroup) Descriptor
deprecated
func (*Keygroup) GetKeygroup ¶
func (*Keygroup) ProtoMessage ¶
func (*Keygroup) ProtoMessage()
func (*Keygroup) ProtoReflect ¶
func (x *Keygroup) ProtoReflect() protoreflect.Message
type KeygroupTrigger ¶
type KeygroupTrigger struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` Trigger *Trigger `protobuf:"bytes,2,opt,name=trigger,proto3" json:"trigger,omitempty"` // contains filtered or unexported fields }
func (*KeygroupTrigger) Descriptor
deprecated
func (*KeygroupTrigger) Descriptor() ([]byte, []int)
Deprecated: Use KeygroupTrigger.ProtoReflect.Descriptor instead.
func (*KeygroupTrigger) GetKeygroup ¶
func (x *KeygroupTrigger) GetKeygroup() string
func (*KeygroupTrigger) GetTrigger ¶
func (x *KeygroupTrigger) GetTrigger() *Trigger
func (*KeygroupTrigger) ProtoMessage ¶
func (*KeygroupTrigger) ProtoMessage()
func (*KeygroupTrigger) ProtoReflect ¶
func (x *KeygroupTrigger) ProtoReflect() protoreflect.Message
func (*KeygroupTrigger) Reset ¶
func (x *KeygroupTrigger) Reset()
func (*KeygroupTrigger) String ¶
func (x *KeygroupTrigger) String() string
type Response ¶
type Response struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) GetSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type ScanRequest ¶
type ScanRequest struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetCount ¶
func (x *ScanRequest) GetCount() uint64
func (*ScanRequest) GetKey ¶
func (x *ScanRequest) GetKey() *Key
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type Trigger ¶
type Trigger struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` // contains filtered or unexported fields }
func (*Trigger) Descriptor
deprecated
func (*Trigger) ProtoMessage ¶
func (*Trigger) ProtoMessage()
func (*Trigger) ProtoReflect ¶
func (x *Trigger) ProtoReflect() protoreflect.Message
type UnimplementedDatabaseServer ¶
type UnimplementedDatabaseServer struct { }
UnimplementedDatabaseServer should be embedded to have forward compatible implementations.
func (UnimplementedDatabaseServer) AddKeygroupTrigger ¶
func (UnimplementedDatabaseServer) AddKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error)
func (UnimplementedDatabaseServer) Append ¶
func (UnimplementedDatabaseServer) Append(context.Context, *AppendItem) (*Key, error)
func (UnimplementedDatabaseServer) CreateKeygroup ¶
func (UnimplementedDatabaseServer) DeleteKeygroup ¶
func (UnimplementedDatabaseServer) DeleteKeygroupTrigger ¶
func (UnimplementedDatabaseServer) DeleteKeygroupTrigger(context.Context, *KeygroupTrigger) (*Response, error)
func (UnimplementedDatabaseServer) ExistsKeygroup ¶
func (UnimplementedDatabaseServer) GetKeygroupTrigger ¶
func (UnimplementedDatabaseServer) GetKeygroupTrigger(*Keygroup, Database_GetKeygroupTriggerServer) error
func (UnimplementedDatabaseServer) IDs ¶
func (UnimplementedDatabaseServer) IDs(*Keygroup, Database_IDsServer) error
func (UnimplementedDatabaseServer) ReadAll ¶
func (UnimplementedDatabaseServer) ReadAll(*Keygroup, Database_ReadAllServer) error
func (UnimplementedDatabaseServer) Scan ¶
func (UnimplementedDatabaseServer) Scan(*ScanRequest, Database_ScanServer) error
func (UnimplementedDatabaseServer) Update ¶
func (UnimplementedDatabaseServer) Update(context.Context, *UpdateItem) (*Response, error)
type UnsafeDatabaseServer ¶
type UnsafeDatabaseServer interface {
// contains filtered or unexported methods
}
UnsafeDatabaseServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DatabaseServer will result in compilation errors.
type UpdateItem ¶
type UpdateItem struct { Keygroup string `protobuf:"bytes,1,opt,name=keygroup,proto3" json:"keygroup,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Val string `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` Append bool `protobuf:"varint,4,opt,name=append,proto3" json:"append,omitempty"` Expiry int64 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"` // contains filtered or unexported fields }
func (*UpdateItem) Descriptor
deprecated
func (*UpdateItem) Descriptor() ([]byte, []int)
Deprecated: Use UpdateItem.ProtoReflect.Descriptor instead.
func (*UpdateItem) GetAppend ¶
func (x *UpdateItem) GetAppend() bool
func (*UpdateItem) GetExpiry ¶
func (x *UpdateItem) GetExpiry() int64
func (*UpdateItem) GetId ¶
func (x *UpdateItem) GetId() string
func (*UpdateItem) GetKeygroup ¶
func (x *UpdateItem) GetKeygroup() string
func (*UpdateItem) GetVal ¶
func (x *UpdateItem) GetVal() string
func (*UpdateItem) ProtoMessage ¶
func (*UpdateItem) ProtoMessage()
func (*UpdateItem) ProtoReflect ¶
func (x *UpdateItem) ProtoReflect() protoreflect.Message
func (*UpdateItem) Reset ¶
func (x *UpdateItem) Reset()
func (*UpdateItem) String ¶
func (x *UpdateItem) String() string
type Val ¶
type Val struct { Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` // contains filtered or unexported fields }
func (*Val) Descriptor
deprecated
func (*Val) ProtoMessage ¶
func (*Val) ProtoMessage()
func (*Val) ProtoReflect ¶
func (x *Val) ProtoReflect() protoreflect.Message