Update
This commit is contained in:
1 parent
3530afb854
commit
6903fcff27
2146 files changed
+112256
-190703
No files matched your search
+61
-23
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by tailscale/cmd/viewer; DO NOT EDIT.
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
jsonv2 "github.com/go-json-experiment/json"
|
||||
"github.com/go-json-experiment/json/jsontext"
|
||||
"tailscale.com/tailcfg/nodecap"
|
||||
"tailscale.com/types/dnstype"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/opt"
|
||||
@@ -230,7 +231,7 @@ func (v NodeView) LegacyDERPString() string { return v.ж.LegacyDERPString }
|
||||
//
|
||||
// HomeDERP may be zero if not (yet) known, but ideally always be non-zero
|
||||
// for magicsock connectivity to function normally.
|
||||
func (v NodeView) HomeDERP() int { return v.ж.HomeDERP }
|
||||
func (v NodeView) HomeDERP() DERPRegionID { return v.ж.HomeDERP }
|
||||
func (v NodeView) Hostinfo() HostinfoView { return v.ж.Hostinfo }
|
||||
func (v NodeView) Created() time.Time { return v.ж.Created }
|
||||
|
||||
@@ -277,7 +278,7 @@ func (v NodeView) MachineAuthorized() bool { return v.ж.MachineAuthorized }
|
||||
// "https://tailscale.com/cap/file-sharing"
|
||||
//
|
||||
// Deprecated: use CapMap instead. See https://github.com/tailscale/tailscale/issues/11508
|
||||
func (v NodeView) Capabilities() views.Slice[NodeCapability] { return views.SliceOf(v.ж.Capabilities) }
|
||||
func (v NodeView) Capabilities() views.Slice[nodecap.Cap] { return views.SliceOf(v.ж.Capabilities) }
|
||||
|
||||
// CapMap is a map of capabilities to their optional argument/data values.
|
||||
//
|
||||
@@ -288,7 +289,7 @@ func (v NodeView) Capabilities() views.Slice[NodeCapability] { return views.Slic
|
||||
// represented by the Capabilities field, but can now be represented by
|
||||
// CapMap with an empty value.
|
||||
//
|
||||
// See NodeCapability for more information on keys.
|
||||
// See [nodecap.Cap] for more information on keys.
|
||||
//
|
||||
// Metadata about nodes can be transmitted in 3 ways:
|
||||
// 1. MapResponse.Node.CapMap describes attributes that affect behavior for
|
||||
@@ -299,7 +300,7 @@ func (v NodeView) Capabilities() views.Slice[NodeCapability] { return views.Slic
|
||||
// 3. MapResponse.Peers[].CapMap describes attributes regarding a peer node,
|
||||
// such as which features the peer supports or if that peer is preferred
|
||||
// for a particular task vs other peers that could also be chosen.
|
||||
func (v NodeView) CapMap() views.MapSlice[NodeCapability, RawMessage] {
|
||||
func (v NodeView) CapMap() views.MapSlice[nodecap.Cap, RawMessage] {
|
||||
return views.MapSliceOf(v.ж.CapMap)
|
||||
}
|
||||
|
||||
@@ -375,7 +376,14 @@ func (v NodeView) IsJailed() bool { return v.ж.IsJailed }
|
||||
func (v NodeView) ExitNodeDNSResolvers() views.SliceView[*dnstype.Resolver, dnstype.ResolverView] {
|
||||
return views.SliceOfViews[*dnstype.Resolver, dnstype.ResolverView](v.ж.ExitNodeDNSResolvers)
|
||||
}
|
||||
func (v NodeView) Equal(v2 NodeView) bool { return v.ж.Equal(v2.ж) }
|
||||
|
||||
// StableTailnetID is the identifier of the tailnet this node is a
|
||||
// member of.
|
||||
//
|
||||
// Control only populates this for the self node in a MapResponse
|
||||
// (MapResponse.Node); it is empty for peers.
|
||||
func (v NodeView) StableTailnetID() StableTailnetID { return v.ж.StableTailnetID }
|
||||
func (v NodeView) Equal(v2 NodeView) bool { return v.ж.Equal(v2.ж) }
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _NodeViewNeedsRegeneration = Node(struct {
|
||||
@@ -393,7 +401,7 @@ var _NodeViewNeedsRegeneration = Node(struct {
|
||||
AllowedIPs []netip.Prefix
|
||||
Endpoints []netip.AddrPort
|
||||
LegacyDERPString string
|
||||
HomeDERP int
|
||||
HomeDERP DERPRegionID
|
||||
Hostinfo HostinfoView
|
||||
Created time.Time
|
||||
Cap CapabilityVersion
|
||||
@@ -402,7 +410,7 @@ var _NodeViewNeedsRegeneration = Node(struct {
|
||||
LastSeen *time.Time
|
||||
Online *bool
|
||||
MachineAuthorized bool
|
||||
Capabilities []NodeCapability
|
||||
Capabilities []nodecap.Cap
|
||||
CapMap NodeCapMap
|
||||
UnsignedPeerAPIOnly bool
|
||||
ComputedName string
|
||||
@@ -415,6 +423,7 @@ var _NodeViewNeedsRegeneration = Node(struct {
|
||||
IsWireGuardOnly bool
|
||||
IsJailed bool
|
||||
ExitNodeDNSResolvers []*dnstype.Resolver
|
||||
StableTailnetID StableTailnetID
|
||||
}{})
|
||||
|
||||
// View returns a read-only view of Hostinfo.
|
||||
@@ -550,6 +559,14 @@ func (v HostinfoView) ShareeNode() bool { return v.ж.ShareeNode }
|
||||
// indicates that the user has opted out of sending logs and support
|
||||
func (v HostinfoView) NoLogsNoSupport() bool { return v.ж.NoLogsNoSupport }
|
||||
|
||||
// RemoteConfig is whether the node has both linked
|
||||
// feature/remoteconfig into its binary and enabled
|
||||
// Prefs.RemoteConfig: it has delegated full remote management of
|
||||
// its prefs and LocalAPI to the tailnet admin via the
|
||||
// /remoteapi/localapi/* c2n endpoint. See feature/remoteconfig for
|
||||
// the trust model.
|
||||
func (v HostinfoView) RemoteConfig() bool { return v.ж.RemoteConfig }
|
||||
|
||||
// WireIngress indicates that the node would like to be wired up server-side
|
||||
// (DNS, etc) to be able to use Tailscale Funnel, even if it's not currently
|
||||
// enabled. For example, the user might only use it for intermittent
|
||||
@@ -562,7 +579,10 @@ func (v HostinfoView) WireIngress() bool { return v.ж.WireIngress }
|
||||
// if the node has any funnel endpoint enabled
|
||||
func (v HostinfoView) IngressEnabled() bool { return v.ж.IngressEnabled }
|
||||
|
||||
// indicates that the node has opted-in to admin-console-drive remote updates
|
||||
// AllowsUpdate reports that the node has opted in to
|
||||
// admin-console-driven remote updates and that the running binary
|
||||
// includes client update support (the feature/clientupdate package,
|
||||
// which tsnet apps don't include).
|
||||
func (v HostinfoView) AllowsUpdate() bool { return v.ж.AllowsUpdate }
|
||||
|
||||
// the current host's machine type (uname -m)
|
||||
@@ -606,6 +626,9 @@ func (v HostinfoView) AppConnector() opt.Bool { return v.ж.AppConnector }
|
||||
// opaque hash of the most recent list of tailnet services, change in hash indicates config should be fetched via c2n
|
||||
func (v HostinfoView) ServicesHash() string { return v.ж.ServicesHash }
|
||||
|
||||
// if the client is willing to relay traffic for other peers
|
||||
func (v HostinfoView) PeerRelay() bool { return v.ж.PeerRelay }
|
||||
|
||||
// the client’s selected exit node, empty when unselected.
|
||||
func (v HostinfoView) ExitNodeID() StableNodeID { return v.ж.ExitNodeID }
|
||||
|
||||
@@ -646,6 +669,7 @@ var _HostinfoViewNeedsRegeneration = Hostinfo(struct {
|
||||
ShieldsUp bool
|
||||
ShareeNode bool
|
||||
NoLogsNoSupport bool
|
||||
RemoteConfig bool
|
||||
WireIngress bool
|
||||
IngressEnabled bool
|
||||
AllowsUpdate bool
|
||||
@@ -664,6 +688,7 @@ var _HostinfoViewNeedsRegeneration = Hostinfo(struct {
|
||||
UserspaceRouter opt.Bool
|
||||
AppConnector opt.Bool
|
||||
ServicesHash string
|
||||
PeerRelay bool
|
||||
ExitNodeID StableNodeID
|
||||
Location *Location
|
||||
TPM *TPMInfo
|
||||
@@ -773,12 +798,12 @@ func (v NetInfoView) PCP() opt.Bool { return v.ж.PCP }
|
||||
|
||||
// PreferredDERP is this node's preferred (home) DERP region ID.
|
||||
// This is where the node expects to be contacted to begin a
|
||||
// peer-to-peer connection. The node might be be temporarily
|
||||
// peer-to-peer connection. The node might be temporarily
|
||||
// connected to multiple DERP servers (to speak to other nodes
|
||||
// that are located elsewhere) but PreferredDERP is the region ID
|
||||
// that the node subscribes to traffic at.
|
||||
// Zero means disconnected or unknown.
|
||||
func (v NetInfoView) PreferredDERP() int { return v.ж.PreferredDERP }
|
||||
func (v NetInfoView) PreferredDERP() DERPRegionID { return v.ж.PreferredDERP }
|
||||
|
||||
// LinkType is the current link type, if known.
|
||||
func (v NetInfoView) LinkType() string { return v.ж.LinkType }
|
||||
@@ -813,7 +838,7 @@ var _NetInfoViewNeedsRegeneration = NetInfo(struct {
|
||||
UPnP opt.Bool
|
||||
PMP opt.Bool
|
||||
PCP opt.Bool
|
||||
PreferredDERP int
|
||||
PreferredDERP DERPRegionID
|
||||
LinkType string
|
||||
DERPLatency map[string]float64
|
||||
FirewallMode string
|
||||
@@ -1345,7 +1370,7 @@ func (v RegisterRequestView) Hostinfo() HostinfoView { return v.ж.Hostinfo.View
|
||||
func (v RegisterRequestView) Ephemeral() bool { return v.ж.Ephemeral }
|
||||
|
||||
// NodeKeySignature is the node's own node-key signature, re-signed
|
||||
// for its new node key using its network-lock key.
|
||||
// for its new node key using its tailnet-lock key.
|
||||
//
|
||||
// This field is set when the client retries registration after learning
|
||||
// its NodeKeySignature (which is in need of rotation).
|
||||
@@ -1483,13 +1508,13 @@ func (v *DERPHomeParamsView) UnmarshalJSONFrom(dec *jsontext.Decoder) error {
|
||||
//
|
||||
// A nil map means no change from the previous value (if any); an empty
|
||||
// non-nil map can be sent to reset all scores back to 1.0.
|
||||
func (v DERPHomeParamsView) RegionScore() views.Map[int, float64] {
|
||||
func (v DERPHomeParamsView) RegionScore() views.Map[DERPRegionID, float64] {
|
||||
return views.MapOf(v.ж.RegionScore)
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPHomeParamsViewNeedsRegeneration = DERPHomeParams(struct {
|
||||
RegionScore map[int]float64
|
||||
RegionScore map[DERPRegionID]float64
|
||||
}{})
|
||||
|
||||
// View returns a read-only view of DERPRegion.
|
||||
@@ -1571,7 +1596,7 @@ func (v *DERPRegionView) UnmarshalJSONFrom(dec *jsontext.Decoder) error {
|
||||
//
|
||||
// RegionIDs in range 900-999 are reserved for end users to run their
|
||||
// own DERP nodes.
|
||||
func (v DERPRegionView) RegionID() int { return v.ж.RegionID }
|
||||
func (v DERPRegionView) RegionID() DERPRegionID { return v.ж.RegionID }
|
||||
|
||||
// RegionCode is a short name for the region. It's usually a popular
|
||||
// city or airport code in the region: "nyc", "sf", "sin",
|
||||
@@ -1630,7 +1655,7 @@ func (v DERPRegionView) Nodes() views.SliceView[*DERPNode, DERPNodeView] {
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPRegionViewNeedsRegeneration = DERPRegion(struct {
|
||||
RegionID int
|
||||
RegionID DERPRegionID
|
||||
RegionCode string
|
||||
RegionName string
|
||||
Latitude float64
|
||||
@@ -1717,7 +1742,7 @@ func (v DERPMapView) HomeParams() DERPHomeParamsView { return v.ж.HomeParams.Vi
|
||||
// It's keyed by the DERPRegion.RegionID.
|
||||
//
|
||||
// The numbers are not necessarily contiguous.
|
||||
func (v DERPMapView) Regions() views.MapFn[int, *DERPRegion, DERPRegionView] {
|
||||
func (v DERPMapView) Regions() views.MapFn[DERPRegionID, *DERPRegion, DERPRegionView] {
|
||||
return views.MapFnOf(v.ж.Regions, func(t *DERPRegion) DERPRegionView {
|
||||
return t.View()
|
||||
})
|
||||
@@ -1732,7 +1757,7 @@ func (v DERPMapView) OmitDefaultRegions() bool { return v.ж.OmitDefaultRegions
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPMapViewNeedsRegeneration = DERPMap(struct {
|
||||
HomeParams *DERPHomeParams
|
||||
Regions map[int]*DERPRegion
|
||||
Regions map[DERPRegionID]*DERPRegion
|
||||
OmitDefaultRegions bool
|
||||
}{})
|
||||
|
||||
@@ -1811,7 +1836,7 @@ func (v DERPNodeView) Name() string { return v.ж.Name }
|
||||
|
||||
// RegionID is the RegionID of the DERPRegion that this node
|
||||
// is running in.
|
||||
func (v DERPNodeView) RegionID() int { return v.ж.RegionID }
|
||||
func (v DERPNodeView) RegionID() DERPRegionID { return v.ж.RegionID }
|
||||
|
||||
// HostName is the DERP node's hostname.
|
||||
//
|
||||
@@ -1875,7 +1900,7 @@ func (v DERPNodeView) CanPort80() bool { return v.ж.CanPort80 }
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPNodeViewNeedsRegeneration = DERPNode(struct {
|
||||
Name string
|
||||
RegionID int
|
||||
RegionID DERPRegionID
|
||||
HostName string
|
||||
CertName string
|
||||
IPv4 string
|
||||
@@ -2091,6 +2116,11 @@ func (v SSHActionView) Accept() bool { return v.ж.Accept }
|
||||
|
||||
// SessionDuration, if non-zero, is how long the session can stay open
|
||||
// before being forcefully terminated.
|
||||
// It is encoded as an int64 of nanoseconds (Go's time.Duration
|
||||
// wire format for encoding/json v1). It must not use a jsonv2
|
||||
// format tag; the mere presence of one makes Go 1.27's
|
||||
// encoding/json fail to decode the struct. See
|
||||
// https://github.com/tailscale/tailscale/issues/20528.
|
||||
func (v SSHActionView) SessionDuration() time.Duration { return v.ж.SessionDuration }
|
||||
|
||||
// AllowAgentForwarding, if true, allows accepted connections to forward
|
||||
@@ -2501,8 +2531,15 @@ func (v UserProfileView) ID() UserID { return v.ж.ID }
|
||||
func (v UserProfileView) LoginName() string { return v.ж.LoginName }
|
||||
|
||||
// "Alice Smith"
|
||||
func (v UserProfileView) DisplayName() string { return v.ж.DisplayName }
|
||||
func (v UserProfileView) ProfilePicURL() string { return v.ж.ProfilePicURL }
|
||||
func (v UserProfileView) DisplayName() string { return v.ж.DisplayName }
|
||||
func (v UserProfileView) ProfilePicURL() string { return v.ж.ProfilePicURL }
|
||||
|
||||
// Groups is a subset of SCIM groups (e.g. "engineering@example.com")
|
||||
// or group names in the tailnet policy document (e.g. "group:eng")
|
||||
// that contain this user and that the coordination server was
|
||||
// configured to report to this node.
|
||||
// The list is always sorted when loaded from storage.
|
||||
func (v UserProfileView) Groups() views.Slice[string] { return views.SliceOf(v.ж.Groups) }
|
||||
func (v UserProfileView) Equal(v2 UserProfileView) bool { return v.ж.Equal(v2.ж) }
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
@@ -2511,6 +2548,7 @@ var _UserProfileViewNeedsRegeneration = UserProfile(struct {
|
||||
LoginName string
|
||||
DisplayName string
|
||||
ProfilePicURL string
|
||||
Groups []string
|
||||
}{})
|
||||
|
||||
// View returns a read-only view of VIPService.
|
||||
|
||||
Reference in new issue
Block a user