config.pb.go 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.34.1
  4. // protoc v5.27.0
  5. // source: app/log/config.proto
  6. package log
  7. import (
  8. log "github.com/xtls/xray-core/common/log"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. type LogType int32
  21. const (
  22. LogType_None LogType = 0
  23. LogType_Console LogType = 1
  24. LogType_File LogType = 2
  25. LogType_Event LogType = 3
  26. )
  27. // Enum value maps for LogType.
  28. var (
  29. LogType_name = map[int32]string{
  30. 0: "None",
  31. 1: "Console",
  32. 2: "File",
  33. 3: "Event",
  34. }
  35. LogType_value = map[string]int32{
  36. "None": 0,
  37. "Console": 1,
  38. "File": 2,
  39. "Event": 3,
  40. }
  41. )
  42. func (x LogType) Enum() *LogType {
  43. p := new(LogType)
  44. *p = x
  45. return p
  46. }
  47. func (x LogType) String() string {
  48. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  49. }
  50. func (LogType) Descriptor() protoreflect.EnumDescriptor {
  51. return file_app_log_config_proto_enumTypes[0].Descriptor()
  52. }
  53. func (LogType) Type() protoreflect.EnumType {
  54. return &file_app_log_config_proto_enumTypes[0]
  55. }
  56. func (x LogType) Number() protoreflect.EnumNumber {
  57. return protoreflect.EnumNumber(x)
  58. }
  59. // Deprecated: Use LogType.Descriptor instead.
  60. func (LogType) EnumDescriptor() ([]byte, []int) {
  61. return file_app_log_config_proto_rawDescGZIP(), []int{0}
  62. }
  63. type Config struct {
  64. state protoimpl.MessageState
  65. sizeCache protoimpl.SizeCache
  66. unknownFields protoimpl.UnknownFields
  67. ErrorLogType LogType `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,proto3,enum=xray.app.log.LogType" json:"error_log_type,omitempty"`
  68. ErrorLogLevel log.Severity `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,proto3,enum=xray.common.log.Severity" json:"error_log_level,omitempty"`
  69. ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath,proto3" json:"error_log_path,omitempty"`
  70. AccessLogType LogType `protobuf:"varint,4,opt,name=access_log_type,json=accessLogType,proto3,enum=xray.app.log.LogType" json:"access_log_type,omitempty"`
  71. AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"`
  72. EnableDnsLog bool `protobuf:"varint,6,opt,name=enable_dns_log,json=enableDnsLog,proto3" json:"enable_dns_log,omitempty"`
  73. }
  74. func (x *Config) Reset() {
  75. *x = Config{}
  76. if protoimpl.UnsafeEnabled {
  77. mi := &file_app_log_config_proto_msgTypes[0]
  78. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  79. ms.StoreMessageInfo(mi)
  80. }
  81. }
  82. func (x *Config) String() string {
  83. return protoimpl.X.MessageStringOf(x)
  84. }
  85. func (*Config) ProtoMessage() {}
  86. func (x *Config) ProtoReflect() protoreflect.Message {
  87. mi := &file_app_log_config_proto_msgTypes[0]
  88. if protoimpl.UnsafeEnabled && x != nil {
  89. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  90. if ms.LoadMessageInfo() == nil {
  91. ms.StoreMessageInfo(mi)
  92. }
  93. return ms
  94. }
  95. return mi.MessageOf(x)
  96. }
  97. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  98. func (*Config) Descriptor() ([]byte, []int) {
  99. return file_app_log_config_proto_rawDescGZIP(), []int{0}
  100. }
  101. func (x *Config) GetErrorLogType() LogType {
  102. if x != nil {
  103. return x.ErrorLogType
  104. }
  105. return LogType_None
  106. }
  107. func (x *Config) GetErrorLogLevel() log.Severity {
  108. if x != nil {
  109. return x.ErrorLogLevel
  110. }
  111. return log.Severity(0)
  112. }
  113. func (x *Config) GetErrorLogPath() string {
  114. if x != nil {
  115. return x.ErrorLogPath
  116. }
  117. return ""
  118. }
  119. func (x *Config) GetAccessLogType() LogType {
  120. if x != nil {
  121. return x.AccessLogType
  122. }
  123. return LogType_None
  124. }
  125. func (x *Config) GetAccessLogPath() string {
  126. if x != nil {
  127. return x.AccessLogPath
  128. }
  129. return ""
  130. }
  131. func (x *Config) GetEnableDnsLog() bool {
  132. if x != nil {
  133. return x.EnableDnsLog
  134. }
  135. return false
  136. }
  137. var File_app_log_config_proto protoreflect.FileDescriptor
  138. var file_app_log_config_proto_rawDesc = []byte{
  139. 0x0a, 0x14, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
  140. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
  141. 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67,
  142. 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x02, 0x0a, 0x06, 0x43,
  143. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c,
  144. 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e,
  145. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67,
  146. 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x79,
  147. 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f,
  148. 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x78, 0x72,
  149. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x65,
  150. 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67,
  151. 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c,
  152. 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
  153. 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x61,
  154. 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04,
  155. 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  156. 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x63,
  157. 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63,
  158. 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20,
  159. 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61,
  160. 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x6e, 0x73,
  161. 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62,
  162. 0x6c, 0x65, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x2a, 0x35, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x54,
  163. 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a,
  164. 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69,
  165. 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x03, 0x42,
  166. 0x46, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  167. 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
  168. 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65,
  169. 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x0c, 0x58, 0x72, 0x61, 0x79, 0x2e,
  170. 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  171. }
  172. var (
  173. file_app_log_config_proto_rawDescOnce sync.Once
  174. file_app_log_config_proto_rawDescData = file_app_log_config_proto_rawDesc
  175. )
  176. func file_app_log_config_proto_rawDescGZIP() []byte {
  177. file_app_log_config_proto_rawDescOnce.Do(func() {
  178. file_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_log_config_proto_rawDescData)
  179. })
  180. return file_app_log_config_proto_rawDescData
  181. }
  182. var file_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  183. var file_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  184. var file_app_log_config_proto_goTypes = []interface{}{
  185. (LogType)(0), // 0: xray.app.log.LogType
  186. (*Config)(nil), // 1: xray.app.log.Config
  187. (log.Severity)(0), // 2: xray.common.log.Severity
  188. }
  189. var file_app_log_config_proto_depIdxs = []int32{
  190. 0, // 0: xray.app.log.Config.error_log_type:type_name -> xray.app.log.LogType
  191. 2, // 1: xray.app.log.Config.error_log_level:type_name -> xray.common.log.Severity
  192. 0, // 2: xray.app.log.Config.access_log_type:type_name -> xray.app.log.LogType
  193. 3, // [3:3] is the sub-list for method output_type
  194. 3, // [3:3] is the sub-list for method input_type
  195. 3, // [3:3] is the sub-list for extension type_name
  196. 3, // [3:3] is the sub-list for extension extendee
  197. 0, // [0:3] is the sub-list for field type_name
  198. }
  199. func init() { file_app_log_config_proto_init() }
  200. func file_app_log_config_proto_init() {
  201. if File_app_log_config_proto != nil {
  202. return
  203. }
  204. if !protoimpl.UnsafeEnabled {
  205. file_app_log_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  206. switch v := v.(*Config); i {
  207. case 0:
  208. return &v.state
  209. case 1:
  210. return &v.sizeCache
  211. case 2:
  212. return &v.unknownFields
  213. default:
  214. return nil
  215. }
  216. }
  217. }
  218. type x struct{}
  219. out := protoimpl.TypeBuilder{
  220. File: protoimpl.DescBuilder{
  221. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  222. RawDescriptor: file_app_log_config_proto_rawDesc,
  223. NumEnums: 1,
  224. NumMessages: 1,
  225. NumExtensions: 0,
  226. NumServices: 0,
  227. },
  228. GoTypes: file_app_log_config_proto_goTypes,
  229. DependencyIndexes: file_app_log_config_proto_depIdxs,
  230. EnumInfos: file_app_log_config_proto_enumTypes,
  231. MessageInfos: file_app_log_config_proto_msgTypes,
  232. }.Build()
  233. File_app_log_config_proto = out.File
  234. file_app_log_config_proto_rawDesc = nil
  235. file_app_log_config_proto_goTypes = nil
  236. file_app_log_config_proto_depIdxs = nil
  237. }