Documentation
¶
Index ¶
- Variables
- func RegisterDBServer(s *grpc.Server, srv DBServer)
- type Archive
- func (*Archive) Descriptor() ([]byte, []int)deprecated
- func (x *Archive) GetId() string
- func (x *Archive) GetMetadata() map[string]*any.Any
- func (x *Archive) GetModel() *any.Any
- func (*Archive) ProtoMessage()
- func (x *Archive) ProtoReflect() protoreflect.Message
- func (x *Archive) Reset()
- func (x *Archive) String() string
- type ArchiveGetRequest
- func (*ArchiveGetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ArchiveGetRequest) GetAddIfNotFound() *Archive
- func (x *ArchiveGetRequest) GetId() string
- func (x *ArchiveGetRequest) GetWithLock() bool
- func (*ArchiveGetRequest) ProtoMessage()
- func (x *ArchiveGetRequest) ProtoReflect() protoreflect.Message
- func (x *ArchiveGetRequest) Reset()
- func (x *ArchiveGetRequest) String() string
- type ArchiveGetResponse
- func (*ArchiveGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ArchiveGetResponse) GetArchive() *Archive
- func (x *ArchiveGetResponse) GetToken() string
- func (*ArchiveGetResponse) ProtoMessage()
- func (x *ArchiveGetResponse) ProtoReflect() protoreflect.Message
- func (x *ArchiveGetResponse) Reset()
- func (x *ArchiveGetResponse) String() string
- type ArchiveSetRequest
- func (*ArchiveSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ArchiveSetRequest) GetArchive() *Archive
- func (x *ArchiveSetRequest) GetToken() string
- func (x *ArchiveSetRequest) GetWithUnlock() bool
- func (*ArchiveSetRequest) ProtoMessage()
- func (x *ArchiveSetRequest) ProtoReflect() protoreflect.Message
- func (x *ArchiveSetRequest) Reset()
- func (x *ArchiveSetRequest) String() string
- type ArchiveSetResponse
- func (*ArchiveSetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ArchiveSetResponse) GetArchive() *Archive
- func (*ArchiveSetResponse) ProtoMessage()
- func (x *ArchiveSetResponse) ProtoReflect() protoreflect.Message
- func (x *ArchiveSetResponse) Reset()
- func (x *ArchiveSetResponse) String() string
- type DBClient
- type DBServer
- type RegisterSchemaRequest
- func (*RegisterSchemaRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterSchemaRequest) GetDescriptorSet() *descriptor.FileDescriptorSet
- func (x *RegisterSchemaRequest) GetMessageName() string
- func (*RegisterSchemaRequest) ProtoMessage()
- func (x *RegisterSchemaRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterSchemaRequest) Reset()
- func (x *RegisterSchemaRequest) String() string
- type RegisterSchemaResponse
- func (*RegisterSchemaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterSchemaResponse) GetSchema() string
- func (*RegisterSchemaResponse) ProtoMessage()
- func (x *RegisterSchemaResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterSchemaResponse) Reset()
- func (x *RegisterSchemaResponse) String() string
- type UnimplementedDBServer
- func (*UnimplementedDBServer) GetArchive(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
- func (*UnimplementedDBServer) GetMetadata(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
- func (*UnimplementedDBServer) GetModel(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
- func (*UnimplementedDBServer) Lock(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
- func (*UnimplementedDBServer) RegisterSchema(context.Context, *RegisterSchemaRequest) (*RegisterSchemaResponse, error)
- func (*UnimplementedDBServer) SetArchive(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
- func (*UnimplementedDBServer) SetMetadata(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
- func (*UnimplementedDBServer) SetModel(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
- func (*UnimplementedDBServer) Unlock(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_dbapi_v1_archive_proto protoreflect.FileDescriptor
var File_dbapi_v1_db_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDBServer ¶
Types ¶
type Archive ¶
type Archive struct { // unique archive id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // primary archive payload Model *any.Any `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` // secondary metadata Metadata map[string]*any.Any `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Archive structure
func (*Archive) Descriptor
deprecated
func (*Archive) ProtoMessage ¶
func (*Archive) ProtoMessage()
func (*Archive) ProtoReflect ¶
func (x *Archive) ProtoReflect() protoreflect.Message
type ArchiveGetRequest ¶
type ArchiveGetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` AddIfNotFound *Archive `protobuf:"bytes,2,opt,name=add_if_not_found,json=addIfNotFound,proto3" json:"add_if_not_found,omitempty"` //string token = 10; WithLock bool `protobuf:"varint,11,opt,name=with_lock,json=withLock,proto3" json:"with_lock,omitempty"` // contains filtered or unexported fields }
All methods work around archive, so that all request and response could be the same
func (*ArchiveGetRequest) Descriptor
deprecated
func (*ArchiveGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use ArchiveGetRequest.ProtoReflect.Descriptor instead.
func (*ArchiveGetRequest) GetAddIfNotFound ¶
func (x *ArchiveGetRequest) GetAddIfNotFound() *Archive
func (*ArchiveGetRequest) GetId ¶
func (x *ArchiveGetRequest) GetId() string
func (*ArchiveGetRequest) GetWithLock ¶
func (x *ArchiveGetRequest) GetWithLock() bool
func (*ArchiveGetRequest) ProtoMessage ¶
func (*ArchiveGetRequest) ProtoMessage()
func (*ArchiveGetRequest) ProtoReflect ¶
func (x *ArchiveGetRequest) ProtoReflect() protoreflect.Message
func (*ArchiveGetRequest) Reset ¶
func (x *ArchiveGetRequest) Reset()
func (*ArchiveGetRequest) String ¶
func (x *ArchiveGetRequest) String() string
type ArchiveGetResponse ¶
type ArchiveGetResponse struct { Archive *Archive `protobuf:"bytes,1,opt,name=archive,proto3" json:"archive,omitempty"` Token string `protobuf:"bytes,10,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*ArchiveGetResponse) Descriptor
deprecated
func (*ArchiveGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use ArchiveGetResponse.ProtoReflect.Descriptor instead.
func (*ArchiveGetResponse) GetArchive ¶
func (x *ArchiveGetResponse) GetArchive() *Archive
func (*ArchiveGetResponse) GetToken ¶
func (x *ArchiveGetResponse) GetToken() string
func (*ArchiveGetResponse) ProtoMessage ¶
func (*ArchiveGetResponse) ProtoMessage()
func (*ArchiveGetResponse) ProtoReflect ¶
func (x *ArchiveGetResponse) ProtoReflect() protoreflect.Message
func (*ArchiveGetResponse) Reset ¶
func (x *ArchiveGetResponse) Reset()
func (*ArchiveGetResponse) String ¶
func (x *ArchiveGetResponse) String() string
type ArchiveSetRequest ¶
type ArchiveSetRequest struct { Archive *Archive `protobuf:"bytes,1,opt,name=archive,proto3" json:"archive,omitempty"` Token string `protobuf:"bytes,10,opt,name=token,proto3" json:"token,omitempty"` WithUnlock bool `protobuf:"varint,11,opt,name=with_unlock,json=withUnlock,proto3" json:"with_unlock,omitempty"` // contains filtered or unexported fields }
func (*ArchiveSetRequest) Descriptor
deprecated
func (*ArchiveSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use ArchiveSetRequest.ProtoReflect.Descriptor instead.
func (*ArchiveSetRequest) GetArchive ¶
func (x *ArchiveSetRequest) GetArchive() *Archive
func (*ArchiveSetRequest) GetToken ¶
func (x *ArchiveSetRequest) GetToken() string
func (*ArchiveSetRequest) GetWithUnlock ¶
func (x *ArchiveSetRequest) GetWithUnlock() bool
func (*ArchiveSetRequest) ProtoMessage ¶
func (*ArchiveSetRequest) ProtoMessage()
func (*ArchiveSetRequest) ProtoReflect ¶
func (x *ArchiveSetRequest) ProtoReflect() protoreflect.Message
func (*ArchiveSetRequest) Reset ¶
func (x *ArchiveSetRequest) Reset()
func (*ArchiveSetRequest) String ¶
func (x *ArchiveSetRequest) String() string
type ArchiveSetResponse ¶
type ArchiveSetResponse struct { Archive *Archive `protobuf:"bytes,1,opt,name=archive,proto3" json:"archive,omitempty"` // contains filtered or unexported fields }
func (*ArchiveSetResponse) Descriptor
deprecated
func (*ArchiveSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use ArchiveSetResponse.ProtoReflect.Descriptor instead.
func (*ArchiveSetResponse) GetArchive ¶
func (x *ArchiveSetResponse) GetArchive() *Archive
func (*ArchiveSetResponse) ProtoMessage ¶
func (*ArchiveSetResponse) ProtoMessage()
func (*ArchiveSetResponse) ProtoReflect ¶
func (x *ArchiveSetResponse) ProtoReflect() protoreflect.Message
func (*ArchiveSetResponse) Reset ¶
func (x *ArchiveSetResponse) Reset()
func (*ArchiveSetResponse) String ¶
func (x *ArchiveSetResponse) String() string
type DBClient ¶
type DBClient interface { RegisterSchema(ctx context.Context, in *RegisterSchemaRequest, opts ...grpc.CallOption) (*RegisterSchemaResponse, error) // lock/unlock archive mutex Lock(ctx context.Context, in *ArchiveGetRequest, opts ...grpc.CallOption) (*ArchiveGetResponse, error) Unlock(ctx context.Context, in *ArchiveSetRequest, opts ...grpc.CallOption) (*ArchiveSetResponse, error) // get/set whole archive GetArchive(ctx context.Context, in *ArchiveGetRequest, opts ...grpc.CallOption) (*ArchiveGetResponse, error) SetArchive(ctx context.Context, in *ArchiveSetRequest, opts ...grpc.CallOption) (*ArchiveSetResponse, error) // get/set archive model GetModel(ctx context.Context, in *ArchiveGetRequest, opts ...grpc.CallOption) (*ArchiveGetResponse, error) SetModel(ctx context.Context, in *ArchiveSetRequest, opts ...grpc.CallOption) (*ArchiveSetResponse, error) // get/set archive metadata GetMetadata(ctx context.Context, in *ArchiveGetRequest, opts ...grpc.CallOption) (*ArchiveGetResponse, error) SetMetadata(ctx context.Context, in *ArchiveSetRequest, opts ...grpc.CallOption) (*ArchiveSetResponse, error) }
DBClient is the client API for DB 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 NewDBClient ¶
func NewDBClient(cc grpc.ClientConnInterface) DBClient
type DBServer ¶
type DBServer interface { RegisterSchema(context.Context, *RegisterSchemaRequest) (*RegisterSchemaResponse, error) // lock/unlock archive mutex Lock(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error) Unlock(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error) // get/set whole archive GetArchive(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error) SetArchive(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error) // get/set archive model GetModel(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error) SetModel(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error) // get/set archive metadata GetMetadata(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error) SetMetadata(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error) // contains filtered or unexported methods }
DBServer is the server API for DB service. All implementations must embed UnimplementedDBServer for forward compatibility
type RegisterSchemaRequest ¶
type RegisterSchemaRequest struct { // proto file descriptor set DescriptorSet *descriptor.FileDescriptorSet `protobuf:"bytes,1,opt,name=descriptor_set,json=descriptorSet,proto3" json:"descriptor_set,omitempty"` // proto message name MessageName string `protobuf:"bytes,2,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"` // contains filtered or unexported fields }
func (*RegisterSchemaRequest) Descriptor
deprecated
func (*RegisterSchemaRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterSchemaRequest.ProtoReflect.Descriptor instead.
func (*RegisterSchemaRequest) GetDescriptorSet ¶
func (x *RegisterSchemaRequest) GetDescriptorSet() *descriptor.FileDescriptorSet
func (*RegisterSchemaRequest) GetMessageName ¶
func (x *RegisterSchemaRequest) GetMessageName() string
func (*RegisterSchemaRequest) ProtoMessage ¶
func (*RegisterSchemaRequest) ProtoMessage()
func (*RegisterSchemaRequest) ProtoReflect ¶
func (x *RegisterSchemaRequest) ProtoReflect() protoreflect.Message
func (*RegisterSchemaRequest) Reset ¶
func (x *RegisterSchemaRequest) Reset()
func (*RegisterSchemaRequest) String ¶
func (x *RegisterSchemaRequest) String() string
type RegisterSchemaResponse ¶
type RegisterSchemaResponse struct { // unique identifier for registered proto Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // contains filtered or unexported fields }
func (*RegisterSchemaResponse) Descriptor
deprecated
func (*RegisterSchemaResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterSchemaResponse.ProtoReflect.Descriptor instead.
func (*RegisterSchemaResponse) GetSchema ¶
func (x *RegisterSchemaResponse) GetSchema() string
func (*RegisterSchemaResponse) ProtoMessage ¶
func (*RegisterSchemaResponse) ProtoMessage()
func (*RegisterSchemaResponse) ProtoReflect ¶
func (x *RegisterSchemaResponse) ProtoReflect() protoreflect.Message
func (*RegisterSchemaResponse) Reset ¶
func (x *RegisterSchemaResponse) Reset()
func (*RegisterSchemaResponse) String ¶
func (x *RegisterSchemaResponse) String() string
type UnimplementedDBServer ¶
type UnimplementedDBServer struct { }
UnimplementedDBServer must be embedded to have forward compatible implementations.
func (*UnimplementedDBServer) GetArchive ¶
func (*UnimplementedDBServer) GetArchive(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
func (*UnimplementedDBServer) GetMetadata ¶
func (*UnimplementedDBServer) GetMetadata(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
func (*UnimplementedDBServer) GetModel ¶
func (*UnimplementedDBServer) GetModel(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
func (*UnimplementedDBServer) Lock ¶
func (*UnimplementedDBServer) Lock(context.Context, *ArchiveGetRequest) (*ArchiveGetResponse, error)
func (*UnimplementedDBServer) RegisterSchema ¶
func (*UnimplementedDBServer) RegisterSchema(context.Context, *RegisterSchemaRequest) (*RegisterSchemaResponse, error)
func (*UnimplementedDBServer) SetArchive ¶
func (*UnimplementedDBServer) SetArchive(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
func (*UnimplementedDBServer) SetMetadata ¶
func (*UnimplementedDBServer) SetMetadata(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
func (*UnimplementedDBServer) SetModel ¶
func (*UnimplementedDBServer) SetModel(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)
func (*UnimplementedDBServer) Unlock ¶
func (*UnimplementedDBServer) Unlock(context.Context, *ArchiveSetRequest) (*ArchiveSetResponse, error)