Versions in this module Expand all Collapse all v0 v0.0.8 Jan 15, 2024 Changes in this version + var HdrAuthorized = Header type GeneralTableView + Self *SelfView v0.0.7 Jan 15, 2024 Changes in this version + var AllHeadersList = []Header + var AllHeadersMap = func() map[HeaderMatchName]Header { ... }() + var DefaultColumnSet = []Header + var HdrAddress = Header + var HdrExitStatus = Header + var HdrIpv4 = Header + var HdrIpv6 = Header + var HdrLastSeenAgo = Header + var HdrMachine = Header + var HdrNo = Header + var HdrTags = Header + var HdrUser = Header + var HdrVersion = Header type ConfigCtx + ColumnsExclude mapset.Set[string] type GeneralTableView + func (g *GeneralTableView) HeaderTitles() []string + type Header struct + MatchName HeaderMatchName + ReqEnriched bool + Title string + type HeaderMatchName string + const MatchNameAddress + const MatchNameAuthorized + const MatchNameBlocksIncomingConnections + const MatchNameClientVersion + const MatchNameExitStatus + const MatchNameFullname + const MatchNameHostname + const MatchNameIpv4 + const MatchNameIpv6 + const MatchNameLastSeen + const MatchNameLastSeenAgo + const MatchNameMachine + const MatchNameName + const MatchNameNo + const MatchNameOS + const MatchNameTags + const MatchNameUser + const MatchNameVersion type WrappedDevice + func (w *WrappedDevice) EvalColumnField(ctx context.Context, idx int, headerMatchName HeaderMatchName) string v0.0.6 Jan 14, 2024 Changes in this version + type Db struct + func (d *Db[T]) Close() error + func (d *Db[T]) Erase() error + func (d *Db[T]) Exists(ctx context.Context) (bool, error) + func (d *Db[T]) File() string + func (d *Db[T]) IndexOpaqueItems(ctx context.Context, bucketName string, items []T) error + func (d *Db[T]) LookupOpaqueItem(ctx context.Context, bucketName, primaryKey string) (*T, error) + func (d *Db[T]) Open() error + func (d *Db[T]) SearchOpaqueItems(ctx context.Context, bucketName string, query DBQuery) ([]T, error) + func (d *Db[T]) TailnetScope() string + type DbStats struct + DevicesCount int + EnrichedCount int type MockedDeviceRepo + func NewMockedDeviceRepoWithPath(filePath string) *MockedDeviceRepo v0.0.5 Jan 12, 2024 v0.0.4 Jan 8, 2024 Changes in this version + type DBQuery struct + PrefixFilters *PrefixFilter + PrimaryKeys []string + type PrefixFilter struct + func ParsePrefixFilter(s string) *PrefixFilter + func (p *PrefixFilter) Count() int + func (p *PrefixFilter) IsAll() bool + func (p *PrefixFilter) PrefixAt(idx int) string v0.0.3 Jan 5, 2024 Changes in this version + const AddressHdr + const AppLongName + const AppShortName + const AppVersion + const DevicesBucket + const ExitNodeHdr + const LastSeenHdr + const MachineHdr + const NoHdr + const PrimaryFilterAll + const StatsBucket + const StatsKey + const TagsHdr + const UserHdr + const VersionHdr + var CtxKeyConfig = contextKey("configuration") + var CtxKeyUserQuery = contextKey("user-query") + var DefaultHeader = []string + var UserAgent = fmt.Sprintf("%s/%s", AppShortName, AppVersion) + func CtxAsBool(ctx context.Context, key contextKey) bool + func CtxAsInt(ctx context.Context, key contextKey) int + func CtxAsString(ctx context.Context, key contextKey) string + func ExecuteClusterRemoteCmd(ctx context.Context, w io.Writer, hosts []RemoteCmdHost, remoteCmd string) + func NewClient(ctx context.Context) *tailscale.Client + func NewOauthClient(ctx context.Context) *tailscale.Client + func ParseColumns(s string) mapset.Set[string] + func ParseFilter(filter string) map[string]mapset.Set[string] + func RenderASCIITableView(ctx context.Context, tableView *GeneralTableView, w io.Writer) error + func RenderIPs(ctx context.Context, tableView *GeneralTableView, w io.Writer) error + func RenderJson(ctx context.Context, tableView *GeneralTableView, w io.Writer) error + func RenderLogLine(ctx context.Context, w io.Writer, idx int, isStdErr bool, ...) + func RenderRemoteSummary(ctx context.Context, w io.Writer, success, errors uint32, ...) error + func RenderTableView(ctx context.Context, tableView *GeneralTableView, w io.Writer) error + type CachedRepository struct + func NewCachedRepo(innerRepo InnerRepo) *CachedRepository + func (c *CachedRepository) DevicesResource(ctx context.Context) ([]*WrappedDevice, error) + type ConfigCtx struct + Basic bool + CacheTimeout time.Duration + CachedElapsed time.Duration + Columns mapset.Set[string] + Concurrency int + Filters map[string]mapset.Set[string] + IPsDelimiter string + IPsOutput bool + JsonOutput bool + NoCache bool + NoColor bool + Page int + PrefixFilter string + RemoteCmd string + Slice *SliceCfg + SortOrder []SortSpec + Tailnet string + TailscaleAPI TailscaleAPICfgCtx + TailscaleCLI TailscaleCLICfgCtx + TestMode bool + func CtxAsConfig(ctx context.Context, key contextKey) *ConfigCtx + func NewConfigCtx() *ConfigCtx + func (c *ConfigCtx) IsRemoteCommand() bool + type ContextView struct + APIElapsed time.Duration + CLIElapsed time.Duration + Query string + type DB2 struct + func NewDB2[T Indexer](tailnetScope string) *DB2[T] + func (d *DB2[T]) Close() error + func (d *DB2[T]) Erase() error + func (d *DB2[T]) Exists(ctx context.Context) (bool, error) + func (d *DB2[T]) File() string + func (d *DB2[T]) IndexOpaqueItems(ctx context.Context, bucketName string, items []T) error + func (d *DB2[T]) LookupOpaqueItem(ctx context.Context, bucketName, primaryKey string) (*T, error) + func (d *DB2[T]) Open() error + func (d *DB2[T]) SearchOpaqueItems(ctx context.Context, bucketName string, query DBQuery2) ([]T, error) + func (d *DB2[T]) TailnetScope() string + type DB2Stats struct + DevicesCount int + EnrichedCount int + type DBQuery2 struct + PrefixFilter string + PrimaryKeys []string + type DevicesTable struct + Devices *DevicesView + type DevicesView struct + type GeneralTableView struct + Headers []string + Rows [][]string + func ProcessDevicesTable(ctx context.Context, devList []*WrappedDevice) (*GeneralTableView, error) + type Indexer interface + Key func() string + type InnerRepo interface + DevicesResource func(ctx context.Context) ([]*WrappedDevice, error) + type MockedDeviceRepo struct + func NewMockedDeviceRepo() *MockedDeviceRepo + func (r *MockedDeviceRepo) DevicesResource(ctx context.Context) ([]*WrappedDevice, error) + type RemoteCmdHost struct + Alias string + Original string + type RemoteDeviceRepo struct + func NewRemoteDeviceRepo(client *tailscale.Client) *RemoteDeviceRepo + func (r *RemoteDeviceRepo) DevicesResource(ctx context.Context) ([]*WrappedDevice, error) + type SelfView struct + DNSName string + Index int + type SliceCfg struct + From *int + To *int + func ParseSlice(s string, page int) *SliceCfg + func (s *SliceCfg) IsDefined() bool + type SortDirection int + const Ascending + const Descending + type SortSpec struct + Direction SortDirection + Field string + func ParseSortString(sortString string) []SortSpec + type TailnetView struct + Tailnet string + TotalMachines int + type TailscaleAPICfgCtx struct + ApiKey string + ElapsedTime time.Duration + OAuthClientID string + OAuthClientSecret string + Timeout time.Duration + type TailscaleCLICfgCtx struct + type WrappedDevice struct + EnrichedInfo *tailscale_cli.DeviceInfo + func (w *WrappedDevice) Key() string