config.pb.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  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. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. type LogType int32
  22. const (
  23. LogType_None LogType = 0
  24. LogType_Console LogType = 1
  25. LogType_File LogType = 2
  26. LogType_Event LogType = 3
  27. )
  28. // Enum value maps for LogType.
  29. var (
  30. LogType_name = map[int32]string{
  31. 0: "None",
  32. 1: "Console",
  33. 2: "File",
  34. 3: "Event",
  35. }
  36. LogType_value = map[string]int32{
  37. "None": 0,
  38. "Console": 1,
  39. "File": 2,
  40. "Event": 3,
  41. }
  42. )
  43. func (x LogType) Enum() *LogType {
  44. p := new(LogType)
  45. *p = x
  46. return p
  47. }
  48. func (x LogType) String() string {
  49. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  50. }
  51. func (LogType) Descriptor() protoreflect.EnumDescriptor {
  52. return file_app_log_config_proto_enumTypes[0].Descriptor()
  53. }
  54. func (LogType) Type() protoreflect.EnumType {
  55. return &file_app_log_config_proto_enumTypes[0]
  56. }
  57. func (x LogType) Number() protoreflect.EnumNumber {
  58. return protoreflect.EnumNumber(x)
  59. }
  60. // Deprecated: Use LogType.Descriptor instead.
  61. func (LogType) EnumDescriptor() ([]byte, []int) {
  62. return file_app_log_config_proto_rawDescGZIP(), []int{0}
  63. }
  64. type Config struct {
  65. state protoimpl.MessageState `protogen:"open.v1"`
  66. ErrorLogType LogType `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,proto3,enum=xray.app.log.LogType" json:"error_log_type,omitempty"`
  67. ErrorLogLevel log.Severity `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,proto3,enum=xray.common.log.Severity" json:"error_log_level,omitempty"`
  68. ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath,proto3" json:"error_log_path,omitempty"`
  69. AccessLogType LogType `protobuf:"varint,4,opt,name=access_log_type,json=accessLogType,proto3,enum=xray.app.log.LogType" json:"access_log_type,omitempty"`
  70. AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"`
  71. EnableDnsLog bool `protobuf:"varint,6,opt,name=enable_dns_log,json=enableDnsLog,proto3" json:"enable_dns_log,omitempty"`
  72. MaskAddress string `protobuf:"bytes,7,opt,name=mask_address,json=maskAddress,proto3" json:"mask_address,omitempty"`
  73. unknownFields protoimpl.UnknownFields
  74. sizeCache protoimpl.SizeCache
  75. }
  76. func (x *Config) Reset() {
  77. *x = Config{}
  78. mi := &file_app_log_config_proto_msgTypes[0]
  79. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  80. ms.StoreMessageInfo(mi)
  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 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. func (x *Config) GetMaskAddress() string {
  138. if x != nil {
  139. return x.MaskAddress
  140. }
  141. return ""
  142. }
  143. var File_app_log_config_proto protoreflect.FileDescriptor
  144. const file_app_log_config_proto_rawDesc = "" +
  145. "\n" +
  146. "\x14app/log/config.proto\x12\fxray.app.log\x1a\x14common/log/log.proto\"\xde\x02\n" +
  147. "\x06Config\x12;\n" +
  148. "\x0eerror_log_type\x18\x01 \x01(\x0e2\x15.xray.app.log.LogTypeR\ferrorLogType\x12A\n" +
  149. "\x0ferror_log_level\x18\x02 \x01(\x0e2\x19.xray.common.log.SeverityR\rerrorLogLevel\x12$\n" +
  150. "\x0eerror_log_path\x18\x03 \x01(\tR\ferrorLogPath\x12=\n" +
  151. "\x0faccess_log_type\x18\x04 \x01(\x0e2\x15.xray.app.log.LogTypeR\raccessLogType\x12&\n" +
  152. "\x0faccess_log_path\x18\x05 \x01(\tR\raccessLogPath\x12$\n" +
  153. "\x0eenable_dns_log\x18\x06 \x01(\bR\fenableDnsLog\x12!\n" +
  154. "\fmask_address\x18\a \x01(\tR\vmaskAddress*5\n" +
  155. "\aLogType\x12\b\n" +
  156. "\x04None\x10\x00\x12\v\n" +
  157. "\aConsole\x10\x01\x12\b\n" +
  158. "\x04File\x10\x02\x12\t\n" +
  159. "\x05Event\x10\x03BF\n" +
  160. "\x10com.xray.app.logP\x01Z!github.com/xtls/xray-core/app/log\xaa\x02\fXray.App.Logb\x06proto3"
  161. var (
  162. file_app_log_config_proto_rawDescOnce sync.Once
  163. file_app_log_config_proto_rawDescData []byte
  164. )
  165. func file_app_log_config_proto_rawDescGZIP() []byte {
  166. file_app_log_config_proto_rawDescOnce.Do(func() {
  167. file_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_log_config_proto_rawDesc), len(file_app_log_config_proto_rawDesc)))
  168. })
  169. return file_app_log_config_proto_rawDescData
  170. }
  171. var file_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  172. var file_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  173. var file_app_log_config_proto_goTypes = []any{
  174. (LogType)(0), // 0: xray.app.log.LogType
  175. (*Config)(nil), // 1: xray.app.log.Config
  176. (log.Severity)(0), // 2: xray.common.log.Severity
  177. }
  178. var file_app_log_config_proto_depIdxs = []int32{
  179. 0, // 0: xray.app.log.Config.error_log_type:type_name -> xray.app.log.LogType
  180. 2, // 1: xray.app.log.Config.error_log_level:type_name -> xray.common.log.Severity
  181. 0, // 2: xray.app.log.Config.access_log_type:type_name -> xray.app.log.LogType
  182. 3, // [3:3] is the sub-list for method output_type
  183. 3, // [3:3] is the sub-list for method input_type
  184. 3, // [3:3] is the sub-list for extension type_name
  185. 3, // [3:3] is the sub-list for extension extendee
  186. 0, // [0:3] is the sub-list for field type_name
  187. }
  188. func init() { file_app_log_config_proto_init() }
  189. func file_app_log_config_proto_init() {
  190. if File_app_log_config_proto != nil {
  191. return
  192. }
  193. type x struct{}
  194. out := protoimpl.TypeBuilder{
  195. File: protoimpl.DescBuilder{
  196. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  197. RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_log_config_proto_rawDesc), len(file_app_log_config_proto_rawDesc)),
  198. NumEnums: 1,
  199. NumMessages: 1,
  200. NumExtensions: 0,
  201. NumServices: 0,
  202. },
  203. GoTypes: file_app_log_config_proto_goTypes,
  204. DependencyIndexes: file_app_log_config_proto_depIdxs,
  205. EnumInfos: file_app_log_config_proto_enumTypes,
  206. MessageInfos: file_app_log_config_proto_msgTypes,
  207. }.Build()
  208. File_app_log_config_proto = out.File
  209. file_app_log_config_proto_goTypes = nil
  210. file_app_log_config_proto_depIdxs = nil
  211. }