address.pb.go 5.0 KB

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