tailscale

package
v1.23.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tailscale provides the Tailscale integration definition for integrations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClientIDMissing indicates the OAuth client ID is missing from the credential
	ErrClientIDMissing = errors.New("tailscale: oauth client id missing")
	// ErrClientSecretMissing indicates the OAuth client secret is missing from the credential
	ErrClientSecretMissing = errors.New("tailscale: oauth client secret missing")
	// ErrCredentialInvalid indicates credential metadata could not be decoded
	ErrCredentialInvalid = errors.New("tailscale: credential invalid")
	// ErrCredentialMetadataRequired indicates no credential metadata was provided
	ErrCredentialMetadataRequired = errors.New("tailscale: credential metadata required")
	// ErrHealthCheckFailed indicates the Tailscale API health check failed
	ErrHealthCheckFailed = errors.New("tailscale: health check failed")
	// ErrResultEncode indicates an operation result could not be serialized
	ErrResultEncode = errors.New("tailscale: result encode failed")
	// ErrUsersFetchFailed indicates the Tailscale users list request failed
	ErrUsersFetchFailed = errors.New("tailscale: users fetch failed")
	// ErrDevicesFetchFailed indicates the Tailscale devices list request failed
	ErrDevicesFetchFailed = errors.New("tailscale: devices fetch failed")
	// ErrPayloadEncode indicates a collected Tailscale payload could not be serialized for ingest
	ErrPayloadEncode = errors.New("tailscale: ingest payload encode failed")
	// ErrOperationConfigInvalid indicates operation config could not be decoded
	ErrOperationConfigInvalid = errors.New("tailscale: operation config invalid")
)

Functions

func Builder

func Builder() registry.Builder

Builder returns the Tailscale definition builder

Types

type AssetSync

type AssetSync struct {
	// Disable stops the asset sync operation from running
	Disable bool `json:"disable,omitempty" jsonschema:"title=Disable,description=Disable the syncing of Tailscale devices as assets"`
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 137-byte string literal not displayed */
}

AssetSync holds configuration for the Tailscale asset sync operation

func (AssetSync) IngestHandle

func (a AssetSync) IngestHandle() types.IngestHandler

IngestHandle adapts Tailscale asset sync to the ingest operation registration boundary

func (AssetSync) Run

Run collects Tailscale devices and emits asset ingest payloads

type Client

type Client struct{}

Client builds Tailscale API clients for one installation

func (Client) Build

Build constructs the Tailscale API client for one installation

type CredentialSchema

type CredentialSchema struct {
	// ClientID is the OAuth client ID generated in the Tailscale admin console
	ClientID string `json:"clientId" jsonschema:"required,title=Client ID,description=OAuth client ID from the Tailscale admin console."`
	// ClientSecret is the OAuth client secret paired with ClientID
	ClientSecret string `` /* 139-byte string literal not displayed */
}

CredentialSchema holds the Tailscale OAuth credentials for one installation

type DirectorySync

type DirectorySync struct {
	// Disable stops the directory sync operation from running
	Disable bool `json:"disable,omitempty" jsonschema:"title=Disable,description=Disable the syncing of users and groups from Tailscale"`
	// DisableGroupSync skips group and membership sync, importing only users
	DisableGroupSync bool `` /* 145-byte string literal not displayed */
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 181-byte string literal not displayed */
}

DirectorySync holds configuration for the Tailscale directory sync operation

func (DirectorySync) IngestHandle

func (d DirectorySync) IngestHandle() types.IngestHandler

IngestHandle adapts Tailscale directory sync to the ingest operation registration boundary

func (DirectorySync) Run

Run collects Tailscale users and optionally role-based groups and memberships

type HealthCheck

type HealthCheck struct {
	// UserCount is the number of users visible to the credential
	UserCount int `json:"userCount,omitempty"`
}

HealthCheck holds the result of a Tailscale API health check

func (HealthCheck) Handle

func (h HealthCheck) Handle() types.OperationHandler

Handle adapts the health check to the generic operation registration boundary

func (HealthCheck) Run

Run validates Tailscale API access by listing users

type InstallationMetadata

type InstallationMetadata struct {
	// ClientID is the OAuth client ID used to connect this installation
	ClientID string `json:"clientId,omitempty" jsonschema:"title=Client ID"`
}

InstallationMetadata holds the stable Tailscale identity for one installation

func (InstallationMetadata) InstallationIdentity

InstallationIdentity implements types.InstallationIdentifiable

type UserInput

type UserInput struct {
	// DirectorySync includes the configuration for syncing users, groups, and memberships from Tailscale
	DirectorySync DirectorySync `json:"directorySync,omitempty" jsonschema:"title=Directory Sync"`
	// AssetSync includes the configuration for syncing Tailscale devices as assets
	AssetSync AssetSync `json:"assetSync,omitempty" jsonschema:"title=Asset Sync"`
}

UserInput holds installation-specific configuration collected from the user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL