375 lines
13 KiB
Go
375 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
// versions:
|
||
// protoc-gen-go v1.30.0
|
||
// protoc (unknown)
|
||
// source: conf/v1/data.proto
|
||
|
||
package conf
|
||
|
||
import (
|
||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||
reflect "reflect"
|
||
sync "sync"
|
||
)
|
||
|
||
const (
|
||
// Verify that this generated code is sufficiently up-to-date.
|
||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||
)
|
||
|
||
// 数据
|
||
type Data struct {
|
||
state protoimpl.MessageState
|
||
sizeCache protoimpl.SizeCache
|
||
unknownFields protoimpl.UnknownFields
|
||
|
||
Database *Data_Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` // 数据库
|
||
Redis *Data_Redis `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis,omitempty"` // Redis
|
||
}
|
||
|
||
func (x *Data) Reset() {
|
||
*x = Data{}
|
||
if protoimpl.UnsafeEnabled {
|
||
mi := &file_conf_v1_data_proto_msgTypes[0]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
}
|
||
|
||
func (x *Data) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Data) ProtoMessage() {}
|
||
|
||
func (x *Data) ProtoReflect() protoreflect.Message {
|
||
mi := &file_conf_v1_data_proto_msgTypes[0]
|
||
if protoimpl.UnsafeEnabled && x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Data.ProtoReflect.Descriptor instead.
|
||
func (*Data) Descriptor() ([]byte, []int) {
|
||
return file_conf_v1_data_proto_rawDescGZIP(), []int{0}
|
||
}
|
||
|
||
func (x *Data) GetDatabase() *Data_Database {
|
||
if x != nil {
|
||
return x.Database
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Data) GetRedis() *Data_Redis {
|
||
if x != nil {
|
||
return x.Redis
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// 数据库
|
||
type Data_Database struct {
|
||
state protoimpl.MessageState
|
||
sizeCache protoimpl.SizeCache
|
||
unknownFields protoimpl.UnknownFields
|
||
|
||
Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"` // 驱动名:mysql、postgresql、mongodb、sqlite……
|
||
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // 数据源(DSN字符串)
|
||
Migrate bool `protobuf:"varint,3,opt,name=migrate,proto3" json:"migrate,omitempty"` // 数据迁移开关
|
||
}
|
||
|
||
func (x *Data_Database) Reset() {
|
||
*x = Data_Database{}
|
||
if protoimpl.UnsafeEnabled {
|
||
mi := &file_conf_v1_data_proto_msgTypes[1]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
}
|
||
|
||
func (x *Data_Database) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Data_Database) ProtoMessage() {}
|
||
|
||
func (x *Data_Database) ProtoReflect() protoreflect.Message {
|
||
mi := &file_conf_v1_data_proto_msgTypes[1]
|
||
if protoimpl.UnsafeEnabled && x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Data_Database.ProtoReflect.Descriptor instead.
|
||
func (*Data_Database) Descriptor() ([]byte, []int) {
|
||
return file_conf_v1_data_proto_rawDescGZIP(), []int{0, 0}
|
||
}
|
||
|
||
func (x *Data_Database) GetDriver() string {
|
||
if x != nil {
|
||
return x.Driver
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Data_Database) GetSource() string {
|
||
if x != nil {
|
||
return x.Source
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Data_Database) GetMigrate() bool {
|
||
if x != nil {
|
||
return x.Migrate
|
||
}
|
||
return false
|
||
}
|
||
|
||
// redis
|
||
type Data_Redis struct {
|
||
state protoimpl.MessageState
|
||
sizeCache protoimpl.SizeCache
|
||
unknownFields protoimpl.UnknownFields
|
||
|
||
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // 网络
|
||
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // 服务端地址
|
||
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // 密码
|
||
Db int32 `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"` // 数据库索引
|
||
DialTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"` // 连接超时时间
|
||
ReadTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"` // 读取超时时间
|
||
WriteTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"` // 写入超时时间
|
||
}
|
||
|
||
func (x *Data_Redis) Reset() {
|
||
*x = Data_Redis{}
|
||
if protoimpl.UnsafeEnabled {
|
||
mi := &file_conf_v1_data_proto_msgTypes[2]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
}
|
||
|
||
func (x *Data_Redis) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Data_Redis) ProtoMessage() {}
|
||
|
||
func (x *Data_Redis) ProtoReflect() protoreflect.Message {
|
||
mi := &file_conf_v1_data_proto_msgTypes[2]
|
||
if protoimpl.UnsafeEnabled && x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Data_Redis.ProtoReflect.Descriptor instead.
|
||
func (*Data_Redis) Descriptor() ([]byte, []int) {
|
||
return file_conf_v1_data_proto_rawDescGZIP(), []int{0, 1}
|
||
}
|
||
|
||
func (x *Data_Redis) GetNetwork() string {
|
||
if x != nil {
|
||
return x.Network
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Data_Redis) GetAddr() string {
|
||
if x != nil {
|
||
return x.Addr
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Data_Redis) GetPassword() string {
|
||
if x != nil {
|
||
return x.Password
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Data_Redis) GetDb() int32 {
|
||
if x != nil {
|
||
return x.Db
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Data_Redis) GetDialTimeout() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.DialTimeout
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Data_Redis) GetReadTimeout() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.ReadTimeout
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Data_Redis) GetWriteTimeout() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.WriteTimeout
|
||
}
|
||
return nil
|
||
}
|
||
|
||
var File_conf_v1_data_proto protoreflect.FileDescriptor
|
||
|
||
var file_conf_v1_data_proto_rawDesc = []byte{
|
||
0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70,
|
||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,
|
||
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61,
|
||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x03, 0x0a, 0x04, 0x44,
|
||
0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18,
|
||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74,
|
||
0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,
|
||
0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x02, 0x20,
|
||
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||
0x52, 0x65, 0x64, 0x69, 0x73, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x1a, 0x54, 0x0a, 0x08,
|
||
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76,
|
||
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72,
|
||
0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||
0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x67, 0x72,
|
||
0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x69, 0x67, 0x72, 0x61,
|
||
0x74, 0x65, 0x1a, 0x9d, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07,
|
||
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e,
|
||
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02,
|
||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
|
||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
|
||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01,
|
||
0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x3c, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74,
|
||
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
|
||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
|
||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x6d,
|
||
0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d,
|
||
0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
|
||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f,
|
||
0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
|
||
0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,
|
||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f,
|
||
0x75, 0x74, 0x42, 0x23, 0x5a, 0x21, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x62, 0x69, 0x2f,
|
||
0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f,
|
||
0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||
}
|
||
|
||
var (
|
||
file_conf_v1_data_proto_rawDescOnce sync.Once
|
||
file_conf_v1_data_proto_rawDescData = file_conf_v1_data_proto_rawDesc
|
||
)
|
||
|
||
func file_conf_v1_data_proto_rawDescGZIP() []byte {
|
||
file_conf_v1_data_proto_rawDescOnce.Do(func() {
|
||
file_conf_v1_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_conf_v1_data_proto_rawDescData)
|
||
})
|
||
return file_conf_v1_data_proto_rawDescData
|
||
}
|
||
|
||
var file_conf_v1_data_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||
var file_conf_v1_data_proto_goTypes = []interface{}{
|
||
(*Data)(nil), // 0: conf.Data
|
||
(*Data_Database)(nil), // 1: conf.Data.Database
|
||
(*Data_Redis)(nil), // 2: conf.Data.Redis
|
||
(*durationpb.Duration)(nil), // 3: google.protobuf.Duration
|
||
}
|
||
var file_conf_v1_data_proto_depIdxs = []int32{
|
||
1, // 0: conf.Data.database:type_name -> conf.Data.Database
|
||
2, // 1: conf.Data.redis:type_name -> conf.Data.Redis
|
||
3, // 2: conf.Data.Redis.dial_timeout:type_name -> google.protobuf.Duration
|
||
3, // 3: conf.Data.Redis.read_timeout:type_name -> google.protobuf.Duration
|
||
3, // 4: conf.Data.Redis.write_timeout:type_name -> google.protobuf.Duration
|
||
5, // [5:5] is the sub-list for method output_type
|
||
5, // [5:5] is the sub-list for method input_type
|
||
5, // [5:5] is the sub-list for extension type_name
|
||
5, // [5:5] is the sub-list for extension extendee
|
||
0, // [0:5] is the sub-list for field type_name
|
||
}
|
||
|
||
func init() { file_conf_v1_data_proto_init() }
|
||
func file_conf_v1_data_proto_init() {
|
||
if File_conf_v1_data_proto != nil {
|
||
return
|
||
}
|
||
if !protoimpl.UnsafeEnabled {
|
||
file_conf_v1_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||
switch v := v.(*Data); i {
|
||
case 0:
|
||
return &v.state
|
||
case 1:
|
||
return &v.sizeCache
|
||
case 2:
|
||
return &v.unknownFields
|
||
default:
|
||
return nil
|
||
}
|
||
}
|
||
file_conf_v1_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||
switch v := v.(*Data_Database); i {
|
||
case 0:
|
||
return &v.state
|
||
case 1:
|
||
return &v.sizeCache
|
||
case 2:
|
||
return &v.unknownFields
|
||
default:
|
||
return nil
|
||
}
|
||
}
|
||
file_conf_v1_data_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||
switch v := v.(*Data_Redis); i {
|
||
case 0:
|
||
return &v.state
|
||
case 1:
|
||
return &v.sizeCache
|
||
case 2:
|
||
return &v.unknownFields
|
||
default:
|
||
return nil
|
||
}
|
||
}
|
||
}
|
||
type x struct{}
|
||
out := protoimpl.TypeBuilder{
|
||
File: protoimpl.DescBuilder{
|
||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
RawDescriptor: file_conf_v1_data_proto_rawDesc,
|
||
NumEnums: 0,
|
||
NumMessages: 3,
|
||
NumExtensions: 0,
|
||
NumServices: 0,
|
||
},
|
||
GoTypes: file_conf_v1_data_proto_goTypes,
|
||
DependencyIndexes: file_conf_v1_data_proto_depIdxs,
|
||
MessageInfos: file_conf_v1_data_proto_msgTypes,
|
||
}.Build()
|
||
File_conf_v1_data_proto = out.File
|
||
file_conf_v1_data_proto_rawDesc = nil
|
||
file_conf_v1_data_proto_goTypes = nil
|
||
file_conf_v1_data_proto_depIdxs = nil
|
||
}
|