dbpb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.dbpb.DBService",
	HandlerType: (*DBServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDB",
			Handler:    _DBService_CreateDB_Handler,
		},
		{
			MethodName: "GetAllDBs",
			Handler:    _DBService_GetAllDBs_Handler,
		},
		{
			MethodName: "GetDBInfo",
			Handler:    _DBService_GetDBInfo_Handler,
		},
		{
			MethodName: "DeleteDB",
			Handler:    _DBService_DeleteDB_Handler,
		},
		{
			MethodName: "ChangeDB",
			Handler:    _DBService_ChangeDB_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/dbpb/db.proto",
}

DBService_ServiceDesc is the grpc.ServiceDesc for DBService 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_api_v1_dbpb_db_proto protoreflect.FileDescriptor

Functions

func RegisterDBServiceServer

func RegisterDBServiceServer(s grpc.ServiceRegistrar, srv DBServiceServer)

Types

type ChangeDBRequest

type ChangeDBRequest struct {

	// Name of the requested database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// New name of the database.
	NewName string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`
	// If database name should be changed.
	ChangeName bool `protobuf:"varint,3,opt,name=change_name,json=changeName,proto3" json:"change_name,omitempty"`
	// New description of the database.
	NewDescription string `protobuf:"bytes,4,opt,name=new_description,json=newDescription,proto3" json:"new_description,omitempty"`
	// If database description should be changed.
	ChangeDescription bool `protobuf:"varint,5,opt,name=change_description,json=changeDescription,proto3" json:"change_description,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeDBRequest) Descriptor deprecated

func (*ChangeDBRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChangeDBRequest.ProtoReflect.Descriptor instead.

func (*ChangeDBRequest) GetChangeDescription

func (x *ChangeDBRequest) GetChangeDescription() bool

func (*ChangeDBRequest) GetChangeName

func (x *ChangeDBRequest) GetChangeName() bool

func (*ChangeDBRequest) GetDbName

func (x *ChangeDBRequest) GetDbName() string

func (*ChangeDBRequest) GetNewDescription

func (x *ChangeDBRequest) GetNewDescription() string

func (*ChangeDBRequest) GetNewName

func (x *ChangeDBRequest) GetNewName() string

func (*ChangeDBRequest) ProtoMessage

func (*ChangeDBRequest) ProtoMessage()

func (*ChangeDBRequest) ProtoReflect

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

func (*ChangeDBRequest) Reset

func (x *ChangeDBRequest) Reset()

func (*ChangeDBRequest) String

func (x *ChangeDBRequest) String() string

type ChangeDBResponse

type ChangeDBResponse struct {

	// Name of the changed database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeDBResponse) Descriptor deprecated

func (*ChangeDBResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChangeDBResponse.ProtoReflect.Descriptor instead.

func (*ChangeDBResponse) GetDbName

func (x *ChangeDBResponse) GetDbName() string

func (*ChangeDBResponse) ProtoMessage

func (*ChangeDBResponse) ProtoMessage()

func (*ChangeDBResponse) ProtoReflect

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

func (*ChangeDBResponse) Reset

func (x *ChangeDBResponse) Reset()

func (*ChangeDBResponse) String

func (x *ChangeDBResponse) String() string

type CreateDBRequest

type CreateDBRequest struct {

	// Name of the database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// Description of the database.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDBRequest) Descriptor deprecated

func (*CreateDBRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateDBRequest.ProtoReflect.Descriptor instead.

func (*CreateDBRequest) GetDbName

func (x *CreateDBRequest) GetDbName() string

func (*CreateDBRequest) GetDescription

func (x *CreateDBRequest) GetDescription() string

func (*CreateDBRequest) ProtoMessage

func (*CreateDBRequest) ProtoMessage()

func (*CreateDBRequest) ProtoReflect

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

func (*CreateDBRequest) Reset

func (x *CreateDBRequest) Reset()

func (*CreateDBRequest) String

func (x *CreateDBRequest) String() string

type CreateDBResponse

type CreateDBResponse struct {

	// Name of the created database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDBResponse) Descriptor deprecated

func (*CreateDBResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateDBResponse.ProtoReflect.Descriptor instead.

func (*CreateDBResponse) GetDbName

func (x *CreateDBResponse) GetDbName() string

func (*CreateDBResponse) ProtoMessage

func (*CreateDBResponse) ProtoMessage()

func (*CreateDBResponse) ProtoReflect

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

func (*CreateDBResponse) Reset

func (x *CreateDBResponse) Reset()

func (*CreateDBResponse) String

func (x *CreateDBResponse) String() string

type DBInfo

type DBInfo struct {

	// Name of the database.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// UTC timestamp when the database was created.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// UTC timestamp when the database was updated.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Size of the stored data in bytes.
	DataSize uint64 `protobuf:"varint,4,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"`
	// Number of keys in the database.
	KeyCount uint32 `protobuf:"varint,5,opt,name=key_count,json=keyCount,proto3" json:"key_count,omitempty"`
	// Description of the database.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

DBInfo represents information about a database.

func (*DBInfo) Descriptor deprecated

func (*DBInfo) Descriptor() ([]byte, []int)

Deprecated: Use DBInfo.ProtoReflect.Descriptor instead.

func (*DBInfo) GetCreatedAt

func (x *DBInfo) GetCreatedAt() *timestamppb.Timestamp

func (*DBInfo) GetDataSize

func (x *DBInfo) GetDataSize() uint64

func (*DBInfo) GetDescription

func (x *DBInfo) GetDescription() string

func (*DBInfo) GetKeyCount

func (x *DBInfo) GetKeyCount() uint32

func (*DBInfo) GetName

func (x *DBInfo) GetName() string

func (*DBInfo) GetUpdatedAt

func (x *DBInfo) GetUpdatedAt() *timestamppb.Timestamp

func (*DBInfo) ProtoMessage

func (*DBInfo) ProtoMessage()

func (*DBInfo) ProtoReflect

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

func (*DBInfo) Reset

func (x *DBInfo) Reset()

func (*DBInfo) String

func (x *DBInfo) String() string

type DBServiceClient

type DBServiceClient interface {
	// CreateDB creates a new database.
	CreateDB(ctx context.Context, in *CreateDBRequest, opts ...grpc.CallOption) (*CreateDBResponse, error)
	// GetAllDBs returns the names of all the databases that exist on the server.
	GetAllDBs(ctx context.Context, in *GetAllDBsRequest, opts ...grpc.CallOption) (*GetAllDBsResponse, error)
	// GetDBInfo returns information about a database.
	GetDBInfo(ctx context.Context, in *GetDBInfoRequest, opts ...grpc.CallOption) (*GetDBInfoResponse, error)
	// DeleteDB deletes a database.
	DeleteDB(ctx context.Context, in *DeleteDBRequest, opts ...grpc.CallOption) (*DeleteDBResponse, error)
	// ChangeDB changes the metadata of a database.
	ChangeDB(ctx context.Context, in *ChangeDBRequest, opts ...grpc.CallOption) (*ChangeDBResponse, error)
}

DBServiceClient is the client API for DBService 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 NewDBServiceClient

func NewDBServiceClient(cc grpc.ClientConnInterface) DBServiceClient

type DBServiceServer

type DBServiceServer interface {
	// CreateDB creates a new database.
	CreateDB(context.Context, *CreateDBRequest) (*CreateDBResponse, error)
	// GetAllDBs returns the names of all the databases that exist on the server.
	GetAllDBs(context.Context, *GetAllDBsRequest) (*GetAllDBsResponse, error)
	// GetDBInfo returns information about a database.
	GetDBInfo(context.Context, *GetDBInfoRequest) (*GetDBInfoResponse, error)
	// DeleteDB deletes a database.
	DeleteDB(context.Context, *DeleteDBRequest) (*DeleteDBResponse, error)
	// ChangeDB changes the metadata of a database.
	ChangeDB(context.Context, *ChangeDBRequest) (*ChangeDBResponse, error)
	// contains filtered or unexported methods
}

DBServiceServer is the server API for DBService service. All implementations must embed UnimplementedDBServiceServer for forward compatibility

type DeleteDBRequest

type DeleteDBRequest struct {

	// Name of the database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteDBRequest) Descriptor deprecated

func (*DeleteDBRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDBRequest.ProtoReflect.Descriptor instead.

func (*DeleteDBRequest) GetDbName

func (x *DeleteDBRequest) GetDbName() string

func (*DeleteDBRequest) ProtoMessage

func (*DeleteDBRequest) ProtoMessage()

func (*DeleteDBRequest) ProtoReflect

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

func (*DeleteDBRequest) Reset

func (x *DeleteDBRequest) Reset()

func (*DeleteDBRequest) String

func (x *DeleteDBRequest) String() string

type DeleteDBResponse

type DeleteDBResponse struct {

	// Name of the deleted database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteDBResponse) Descriptor deprecated

func (*DeleteDBResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDBResponse.ProtoReflect.Descriptor instead.

func (*DeleteDBResponse) GetDbName

func (x *DeleteDBResponse) GetDbName() string

func (*DeleteDBResponse) ProtoMessage

func (*DeleteDBResponse) ProtoMessage()

func (*DeleteDBResponse) ProtoReflect

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

func (*DeleteDBResponse) Reset

func (x *DeleteDBResponse) Reset()

func (*DeleteDBResponse) String

func (x *DeleteDBResponse) String() string

type GetAllDBsRequest

type GetAllDBsRequest struct {
	// contains filtered or unexported fields
}

func (*GetAllDBsRequest) Descriptor deprecated

func (*GetAllDBsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAllDBsRequest.ProtoReflect.Descriptor instead.

func (*GetAllDBsRequest) ProtoMessage

func (*GetAllDBsRequest) ProtoMessage()

func (*GetAllDBsRequest) ProtoReflect

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

func (*GetAllDBsRequest) Reset

func (x *GetAllDBsRequest) Reset()

func (*GetAllDBsRequest) String

func (x *GetAllDBsRequest) String() string

type GetAllDBsResponse

type GetAllDBsResponse struct {

	// List of returned database names.
	DbNames []string `protobuf:"bytes,1,rep,name=db_names,json=dbNames,proto3" json:"db_names,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllDBsResponse) Descriptor deprecated

func (*GetAllDBsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAllDBsResponse.ProtoReflect.Descriptor instead.

func (*GetAllDBsResponse) GetDbNames

func (x *GetAllDBsResponse) GetDbNames() []string

func (*GetAllDBsResponse) ProtoMessage

func (*GetAllDBsResponse) ProtoMessage()

func (*GetAllDBsResponse) ProtoReflect

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

func (*GetAllDBsResponse) Reset

func (x *GetAllDBsResponse) Reset()

func (*GetAllDBsResponse) String

func (x *GetAllDBsResponse) String() string

type GetDBInfoRequest

type GetDBInfoRequest struct {

	// Name of the database.
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDBInfoRequest) Descriptor deprecated

func (*GetDBInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetDBInfoRequest.ProtoReflect.Descriptor instead.

func (*GetDBInfoRequest) GetDbName

func (x *GetDBInfoRequest) GetDbName() string

func (*GetDBInfoRequest) ProtoMessage

func (*GetDBInfoRequest) ProtoMessage()

func (*GetDBInfoRequest) ProtoReflect

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

func (*GetDBInfoRequest) Reset

func (x *GetDBInfoRequest) Reset()

func (*GetDBInfoRequest) String

func (x *GetDBInfoRequest) String() string

type GetDBInfoResponse

type GetDBInfoResponse struct {

	// Information about the database.
	Data *DBInfo `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDBInfoResponse) Descriptor deprecated

func (*GetDBInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetDBInfoResponse.ProtoReflect.Descriptor instead.

func (*GetDBInfoResponse) GetData

func (x *GetDBInfoResponse) GetData() *DBInfo

func (*GetDBInfoResponse) ProtoMessage

func (*GetDBInfoResponse) ProtoMessage()

func (*GetDBInfoResponse) ProtoReflect

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

func (*GetDBInfoResponse) Reset

func (x *GetDBInfoResponse) Reset()

func (*GetDBInfoResponse) String

func (x *GetDBInfoResponse) String() string

type UnimplementedDBServiceServer

type UnimplementedDBServiceServer struct {
}

UnimplementedDBServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDBServiceServer) ChangeDB

func (UnimplementedDBServiceServer) CreateDB

func (UnimplementedDBServiceServer) DeleteDB

func (UnimplementedDBServiceServer) GetAllDBs

func (UnimplementedDBServiceServer) GetDBInfo

type UnsafeDBServiceServer

type UnsafeDBServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDBServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DBServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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