address.pb.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // Code generated by protoc-gen-go.
  2. // source: v2ray.com/core/common/net/address.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package net is a generated protocol buffer package.
  6. It is generated from these files:
  7. v2ray.com/core/common/net/address.proto
  8. v2ray.com/core/common/net/destination.proto
  9. v2ray.com/core/common/net/network.proto
  10. v2ray.com/core/common/net/port.proto
  11. It has these top-level messages:
  12. IPOrDomain
  13. Endpoint
  14. NetworkList
  15. PortRange
  16. */
  17. package net
  18. import proto "github.com/golang/protobuf/proto"
  19. import fmt "fmt"
  20. import math "math"
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. // This is a compile-time assertion to ensure that this generated file
  26. // is compatible with the proto package it is being compiled against.
  27. // A compilation error at this line likely means your copy of the
  28. // proto package needs to be updated.
  29. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  30. type IPOrDomain struct {
  31. // Types that are valid to be assigned to Address:
  32. // *IPOrDomain_Ip
  33. // *IPOrDomain_Domain
  34. Address isIPOrDomain_Address `protobuf_oneof:"address"`
  35. }
  36. func (m *IPOrDomain) Reset() { *m = IPOrDomain{} }
  37. func (m *IPOrDomain) String() string { return proto.CompactTextString(m) }
  38. func (*IPOrDomain) ProtoMessage() {}
  39. func (*IPOrDomain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  40. type isIPOrDomain_Address interface {
  41. isIPOrDomain_Address()
  42. }
  43. type IPOrDomain_Ip struct {
  44. Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"`
  45. }
  46. type IPOrDomain_Domain struct {
  47. Domain string `protobuf:"bytes,2,opt,name=domain,oneof"`
  48. }
  49. func (*IPOrDomain_Ip) isIPOrDomain_Address() {}
  50. func (*IPOrDomain_Domain) isIPOrDomain_Address() {}
  51. func (m *IPOrDomain) GetAddress() isIPOrDomain_Address {
  52. if m != nil {
  53. return m.Address
  54. }
  55. return nil
  56. }
  57. func (m *IPOrDomain) GetIp() []byte {
  58. if x, ok := m.GetAddress().(*IPOrDomain_Ip); ok {
  59. return x.Ip
  60. }
  61. return nil
  62. }
  63. func (m *IPOrDomain) GetDomain() string {
  64. if x, ok := m.GetAddress().(*IPOrDomain_Domain); ok {
  65. return x.Domain
  66. }
  67. return ""
  68. }
  69. // XXX_OneofFuncs is for the internal use of the proto package.
  70. func (*IPOrDomain) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  71. return _IPOrDomain_OneofMarshaler, _IPOrDomain_OneofUnmarshaler, _IPOrDomain_OneofSizer, []interface{}{
  72. (*IPOrDomain_Ip)(nil),
  73. (*IPOrDomain_Domain)(nil),
  74. }
  75. }
  76. func _IPOrDomain_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  77. m := msg.(*IPOrDomain)
  78. // address
  79. switch x := m.Address.(type) {
  80. case *IPOrDomain_Ip:
  81. b.EncodeVarint(1<<3 | proto.WireBytes)
  82. b.EncodeRawBytes(x.Ip)
  83. case *IPOrDomain_Domain:
  84. b.EncodeVarint(2<<3 | proto.WireBytes)
  85. b.EncodeStringBytes(x.Domain)
  86. case nil:
  87. default:
  88. return fmt.Errorf("IPOrDomain.Address has unexpected type %T", x)
  89. }
  90. return nil
  91. }
  92. func _IPOrDomain_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  93. m := msg.(*IPOrDomain)
  94. switch tag {
  95. case 1: // address.ip
  96. if wire != proto.WireBytes {
  97. return true, proto.ErrInternalBadWireType
  98. }
  99. x, err := b.DecodeRawBytes(true)
  100. m.Address = &IPOrDomain_Ip{x}
  101. return true, err
  102. case 2: // address.domain
  103. if wire != proto.WireBytes {
  104. return true, proto.ErrInternalBadWireType
  105. }
  106. x, err := b.DecodeStringBytes()
  107. m.Address = &IPOrDomain_Domain{x}
  108. return true, err
  109. default:
  110. return false, nil
  111. }
  112. }
  113. func _IPOrDomain_OneofSizer(msg proto.Message) (n int) {
  114. m := msg.(*IPOrDomain)
  115. // address
  116. switch x := m.Address.(type) {
  117. case *IPOrDomain_Ip:
  118. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  119. n += proto.SizeVarint(uint64(len(x.Ip)))
  120. n += len(x.Ip)
  121. case *IPOrDomain_Domain:
  122. n += proto.SizeVarint(2<<3 | proto.WireBytes)
  123. n += proto.SizeVarint(uint64(len(x.Domain)))
  124. n += len(x.Domain)
  125. case nil:
  126. default:
  127. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  128. }
  129. return n
  130. }
  131. func init() {
  132. proto.RegisterType((*IPOrDomain)(nil), "v2ray.core.common.net.IPOrDomain")
  133. }
  134. func init() { proto.RegisterFile("v2ray.com/core/common/net/address.proto", fileDescriptor0) }
  135. var fileDescriptor0 = []byte{
  136. // 181 bytes of a gzipped FileDescriptorProto
  137. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x2f, 0x33, 0x2a, 0x4a,
  138. 0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd,
  139. 0xcf, 0xd3, 0xcf, 0x4b, 0x2d, 0xd1, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0xd6, 0x2b, 0x28,
  140. 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0x29, 0x2c, 0x4a, 0xd5, 0x83, 0x28, 0xd2, 0xcb, 0x4b, 0x2d,
  141. 0x51, 0x72, 0xe6, 0xe2, 0xf2, 0x0c, 0xf0, 0x2f, 0x72, 0xc9, 0xcf, 0x4d, 0xcc, 0xcc, 0x13, 0x12,
  142. 0xe0, 0x62, 0xca, 0x2c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0xf1, 0x60, 0x08, 0x62, 0xca, 0x2c,
  143. 0x10, 0x92, 0xe0, 0x62, 0x4b, 0x01, 0xcb, 0x49, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x7a, 0x30, 0x04,
  144. 0x41, 0xf9, 0x4e, 0x9c, 0x5c, 0xec, 0x50, 0x1b, 0x9c, 0xdc, 0xb8, 0x24, 0x93, 0xf3, 0x73, 0xf5,
  145. 0xb0, 0xda, 0xe0, 0xc4, 0xe3, 0x08, 0x51, 0x15, 0x00, 0x72, 0x46, 0x14, 0x73, 0x5e, 0x6a, 0xc9,
  146. 0x2a, 0x26, 0xd1, 0x30, 0xa3, 0xa0, 0xc4, 0x4a, 0x3d, 0x67, 0x90, 0x52, 0x67, 0x88, 0x52, 0xbf,
  147. 0xd4, 0x92, 0x24, 0x36, 0xb0, 0x53, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x8a, 0x6d,
  148. 0x70, 0xd5, 0x00, 0x00, 0x00,
  149. }