github.com/kaydxh/golang@v0.0.131/pkg/logs/log.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.28.1 4 // protoc v3.13.0 5 // source: pkg/logs/log.proto 6 7 package logs 8 9 import ( 10 duration "github.com/golang/protobuf/ptypes/duration" 11 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 reflect "reflect" 14 sync "sync" 15 ) 16 17 const ( 18 // Verify that this generated code is sufficiently up-to-date. 19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 // Verify that runtime/protoimpl is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 ) 23 24 type Log_Level int32 25 26 const ( 27 Log_panic Log_Level = 0 28 Log_fatal Log_Level = 1 29 Log_error Log_Level = 2 30 Log_warn Log_Level = 3 31 Log_info Log_Level = 4 32 Log_debug Log_Level = 5 33 Log_trace Log_Level = 6 34 ) 35 36 // Enum value maps for Log_Level. 37 var ( 38 Log_Level_name = map[int32]string{ 39 0: "panic", 40 1: "fatal", 41 2: "error", 42 3: "warn", 43 4: "info", 44 5: "debug", 45 6: "trace", 46 } 47 Log_Level_value = map[string]int32{ 48 "panic": 0, 49 "fatal": 1, 50 "error": 2, 51 "warn": 3, 52 "info": 4, 53 "debug": 5, 54 "trace": 6, 55 } 56 ) 57 58 func (x Log_Level) Enum() *Log_Level { 59 p := new(Log_Level) 60 *p = x 61 return p 62 } 63 64 func (x Log_Level) String() string { 65 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 66 } 67 68 func (Log_Level) Descriptor() protoreflect.EnumDescriptor { 69 return file_pkg_logs_log_proto_enumTypes[0].Descriptor() 70 } 71 72 func (Log_Level) Type() protoreflect.EnumType { 73 return &file_pkg_logs_log_proto_enumTypes[0] 74 } 75 76 func (x Log_Level) Number() protoreflect.EnumNumber { 77 return protoreflect.EnumNumber(x) 78 } 79 80 // Deprecated: Use Log_Level.Descriptor instead. 81 func (Log_Level) EnumDescriptor() ([]byte, []int) { 82 return file_pkg_logs_log_proto_rawDescGZIP(), []int{0, 0} 83 } 84 85 type Log_Formatter int32 86 87 const ( 88 Log_text Log_Formatter = 0 89 Log_json Log_Formatter = 1 90 Log_glog Log_Formatter = 2 91 ) 92 93 // Enum value maps for Log_Formatter. 94 var ( 95 Log_Formatter_name = map[int32]string{ 96 0: "text", 97 1: "json", 98 2: "glog", 99 } 100 Log_Formatter_value = map[string]int32{ 101 "text": 0, 102 "json": 1, 103 "glog": 2, 104 } 105 ) 106 107 func (x Log_Formatter) Enum() *Log_Formatter { 108 p := new(Log_Formatter) 109 *p = x 110 return p 111 } 112 113 func (x Log_Formatter) String() string { 114 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 115 } 116 117 func (Log_Formatter) Descriptor() protoreflect.EnumDescriptor { 118 return file_pkg_logs_log_proto_enumTypes[1].Descriptor() 119 } 120 121 func (Log_Formatter) Type() protoreflect.EnumType { 122 return &file_pkg_logs_log_proto_enumTypes[1] 123 } 124 125 func (x Log_Formatter) Number() protoreflect.EnumNumber { 126 return protoreflect.EnumNumber(x) 127 } 128 129 // Deprecated: Use Log_Formatter.Descriptor instead. 130 func (Log_Formatter) EnumDescriptor() ([]byte, []int) { 131 return file_pkg_logs_log_proto_rawDescGZIP(), []int{0, 1} 132 } 133 134 type Log_Redirct int32 135 136 const ( 137 Log_stdout Log_Redirct = 0 138 Log_file Log_Redirct = 1 139 ) 140 141 // Enum value maps for Log_Redirct. 142 var ( 143 Log_Redirct_name = map[int32]string{ 144 0: "stdout", 145 1: "file", 146 } 147 Log_Redirct_value = map[string]int32{ 148 "stdout": 0, 149 "file": 1, 150 } 151 ) 152 153 func (x Log_Redirct) Enum() *Log_Redirct { 154 p := new(Log_Redirct) 155 *p = x 156 return p 157 } 158 159 func (x Log_Redirct) String() string { 160 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 161 } 162 163 func (Log_Redirct) Descriptor() protoreflect.EnumDescriptor { 164 return file_pkg_logs_log_proto_enumTypes[2].Descriptor() 165 } 166 167 func (Log_Redirct) Type() protoreflect.EnumType { 168 return &file_pkg_logs_log_proto_enumTypes[2] 169 } 170 171 func (x Log_Redirct) Number() protoreflect.EnumNumber { 172 return protoreflect.EnumNumber(x) 173 } 174 175 // Deprecated: Use Log_Redirct.Descriptor instead. 176 func (Log_Redirct) EnumDescriptor() ([]byte, []int) { 177 return file_pkg_logs_log_proto_rawDescGZIP(), []int{0, 2} 178 } 179 180 type Log struct { 181 state protoimpl.MessageState 182 sizeCache protoimpl.SizeCache 183 unknownFields protoimpl.UnknownFields 184 185 Level Log_Level `protobuf:"varint,1,opt,name=level,proto3,enum=api.v1.viper.logs.Log_Level" json:"level,omitempty"` 186 Formatter Log_Formatter `protobuf:"varint,2,opt,name=formatter,proto3,enum=api.v1.viper.logs.Log_Formatter" json:"formatter,omitempty"` 187 Filepath string `protobuf:"bytes,3,opt,name=filepath,proto3" json:"filepath,omitempty"` 188 MaxAge *duration.Duration `protobuf:"bytes,4,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` 189 MaxCount int64 `protobuf:"varint,5,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"` 190 RotateInterval *duration.Duration `protobuf:"bytes,6,opt,name=rotate_interval,json=rotateInterval,proto3" json:"rotate_interval,omitempty"` 191 RotateSize int64 `protobuf:"varint,7,opt,name=rotate_size,json=rotateSize,proto3" json:"rotate_size,omitempty"` 192 ReportCaller bool `protobuf:"varint,8,opt,name=report_caller,json=reportCaller,proto3" json:"report_caller,omitempty"` 193 EnableGoroutineId bool `protobuf:"varint,9,opt,name=enable_goroutine_id,json=enableGoroutineId,proto3" json:"enable_goroutine_id,omitempty"` 194 Redirct Log_Redirct `protobuf:"varint,10,opt,name=redirct,proto3,enum=api.v1.viper.logs.Log_Redirct" json:"redirct,omitempty"` 195 } 196 197 func (x *Log) Reset() { 198 *x = Log{} 199 if protoimpl.UnsafeEnabled { 200 mi := &file_pkg_logs_log_proto_msgTypes[0] 201 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 202 ms.StoreMessageInfo(mi) 203 } 204 } 205 206 func (x *Log) String() string { 207 return protoimpl.X.MessageStringOf(x) 208 } 209 210 func (*Log) ProtoMessage() {} 211 212 func (x *Log) ProtoReflect() protoreflect.Message { 213 mi := &file_pkg_logs_log_proto_msgTypes[0] 214 if protoimpl.UnsafeEnabled && x != nil { 215 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 216 if ms.LoadMessageInfo() == nil { 217 ms.StoreMessageInfo(mi) 218 } 219 return ms 220 } 221 return mi.MessageOf(x) 222 } 223 224 // Deprecated: Use Log.ProtoReflect.Descriptor instead. 225 func (*Log) Descriptor() ([]byte, []int) { 226 return file_pkg_logs_log_proto_rawDescGZIP(), []int{0} 227 } 228 229 func (x *Log) GetLevel() Log_Level { 230 if x != nil { 231 return x.Level 232 } 233 return Log_panic 234 } 235 236 func (x *Log) GetFormatter() Log_Formatter { 237 if x != nil { 238 return x.Formatter 239 } 240 return Log_text 241 } 242 243 func (x *Log) GetFilepath() string { 244 if x != nil { 245 return x.Filepath 246 } 247 return "" 248 } 249 250 func (x *Log) GetMaxAge() *duration.Duration { 251 if x != nil { 252 return x.MaxAge 253 } 254 return nil 255 } 256 257 func (x *Log) GetMaxCount() int64 { 258 if x != nil { 259 return x.MaxCount 260 } 261 return 0 262 } 263 264 func (x *Log) GetRotateInterval() *duration.Duration { 265 if x != nil { 266 return x.RotateInterval 267 } 268 return nil 269 } 270 271 func (x *Log) GetRotateSize() int64 { 272 if x != nil { 273 return x.RotateSize 274 } 275 return 0 276 } 277 278 func (x *Log) GetReportCaller() bool { 279 if x != nil { 280 return x.ReportCaller 281 } 282 return false 283 } 284 285 func (x *Log) GetEnableGoroutineId() bool { 286 if x != nil { 287 return x.EnableGoroutineId 288 } 289 return false 290 } 291 292 func (x *Log) GetRedirct() Log_Redirct { 293 if x != nil { 294 return x.Redirct 295 } 296 return Log_stdout 297 } 298 299 var File_pkg_logs_log_proto protoreflect.FileDescriptor 300 301 var file_pkg_logs_log_proto_rawDesc = []byte{ 302 0x0a, 0x12, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 303 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x76, 0x69, 0x70, 304 0x65, 0x72, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 305 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 306 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x04, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 307 0x32, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 308 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x76, 0x69, 0x70, 0x65, 0x72, 0x2e, 0x6c, 0x6f, 309 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 310 0x76, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 311 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 312 0x76, 0x69, 0x70, 0x65, 0x72, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x2e, 0x46, 313 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 314 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 315 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 316 0x32, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 317 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 318 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6d, 0x61, 0x78, 319 0x41, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 320 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 321 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 322 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 323 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 324 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 325 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 326 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x6f, 0x74, 0x61, 0x74, 327 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 328 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 329 0x70, 0x6f, 0x72, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x6e, 330 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x5f, 0x69, 331 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x47, 332 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 333 0x64, 0x69, 0x72, 0x63, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 334 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x76, 0x69, 0x70, 0x65, 0x72, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 335 0x4c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x63, 0x74, 0x52, 0x07, 0x72, 0x65, 0x64, 336 0x69, 0x72, 0x63, 0x74, 0x22, 0x52, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 337 0x05, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x66, 0x61, 0x74, 0x61, 338 0x6c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x08, 339 0x0a, 0x04, 0x77, 0x61, 0x72, 0x6e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 340 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x10, 0x05, 0x12, 0x09, 0x0a, 341 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x10, 0x06, 0x22, 0x29, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x6d, 342 0x61, 0x74, 0x74, 0x65, 0x72, 0x12, 0x08, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 343 0x08, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6c, 0x6f, 344 0x67, 0x10, 0x02, 0x22, 0x1f, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x69, 0x72, 0x63, 0x74, 0x12, 0x0a, 345 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x66, 0x69, 346 0x6c, 0x65, 0x10, 0x01, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 347 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x79, 0x64, 0x78, 0x68, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 348 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3b, 0x6c, 0x6f, 0x67, 0x73, 0x62, 0x06, 349 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 350 } 351 352 var ( 353 file_pkg_logs_log_proto_rawDescOnce sync.Once 354 file_pkg_logs_log_proto_rawDescData = file_pkg_logs_log_proto_rawDesc 355 ) 356 357 func file_pkg_logs_log_proto_rawDescGZIP() []byte { 358 file_pkg_logs_log_proto_rawDescOnce.Do(func() { 359 file_pkg_logs_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_logs_log_proto_rawDescData) 360 }) 361 return file_pkg_logs_log_proto_rawDescData 362 } 363 364 var file_pkg_logs_log_proto_enumTypes = make([]protoimpl.EnumInfo, 3) 365 var file_pkg_logs_log_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 366 var file_pkg_logs_log_proto_goTypes = []interface{}{ 367 (Log_Level)(0), // 0: api.v1.viper.logs.Log.Level 368 (Log_Formatter)(0), // 1: api.v1.viper.logs.Log.Formatter 369 (Log_Redirct)(0), // 2: api.v1.viper.logs.Log.Redirct 370 (*Log)(nil), // 3: api.v1.viper.logs.Log 371 (*duration.Duration)(nil), // 4: google.protobuf.Duration 372 } 373 var file_pkg_logs_log_proto_depIdxs = []int32{ 374 0, // 0: api.v1.viper.logs.Log.level:type_name -> api.v1.viper.logs.Log.Level 375 1, // 1: api.v1.viper.logs.Log.formatter:type_name -> api.v1.viper.logs.Log.Formatter 376 4, // 2: api.v1.viper.logs.Log.max_age:type_name -> google.protobuf.Duration 377 4, // 3: api.v1.viper.logs.Log.rotate_interval:type_name -> google.protobuf.Duration 378 2, // 4: api.v1.viper.logs.Log.redirct:type_name -> api.v1.viper.logs.Log.Redirct 379 5, // [5:5] is the sub-list for method output_type 380 5, // [5:5] is the sub-list for method input_type 381 5, // [5:5] is the sub-list for extension type_name 382 5, // [5:5] is the sub-list for extension extendee 383 0, // [0:5] is the sub-list for field type_name 384 } 385 386 func init() { file_pkg_logs_log_proto_init() } 387 func file_pkg_logs_log_proto_init() { 388 if File_pkg_logs_log_proto != nil { 389 return 390 } 391 if !protoimpl.UnsafeEnabled { 392 file_pkg_logs_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 393 switch v := v.(*Log); i { 394 case 0: 395 return &v.state 396 case 1: 397 return &v.sizeCache 398 case 2: 399 return &v.unknownFields 400 default: 401 return nil 402 } 403 } 404 } 405 type x struct{} 406 out := protoimpl.TypeBuilder{ 407 File: protoimpl.DescBuilder{ 408 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 409 RawDescriptor: file_pkg_logs_log_proto_rawDesc, 410 NumEnums: 3, 411 NumMessages: 1, 412 NumExtensions: 0, 413 NumServices: 0, 414 }, 415 GoTypes: file_pkg_logs_log_proto_goTypes, 416 DependencyIndexes: file_pkg_logs_log_proto_depIdxs, 417 EnumInfos: file_pkg_logs_log_proto_enumTypes, 418 MessageInfos: file_pkg_logs_log_proto_msgTypes, 419 }.Build() 420 File_pkg_logs_log_proto = out.File 421 file_pkg_logs_log_proto_rawDesc = nil 422 file_pkg_logs_log_proto_goTypes = nil 423 file_pkg_logs_log_proto_depIdxs = nil 424 }