config.pb.go 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.34.2
  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. MaskAddress string `protobuf:"bytes,7,opt,name=mask_address,json=maskAddress,proto3" json:"mask_address,omitempty"`
  74. }
  75. func (x *Config) Reset() {
  76. *x = Config{}
  77. if protoimpl.UnsafeEnabled {
  78. mi := &file_app_log_config_proto_msgTypes[0]
  79. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  80. ms.StoreMessageInfo(mi)
  81. }
  82. }
  83. func (x *Config) String() string {
  84. return protoimpl.X.MessageStringOf(x)
  85. }
  86. func (*Config) ProtoMessage() {}
  87. func (x *Config) ProtoReflect() protoreflect.Message {
  88. mi := &file_app_log_config_proto_msgTypes[0]
  89. if protoimpl.UnsafeEnabled && x != nil {
  90. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  91. if ms.LoadMessageInfo() == nil {
  92. ms.StoreMessageInfo(mi)
  93. }
  94. return ms
  95. }
  96. return mi.MessageOf(x)
  97. }
  98. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  99. func (*Config) Descriptor() ([]byte, []int) {
  100. return file_app_log_config_proto_rawDescGZIP(), []int{0}
  101. }
  102. func (x *Config) GetErrorLogType() LogType {
  103. if x != nil {
  104. return x.ErrorLogType
  105. }
  106. return LogType_None
  107. }
  108. func (x *Config) GetErrorLogLevel() log.Severity {
  109. if x != nil {
  110. return x.ErrorLogLevel
  111. }
  112. return log.Severity(0)
  113. }
  114. func (x *Config) GetErrorLogPath() string {
  115. if x != nil {
  116. return x.ErrorLogPath
  117. }
  118. return ""
  119. }
  120. func (x *Config) GetAccessLogType() LogType {
  121. if x != nil {
  122. return x.AccessLogType
  123. }
  124. return LogType_None
  125. }
  126. func (x *Config) GetAccessLogPath() string {
  127. if x != nil {
  128. return x.AccessLogPath
  129. }
  130. return ""
  131. }
  132. func (x *Config) GetEnableDnsLog() bool {
  133. if x != nil {
  134. return x.EnableDnsLog
  135. }
  136. return false
  137. }
  138. func (x *Config) GetMaskAddress() string {
  139. if x != nil {
  140. return x.MaskAddress
  141. }
  142. return ""
  143. }
  144. var File_app_log_config_proto protoreflect.FileDescriptor
  145. var file_app_log_config_proto_rawDesc = []byte{
  146. 0x0a, 0x14, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
  147. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70,
  148. 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67,
  149. 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x06, 0x43,
  150. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c,
  151. 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e,
  152. 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67,
  153. 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x79,
  154. 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f,
  155. 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x78, 0x72,
  156. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x65,
  157. 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67,
  158. 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c,
  159. 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
  160. 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x0f, 0x61,
  161. 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04,
  162. 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x2e,
  163. 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x63,
  164. 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63,
  165. 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20,
  166. 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61,
  167. 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x6e, 0x73,
  168. 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62,
  169. 0x6c, 0x65, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x73, 0x6b,
  170. 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
  171. 0x6d, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2a, 0x35, 0x0a, 0x07, 0x4c,
  172. 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00,
  173. 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a,
  174. 0x04, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74,
  175. 0x10, 0x03, 0x42, 0x46, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x61,
  176. 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
  177. 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63,
  178. 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x0c, 0x58, 0x72,
  179. 0x61, 0x79, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
  180. 0x6f, 0x33,
  181. }
  182. var (
  183. file_app_log_config_proto_rawDescOnce sync.Once
  184. file_app_log_config_proto_rawDescData = file_app_log_config_proto_rawDesc
  185. )
  186. func file_app_log_config_proto_rawDescGZIP() []byte {
  187. file_app_log_config_proto_rawDescOnce.Do(func() {
  188. file_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_log_config_proto_rawDescData)
  189. })
  190. return file_app_log_config_proto_rawDescData
  191. }
  192. var file_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  193. var file_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  194. var file_app_log_config_proto_goTypes = []any{
  195. (LogType)(0), // 0: xray.app.log.LogType
  196. (*Config)(nil), // 1: xray.app.log.Config
  197. (log.Severity)(0), // 2: xray.common.log.Severity
  198. }
  199. var file_app_log_config_proto_depIdxs = []int32{
  200. 0, // 0: xray.app.log.Config.error_log_type:type_name -> xray.app.log.LogType
  201. 2, // 1: xray.app.log.Config.error_log_level:type_name -> xray.common.log.Severity
  202. 0, // 2: xray.app.log.Config.access_log_type:type_name -> xray.app.log.LogType
  203. 3, // [3:3] is the sub-list for method output_type
  204. 3, // [3:3] is the sub-list for method input_type
  205. 3, // [3:3] is the sub-list for extension type_name
  206. 3, // [3:3] is the sub-list for extension extendee
  207. 0, // [0:3] is the sub-list for field type_name
  208. }
  209. func init() { file_app_log_config_proto_init() }
  210. func file_app_log_config_proto_init() {
  211. if File_app_log_config_proto != nil {
  212. return
  213. }
  214. if !protoimpl.UnsafeEnabled {
  215. file_app_log_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
  216. switch v := v.(*Config); i {
  217. case 0:
  218. return &v.state
  219. case 1:
  220. return &v.sizeCache
  221. case 2:
  222. return &v.unknownFields
  223. default:
  224. return nil
  225. }
  226. }
  227. }
  228. type x struct{}
  229. out := protoimpl.TypeBuilder{
  230. File: protoimpl.DescBuilder{
  231. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  232. RawDescriptor: file_app_log_config_proto_rawDesc,
  233. NumEnums: 1,
  234. NumMessages: 1,
  235. NumExtensions: 0,
  236. NumServices: 0,
  237. },
  238. GoTypes: file_app_log_config_proto_goTypes,
  239. DependencyIndexes: file_app_log_config_proto_depIdxs,
  240. EnumInfos: file_app_log_config_proto_enumTypes,
  241. MessageInfos: file_app_log_config_proto_msgTypes,
  242. }.Build()
  243. File_app_log_config_proto = out.File
  244. file_app_log_config_proto_rawDesc = nil
  245. file_app_log_config_proto_goTypes = nil
  246. file_app_log_config_proto_depIdxs = nil
  247. }