tailscale

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTailscaleService

func NewTailscaleService() models.ServiceHealthChecker

Types

type Device

type Device struct {
	Name            string   `json:"name"`
	ID              string   `json:"id"`
	IPAddress       string   `json:"ipAddress"`
	LastSeen        string   `json:"lastSeen"`
	Online          bool     `json:"online"`
	OS              string   `json:"os"`
	DeviceType      string   `json:"deviceType"`
	ClientVersion   string   `json:"clientVersion"`
	UpdateAvailable bool     `json:"updateAvailable"`
	Tags            []string `json:"tags"`
}

type TailscaleAPIResponse

type TailscaleAPIResponse struct {
	Devices []struct {
		ID                 string   `json:"id"`
		Name               string   `json:"name"`
		Addresses          []string `json:"addresses"`
		LastSeen           string   `json:"lastSeen"`
		OS                 string   `json:"os"`
		Hostname           string   `json:"hostname"`
		Authorized         bool     `json:"authorized"`
		ClientVersion      string   `json:"clientVersion"`
		UpdateAvailable    bool     `json:"updateAvailable"`
		Tags               []string `json:"tags"`
		ClientConnectivity *struct {
			Endpoints []string `json:"endpoints"`
		} `json:"clientConnectivity,omitempty"`
	} `json:"devices"`
}

type TailscaleService

type TailscaleService struct {
	core.ServiceCore
}

func (*TailscaleService) CheckHealth

func (s *TailscaleService) CheckHealth(_ string, apiKey string) (models.ServiceHealth, int)

func (*TailscaleService) GetDevices

func (s *TailscaleService) GetDevices(_ string, apiKey string) ([]Device, error)

Jump to

Keyboard shortcuts

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