1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-18 02:16:10 -05:00
v2fly/common/net/address.pb.go

170 lines
5.2 KiB
Go
Raw Normal View History

2016-08-26 18:04:35 -04:00
// Code generated by protoc-gen-go.
2016-08-28 17:41:51 -04:00
// source: v2ray.com/core/common/net/address.proto
2016-08-26 18:04:35 -04:00
// DO NOT EDIT!
/*
Package net is a generated protocol buffer package.
It is generated from these files:
2016-08-28 17:41:51 -04:00
v2ray.com/core/common/net/address.proto
2016-09-20 04:44:44 -04:00
v2ray.com/core/common/net/destination.proto
v2ray.com/core/common/net/network.proto
2016-08-28 17:41:51 -04:00
v2ray.com/core/common/net/port.proto
2016-08-26 18:04:35 -04:00
It has these top-level messages:
2016-10-12 12:43:55 -04:00
IPOrDomain
Endpoint
2016-09-22 06:14:50 -04:00
NetworkList
2016-08-26 18:04:35 -04:00
PortRange
*/
package net
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
2016-10-12 12:43:55 -04:00
type IPOrDomain struct {
2016-08-26 18:04:35 -04:00
// Types that are valid to be assigned to Address:
2016-10-12 12:43:55 -04:00
// *IPOrDomain_Ip
// *IPOrDomain_Domain
Address isIPOrDomain_Address `protobuf_oneof:"address"`
2016-08-26 18:04:35 -04:00
}
2016-10-12 12:43:55 -04:00
func (m *IPOrDomain) Reset() { *m = IPOrDomain{} }
func (m *IPOrDomain) String() string { return proto.CompactTextString(m) }
func (*IPOrDomain) ProtoMessage() {}
func (*IPOrDomain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
2016-08-26 18:04:35 -04:00
2016-10-12 12:43:55 -04:00
type isIPOrDomain_Address interface {
isIPOrDomain_Address()
2016-08-26 18:04:35 -04:00
}
2016-10-12 12:43:55 -04:00
type IPOrDomain_Ip struct {
2016-08-26 18:04:35 -04:00
Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"`
}
2016-10-12 12:43:55 -04:00
type IPOrDomain_Domain struct {
2016-08-26 18:04:35 -04:00
Domain string `protobuf:"bytes,2,opt,name=domain,oneof"`
}
2016-10-12 12:43:55 -04:00
func (*IPOrDomain_Ip) isIPOrDomain_Address() {}
func (*IPOrDomain_Domain) isIPOrDomain_Address() {}
2016-08-26 18:04:35 -04:00
2016-10-12 12:43:55 -04:00
func (m *IPOrDomain) GetAddress() isIPOrDomain_Address {
2016-08-26 18:04:35 -04:00
if m != nil {
return m.Address
}
return nil
}
2016-10-12 12:43:55 -04:00
func (m *IPOrDomain) GetIp() []byte {
if x, ok := m.GetAddress().(*IPOrDomain_Ip); ok {
2016-08-26 18:04:35 -04:00
return x.Ip
}
return nil
}
2016-10-12 12:43:55 -04:00
func (m *IPOrDomain) GetDomain() string {
if x, ok := m.GetAddress().(*IPOrDomain_Domain); ok {
2016-08-26 18:04:35 -04:00
return x.Domain
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
2016-10-12 12:43:55 -04:00
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{}) {
return _IPOrDomain_OneofMarshaler, _IPOrDomain_OneofUnmarshaler, _IPOrDomain_OneofSizer, []interface{}{
(*IPOrDomain_Ip)(nil),
(*IPOrDomain_Domain)(nil),
2016-08-26 18:04:35 -04:00
}
}
2016-10-12 12:43:55 -04:00
func _IPOrDomain_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*IPOrDomain)
2016-08-26 18:04:35 -04:00
// address
switch x := m.Address.(type) {
2016-10-12 12:43:55 -04:00
case *IPOrDomain_Ip:
2016-08-26 18:04:35 -04:00
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeRawBytes(x.Ip)
2016-10-12 12:43:55 -04:00
case *IPOrDomain_Domain:
2016-08-26 18:04:35 -04:00
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Domain)
case nil:
default:
2016-10-12 12:43:55 -04:00
return fmt.Errorf("IPOrDomain.Address has unexpected type %T", x)
2016-08-26 18:04:35 -04:00
}
return nil
}
2016-10-12 12:43:55 -04:00
func _IPOrDomain_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*IPOrDomain)
2016-08-26 18:04:35 -04:00
switch tag {
case 1: // address.ip
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
2016-10-12 12:43:55 -04:00
m.Address = &IPOrDomain_Ip{x}
2016-08-26 18:04:35 -04:00
return true, err
case 2: // address.domain
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
2016-10-12 12:43:55 -04:00
m.Address = &IPOrDomain_Domain{x}
2016-08-26 18:04:35 -04:00
return true, err
default:
return false, nil
}
}
2016-10-12 12:43:55 -04:00
func _IPOrDomain_OneofSizer(msg proto.Message) (n int) {
m := msg.(*IPOrDomain)
2016-08-26 18:04:35 -04:00
// address
switch x := m.Address.(type) {
2016-10-12 12:43:55 -04:00
case *IPOrDomain_Ip:
2016-08-26 18:04:35 -04:00
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Ip)))
n += len(x.Ip)
2016-10-12 12:43:55 -04:00
case *IPOrDomain_Domain:
2016-08-26 18:04:35 -04:00
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Domain)))
n += len(x.Domain)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
2016-10-12 12:43:55 -04:00
proto.RegisterType((*IPOrDomain)(nil), "v2ray.core.common.net.IPOrDomain")
2016-08-26 18:04:35 -04:00
}
2016-08-28 17:41:51 -04:00
func init() { proto.RegisterFile("v2ray.com/core/common/net/address.proto", fileDescriptor0) }
2016-08-26 18:04:35 -04:00
var fileDescriptor0 = []byte{
2016-10-12 12:43:55 -04:00
// 163 bytes of a gzipped FileDescriptorProto
2016-08-28 17:41:51 -04:00
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x2f, 0x33, 0x2a, 0x4a,
0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd,
0xcf, 0xd3, 0xcf, 0x4b, 0x2d, 0xd1, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0xd6, 0x2b, 0x28,
2016-09-26 09:14:39 -04:00
0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0x29, 0x2c, 0x4a, 0xd5, 0x83, 0x28, 0xd2, 0xcb, 0x4b, 0x2d,
2016-10-12 12:43:55 -04:00
0x51, 0x72, 0xe6, 0xe2, 0xf2, 0x0c, 0xf0, 0x2f, 0x72, 0xc9, 0xcf, 0x4d, 0xcc, 0xcc, 0x13, 0x12,
0xe0, 0x62, 0xca, 0x2c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0xf1, 0x60, 0x08, 0x62, 0xca, 0x2c,
0x10, 0x92, 0xe0, 0x62, 0x4b, 0x01, 0xcb, 0x49, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x7a, 0x30, 0x04,
0x41, 0xf9, 0x4e, 0x9c, 0x5c, 0xec, 0x50, 0x1b, 0x9c, 0xf4, 0xb8, 0x24, 0x93, 0xf3, 0x73, 0xf5,
0xb0, 0xda, 0xe0, 0xc4, 0xe3, 0x08, 0x51, 0x15, 0x00, 0x72, 0x46, 0x14, 0x73, 0x5e, 0x6a, 0x49,
0x12, 0x1b, 0xd8, 0x49, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x40, 0xbb, 0x8c, 0xbd,
0x00, 0x00, 0x00,
2016-08-26 18:04:35 -04:00
}