//go:generate go run tailscale.com/cmd/cloner --type=User,Node,Hostinfo,NetInfo,Group,Role,Capability,Login,DNSConfig,RegisterResponse --clonefunc=true --output=tailcfg_clone.go
//go:generate go run tailscale.com/cmd/cloner --type=User,Node,Hostinfo,NetInfo,Login,DNSConfig,RegisterResponse --clonefunc=true --output=tailcfg_clone.go
import(
import(
"bytes"
"bytes"
@ -66,20 +66,6 @@ func (u StableNodeID) IsZero() bool {
returnu==""
returnu==""
}
}
typeGroupIDID
func(uGroupID)IsZero()bool{
returnu==0
}
typeRoleIDID
func(uRoleID)IsZero()bool{
returnu==0
}
typeCapabilityIDID
// MachineKey is the curve25519 public key for a machine.
// MachineKey is the curve25519 public key for a machine.
typeMachineKey[32]byte
typeMachineKey[32]byte
@ -90,31 +76,6 @@ type NodeKey [32]byte
// It's never written to disk or reused between network start-ups.
// It's never written to disk or reused between network start-ups.
typeDiscoKey[32]byte
typeDiscoKey[32]byte
typeGroupstruct{
IDGroupID
Namestring
Members[]ID
}
typeRolestruct{
IDRoleID
Namestring
Capabilities[]CapabilityID
}
typeCapTypestring
const(
CapRead=CapType("read")
CapWrite=CapType("write")
)
typeCapabilitystruct{
IDCapabilityID
TypeCapType
ValID
}
// User is an IPN user.
// User is an IPN user.
//
//
// A user can have multiple logins associated with it (e.g. gmail and github oauth).
// A user can have multiple logins associated with it (e.g. gmail and github oauth).
@ -133,7 +94,6 @@ type User struct {
ProfilePicURLstring// if non-empty overrides Login field
ProfilePicURLstring// if non-empty overrides Login field
Domainstring
Domainstring
Logins[]LoginID
Logins[]LoginID
Roles[]RoleID
Createdtime.Time
Createdtime.Time
}
}
@ -200,6 +160,13 @@ type Node struct {
MachineAuthorizedbool`json:",omitempty"`// TODO(crawshaw): replace with MachineStatus
MachineAuthorizedbool`json:",omitempty"`// TODO(crawshaw): replace with MachineStatus
// Capabilities are capabilities that the node has.
// They're free-form strings, but should be in the form of URLs/URIs
// such as:
// "https://tailscale.com/cap/is-admin"
// "https://tailscale.com/cap/recv-file"
Capabilities[]string`json:",omitempty"`
// The following three computed fields hold the various names that can
// The following three computed fields hold the various names that can
// be used for this node in UIs. They are populated from controlclient
// be used for this node in UIs. They are populated from controlclient
// (not from control) by calling node.InitDisplayNames. These can be
// (not from control) by calling node.InitDisplayNames. These can be
@ -904,10 +871,6 @@ type MapResponse struct {
PacketFilter[]FilterRule
PacketFilter[]FilterRule
UserProfiles[]UserProfile// as of 1.1.541 (mapver 5): may be new or updated user profiles only
UserProfiles[]UserProfile// as of 1.1.541 (mapver 5): may be new or updated user profiles only
Roles[]Role// deprecated; clients should not rely on Roles
// TODO: Groups []Group
// TODO: Capabilities []Capability
// Debug is normally nil, except for when the control server
// Debug is normally nil, except for when the control server