storage

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetKeygroup

func (x *Item) GetKeygroup() string

func (*Item) GetVal

func (x *Item) GetVal() string

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

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

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetId

func (x *Key) GetId() string

func (*Key) GetKeygroup

func (x *Key) GetKeygroup() string

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string

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

Deprecated: Use Keygroup.ProtoReflect.Descriptor instead.

func (*Keygroup) GetKeygroup

func (x *Keygroup) GetKeygroup() string

func (*Keygroup) ProtoMessage

func (*Keygroup) ProtoMessage()

func (*Keygroup) ProtoReflect

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

func (*Keygroup) Reset

func (x *Keygroup) Reset()

func (*Keygroup) String

func (x *Keygroup) String() string

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) GetSuccess

func (x *Response) GetSuccess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

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

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetHost

func (x *Trigger) GetHost() string

func (*Trigger) GetId

func (x *Trigger) GetId() string

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect

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

func (*Trigger) Reset

func (x *Trigger) Reset()

func (*Trigger) String

func (x *Trigger) String() string

type UnimplementedDatabaseServer

type UnimplementedDatabaseServer struct {
}

UnimplementedDatabaseServer should be embedded to have forward compatible implementations.

func (UnimplementedDatabaseServer) AddKeygroupTrigger

func (UnimplementedDatabaseServer) Append

func (UnimplementedDatabaseServer) CreateKeygroup

func (UnimplementedDatabaseServer) Delete

func (UnimplementedDatabaseServer) DeleteKeygroup

func (UnimplementedDatabaseServer) DeleteKeygroupTrigger

func (UnimplementedDatabaseServer) Exists

func (UnimplementedDatabaseServer) ExistsKeygroup

func (UnimplementedDatabaseServer) GetKeygroupTrigger

func (UnimplementedDatabaseServer) IDs

func (UnimplementedDatabaseServer) Read

func (UnimplementedDatabaseServer) ReadAll

func (UnimplementedDatabaseServer) Scan

func (UnimplementedDatabaseServer) Update

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

Deprecated: Use Val.ProtoReflect.Descriptor instead.

func (*Val) GetVal

func (x *Val) GetVal() string

func (*Val) ProtoMessage

func (*Val) ProtoMessage()

func (*Val) ProtoReflect

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

func (*Val) Reset

func (x *Val) Reset()

func (*Val) String

func (x *Val) String() string

Jump to

Keyboard shortcuts

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