address.pb.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. AddressPB
  13. DestinationPB
  14. PortRange
  15. */
  16. package net
  17. import proto "github.com/golang/protobuf/proto"
  18. import fmt "fmt"
  19. import math "math"
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. // A compilation error at this line likely means your copy of the
  27. // proto package needs to be updated.
  28. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  29. type AddressPB struct {
  30. // Types that are valid to be assigned to Address:
  31. // *AddressPB_Ip
  32. // *AddressPB_Domain
  33. Address isAddressPB_Address `protobuf_oneof:"address"`
  34. }
  35. func (m *AddressPB) Reset() { *m = AddressPB{} }
  36. func (m *AddressPB) String() string { return proto.CompactTextString(m) }
  37. func (*AddressPB) ProtoMessage() {}
  38. func (*AddressPB) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  39. type isAddressPB_Address interface {
  40. isAddressPB_Address()
  41. }
  42. type AddressPB_Ip struct {
  43. Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"`
  44. }
  45. type AddressPB_Domain struct {
  46. Domain string `protobuf:"bytes,2,opt,name=domain,oneof"`
  47. }
  48. func (*AddressPB_Ip) isAddressPB_Address() {}
  49. func (*AddressPB_Domain) isAddressPB_Address() {}
  50. func (m *AddressPB) GetAddress() isAddressPB_Address {
  51. if m != nil {
  52. return m.Address
  53. }
  54. return nil
  55. }
  56. func (m *AddressPB) GetIp() []byte {
  57. if x, ok := m.GetAddress().(*AddressPB_Ip); ok {
  58. return x.Ip
  59. }
  60. return nil
  61. }
  62. func (m *AddressPB) GetDomain() string {
  63. if x, ok := m.GetAddress().(*AddressPB_Domain); ok {
  64. return x.Domain
  65. }
  66. return ""
  67. }
  68. // XXX_OneofFuncs is for the internal use of the proto package.
  69. func (*AddressPB) 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{}) {
  70. return _AddressPB_OneofMarshaler, _AddressPB_OneofUnmarshaler, _AddressPB_OneofSizer, []interface{}{
  71. (*AddressPB_Ip)(nil),
  72. (*AddressPB_Domain)(nil),
  73. }
  74. }
  75. func _AddressPB_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  76. m := msg.(*AddressPB)
  77. // address
  78. switch x := m.Address.(type) {
  79. case *AddressPB_Ip:
  80. b.EncodeVarint(1<<3 | proto.WireBytes)
  81. b.EncodeRawBytes(x.Ip)
  82. case *AddressPB_Domain:
  83. b.EncodeVarint(2<<3 | proto.WireBytes)
  84. b.EncodeStringBytes(x.Domain)
  85. case nil:
  86. default:
  87. return fmt.Errorf("AddressPB.Address has unexpected type %T", x)
  88. }
  89. return nil
  90. }
  91. func _AddressPB_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  92. m := msg.(*AddressPB)
  93. switch tag {
  94. case 1: // address.ip
  95. if wire != proto.WireBytes {
  96. return true, proto.ErrInternalBadWireType
  97. }
  98. x, err := b.DecodeRawBytes(true)
  99. m.Address = &AddressPB_Ip{x}
  100. return true, err
  101. case 2: // address.domain
  102. if wire != proto.WireBytes {
  103. return true, proto.ErrInternalBadWireType
  104. }
  105. x, err := b.DecodeStringBytes()
  106. m.Address = &AddressPB_Domain{x}
  107. return true, err
  108. default:
  109. return false, nil
  110. }
  111. }
  112. func _AddressPB_OneofSizer(msg proto.Message) (n int) {
  113. m := msg.(*AddressPB)
  114. // address
  115. switch x := m.Address.(type) {
  116. case *AddressPB_Ip:
  117. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  118. n += proto.SizeVarint(uint64(len(x.Ip)))
  119. n += len(x.Ip)
  120. case *AddressPB_Domain:
  121. n += proto.SizeVarint(2<<3 | proto.WireBytes)
  122. n += proto.SizeVarint(uint64(len(x.Domain)))
  123. n += len(x.Domain)
  124. case nil:
  125. default:
  126. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  127. }
  128. return n
  129. }
  130. func init() {
  131. proto.RegisterType((*AddressPB)(nil), "com.v2ray.core.common.net.AddressPB")
  132. }
  133. func init() { proto.RegisterFile("v2ray.com/core/common/net/address.proto", fileDescriptor0) }
  134. var fileDescriptor0 = []byte{
  135. // 148 bytes of a gzipped FileDescriptorProto
  136. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x2f, 0x33, 0x2a, 0x4a,
  137. 0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd,
  138. 0xcf, 0xd3, 0xcf, 0x4b, 0x2d, 0xd1, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0xd6, 0x2b, 0x28,
  139. 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4c, 0xce, 0xcf, 0xd5, 0x83, 0x29, 0x2e, 0x4a, 0xd5, 0x83, 0x28,
  140. 0xd4, 0xcb, 0x4b, 0x2d, 0x51, 0x72, 0xe2, 0xe2, 0x74, 0x84, 0xa8, 0x0d, 0x70, 0x12, 0x12, 0xe0,
  141. 0x62, 0xca, 0x2c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0xf1, 0x60, 0x08, 0x62, 0xca, 0x2c, 0x10,
  142. 0x92, 0xe0, 0x62, 0x4b, 0xc9, 0xcf, 0x4d, 0xcc, 0xcc, 0x93, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0xf4,
  143. 0x60, 0x08, 0x82, 0xf2, 0x9d, 0x38, 0xb9, 0xd8, 0xa1, 0x96, 0x38, 0xb1, 0x46, 0x31, 0xe7, 0xa5,
  144. 0x96, 0x24, 0xb1, 0x81, 0x2d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x04, 0x63, 0x74,
  145. 0x97, 0x00, 0x00, 0x00,
  146. }