Redis cache

This commit is contained in:
2025-03-29 02:24:15 +08:00
parent f3f9ebb5af
commit 1651328a74
26 changed files with 786 additions and 636 deletions

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.1
// protoc v5.28.3
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: database.proto
package proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -21,11 +22,10 @@ const (
)
type AllocDatabaseRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *AllocDatabaseRequest) Reset() {
@@ -66,12 +66,11 @@ func (x *AllocDatabaseRequest) GetName() string {
}
type AllocDatabaseResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
Dsn string `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
unknownFields protoimpl.UnknownFields
IsSuccess bool `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
Dsn string `protobuf:"bytes,2,opt,name=dsn,proto3" json:"dsn,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *AllocDatabaseResponse) Reset() {
@@ -120,34 +119,26 @@ func (x *AllocDatabaseResponse) GetDsn() string {
var File_database_proto protoreflect.FileDescriptor
var file_database_proto_rawDesc = []byte{
0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x14, 0x41, 0x6c, 0x6c, 0x6f, 0x63,
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x48, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61,
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64,
0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x32, 0x5f, 0x0a,
0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x4c, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44,
0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x44, 0x61, 0x74, 0x61,
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09,
0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
const file_database_proto_rawDesc = "" +
"\n" +
"\x0edatabase.proto\x12\x05proto\"*\n" +
"\x14AllocDatabaseRequest\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\"H\n" +
"\x15AllocDatabaseResponse\x12\x1d\n" +
"\n" +
"is_success\x18\x01 \x01(\bR\tisSuccess\x12\x10\n" +
"\x03dsn\x18\x02 \x01(\tR\x03dsn2_\n" +
"\x0fDatabaseService\x12L\n" +
"\rAllocDatabase\x12\x1b.proto.AllocDatabaseRequest\x1a\x1c.proto.AllocDatabaseResponse\"\x00B\tZ\a.;protob\x06proto3"
var (
file_database_proto_rawDescOnce sync.Once
file_database_proto_rawDescData = file_database_proto_rawDesc
file_database_proto_rawDescData []byte
)
func file_database_proto_rawDescGZIP() []byte {
file_database_proto_rawDescOnce.Do(func() {
file_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_database_proto_rawDescData)
file_database_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_database_proto_rawDesc), len(file_database_proto_rawDesc)))
})
return file_database_proto_rawDescData
}
@@ -176,7 +167,7 @@ func file_database_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_database_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_database_proto_rawDesc), len(file_database_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
@@ -187,7 +178,6 @@ func file_database_proto_init() {
MessageInfos: file_database_proto_msgTypes,
}.Build()
File_database_proto = out.File
file_database_proto_rawDesc = nil
file_database_proto_goTypes = nil
file_database_proto_depIdxs = nil
}