@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
// Code generated by tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode; DO NOT EDIT.
// Code generated by tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode; DO NOT EDIT.
package tailcfg
package tailcfg
import (
import (
"inet.af/netaddr"
"inet.af/netaddr"
"tailscale.com/types/dnstype"
"tailscale.com/types/opt"
"tailscale.com/types/opt"
"tailscale.com/types/structs"
"tailscale.com/types/structs"
"time"
"time"
@ -26,7 +27,7 @@ func (src *User) Clone() *User {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _UserNeedsRegeneration = User ( struct {
var _UserNeedsRegeneration = User ( struct {
ID UserID
ID UserID
LoginName string
LoginName string
@ -63,7 +64,7 @@ func (src *Node) Clone() *Node {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _NodeNeedsRegeneration = Node ( struct {
var _NodeNeedsRegeneration = Node ( struct {
ID NodeID
ID NodeID
StableID StableNodeID
StableID StableNodeID
@ -107,7 +108,7 @@ func (src *Hostinfo) Clone() *Hostinfo {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _HostinfoNeedsRegeneration = Hostinfo ( struct {
var _HostinfoNeedsRegeneration = Hostinfo ( struct {
IPNVersion string
IPNVersion string
FrontendLogID string
FrontendLogID string
@ -144,7 +145,7 @@ func (src *NetInfo) Clone() *NetInfo {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _NetInfoNeedsRegeneration = NetInfo ( struct {
var _NetInfoNeedsRegeneration = NetInfo ( struct {
MappingVariesByDestIP opt . Bool
MappingVariesByDestIP opt . Bool
HairPinning opt . Bool
HairPinning opt . Bool
@ -171,7 +172,7 @@ func (src *Login) Clone() *Login {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _LoginNeedsRegeneration = Login ( struct {
var _LoginNeedsRegeneration = Login ( struct {
_ structs . Incomparable
_ structs . Incomparable
ID LoginID
ID LoginID
@ -190,17 +191,17 @@ func (src *DNSConfig) Clone() *DNSConfig {
}
}
dst := new ( DNSConfig )
dst := new ( DNSConfig )
* dst = * src
* dst = * src
dst . Resolvers = make ( [ ] DNS Resolver, len ( src . Resolvers ) )
dst . Resolvers = make ( [ ] dnstype. Resolver, len ( src . Resolvers ) )
for i := range dst . Resolvers {
for i := range dst . Resolvers {
dst . Resolvers [ i ] = * src . Resolvers [ i ] . Clone ( )
dst . Resolvers [ i ] = * src . Resolvers [ i ] . Clone ( )
}
}
if dst . Routes != nil {
if dst . Routes != nil {
dst . Routes = map [ string ] [ ] DNS Resolver{ }
dst . Routes = map [ string ] [ ] dnstype. Resolver{ }
for k := range src . Routes {
for k := range src . Routes {
dst . Routes [ k ] = append ( [ ] DNS Resolver{ } , src . Routes [ k ] ... )
dst . Routes [ k ] = append ( [ ] dnstype. Resolver{ } , src . Routes [ k ] ... )
}
}
}
}
dst . FallbackResolvers = make ( [ ] DNS Resolver, len ( src . FallbackResolvers ) )
dst . FallbackResolvers = make ( [ ] dnstype. Resolver, len ( src . FallbackResolvers ) )
for i := range dst . FallbackResolvers {
for i := range dst . FallbackResolvers {
dst . FallbackResolvers [ i ] = * src . FallbackResolvers [ i ] . Clone ( )
dst . FallbackResolvers [ i ] = * src . FallbackResolvers [ i ] . Clone ( )
}
}
@ -212,11 +213,11 @@ func (src *DNSConfig) Clone() *DNSConfig {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DNSConfigNeedsRegeneration = DNSConfig ( struct {
var _DNSConfigNeedsRegeneration = DNSConfig ( struct {
Resolvers [ ] DNS Resolver
Resolvers [ ] dnstype. Resolver
Routes map [ string ] [ ] DNS Resolver
Routes map [ string ] [ ] dnstype. Resolver
FallbackResolvers [ ] DNS Resolver
FallbackResolvers [ ] dnstype. Resolver
Domains [ ] string
Domains [ ] string
Proxied bool
Proxied bool
Nameservers [ ] netaddr . IP
Nameservers [ ] netaddr . IP
@ -225,25 +226,6 @@ var _DNSConfigNeedsRegeneration = DNSConfig(struct {
ExtraRecords [ ] DNSRecord
ExtraRecords [ ] DNSRecord
} { } )
} { } )
// Clone makes a deep copy of DNSResolver.
// The result aliases no memory with the original.
func ( src * DNSResolver ) Clone ( ) * DNSResolver {
if src == nil {
return nil
}
dst := new ( DNSResolver )
* dst = * src
dst . BootstrapResolution = append ( src . BootstrapResolution [ : 0 : 0 ] , src . BootstrapResolution ... )
return dst
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig,DNSResolver,RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DNSResolverNeedsRegeneration = DNSResolver ( struct {
Addr string
BootstrapResolution [ ] netaddr . IP
} { } )
// Clone makes a deep copy of RegisterResponse.
// Clone makes a deep copy of RegisterResponse.
// The result aliases no memory with the original.
// The result aliases no memory with the original.
func ( src * RegisterResponse ) Clone ( ) * RegisterResponse {
func ( src * RegisterResponse ) Clone ( ) * RegisterResponse {
@ -257,7 +239,7 @@ func (src *RegisterResponse) Clone() *RegisterResponse {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _RegisterResponseNeedsRegeneration = RegisterResponse ( struct {
var _RegisterResponseNeedsRegeneration = RegisterResponse ( struct {
User User
User User
Login Login
Login Login
@ -282,7 +264,7 @@ func (src *DERPRegion) Clone() *DERPRegion {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPRegionNeedsRegeneration = DERPRegion ( struct {
var _DERPRegionNeedsRegeneration = DERPRegion ( struct {
RegionID int
RegionID int
RegionCode string
RegionCode string
@ -309,7 +291,7 @@ func (src *DERPMap) Clone() *DERPMap {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPMapNeedsRegeneration = DERPMap ( struct {
var _DERPMapNeedsRegeneration = DERPMap ( struct {
Regions map [ int ] * DERPRegion
Regions map [ int ] * DERPRegion
OmitDefaultRegions bool
OmitDefaultRegions bool
@ -327,7 +309,7 @@ func (src *DERPNode) Clone() *DERPNode {
}
}
// A compilation failure here means this code must be regenerated, with command:
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPNodeNeedsRegeneration = DERPNode ( struct {
var _DERPNodeNeedsRegeneration = DERPNode ( struct {
Name string
Name string
RegionID int
RegionID int
@ -344,7 +326,7 @@ var _DERPNodeNeedsRegeneration = DERPNode(struct {
// Clone duplicates src into dst and reports whether it succeeded.
// Clone duplicates src into dst and reports whether it succeeded.
// To succeed, <src, dst> must be of types <*T, *T> or <*T, **T>,
// To succeed, <src, dst> must be of types <*T, *T> or <*T, **T>,
// where T is one of User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode.
// where T is one of User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode.
func Clone ( dst , src interface { } ) bool {
func Clone ( dst , src interface { } ) bool {
switch src := src . ( type ) {
switch src := src . ( type ) {
case * User :
case * User :
@ -401,15 +383,6 @@ func Clone(dst, src interface{}) bool {
* dst = src . Clone ( )
* dst = src . Clone ( )
return true
return true
}
}
case * DNSResolver :
switch dst := dst . ( type ) {
case * DNSResolver :
* dst = * src . Clone ( )
return true
case * * DNSResolver :
* dst = src . Clone ( )
return true
}
case * RegisterResponse :
case * RegisterResponse :
switch dst := dst . ( type ) {
switch dst := dst . ( type ) {
case * RegisterResponse :
case * RegisterResponse :