analytics

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndCreateULID

func CheckAndCreateULID(_ *cobra.Command, _ []string) error

CheckAndCreateULID checks for a ULID in the config file and creates it if absent.

func GetCurrentTimestamp

func GetCurrentTimestamp() string

GetCurrentTimestamp returns the current timestamp in ISO 8601 format.

func GetFormattedTimestamp

func GetFormattedTimestamp(t time.Time) string

GetFormattedTimestamp formats a given time.Time in ISO 8601 format.

func GetOSName

func GetOSName() string

GetOSName retrieves the OS name.

func GetOSVersion

func GetOSVersion() string

GetOSVersion retrieves the OS version.

func GetProfile

func GetProfile() (config.Profile, error)

func PostRunAnalytics

func PostRunAnalytics(cmd *cobra.Command, name string, args []string)

func ReadUULD

func ReadUULD() (string, error)

Types

type About

type About struct {
	Version         string          `json:"version"`
	UIVersion       string          `json:"uiVersion"`
	Commit          string          `json:"commit"`
	DeploymentID    string          `json:"deploymentId"`
	UpdateAvailable bool            `json:"updateAvailable"`
	LatestVersion   string          `json:"latestVersion"`
	LLMActive       bool            `json:"llmActive"`
	LLMProvider     string          `json:"llmProvider"`
	OIDCActive      bool            `json:"oidcActive"`
	License         json.RawMessage `json:"license"`
	Mode            string          `json:"mode"`
	Staging         string          `json:"staging"`
	HotTier         string          `json:"hotTier"`
	GRPCPort        int             `json:"grpcPort"`
	Store           Store           `json:"store"`
	Analytics       Analytics       `json:"analytics"`
	QueryEngine     string          `json:"queryEngine"`
}

About struct

func FetchAbout

func FetchAbout(client *internalHTTP.HTTPClient) (about About, err error)

type Analytics

type Analytics struct {
	ClarityTag string `json:"clarityTag"`
}

Analytics struct

type Command

type Command struct {
	Name      string            `json:"name"`
	Arguments []string          `json:"arguments"`
	Flags     map[string]string `json:"flags"`
}

type Config

type Config struct {
	ULID string `yaml:"ulid"`
}

Config struct for parsing YAML

type Event

type Event struct {
	CLIVersion         string  `json:"cli_version"`
	ULID               string  `json:"ulid"`
	CommitHash         string  `json:"commit_hash"`
	OSName             string  `json:"os_name"`
	OSVersion          string  `json:"os_version"`
	ReportCreatedAt    string  `json:"report_created_at"`
	Command            Command `json:"command"`
	Errors             *string `json:"errors"`
	ExecutionTimestamp string  `json:"execution_timestamp"`
}

type Store

type Store struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

Store struct

Jump to

Keyboard shortcuts

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