Versions in this module Expand all Collapse all v0 v0.0.1 Nov 29, 2026 Changes in this version + const DefaultBinPath + const DefaultDir + const DefaultEndpoint + const EnrollMessagePrefix + const GuardServiceUnit + const GuardTimerUnit + const Hardened + const LegacyEnvFile + const Locked + const PolkitRuleName + const ServiceUnit + const Standard + const WatchdogSec + var ErrNoCredential = errors.New("not enrolled: no sensor credential") + var ErrRevoked = errors.New("the sensor's credential was revoked") + var ErrUninstallRefused = errors.New("the site refused the uninstall code") + var HTTPClient = &http.Client + var UserAgent = "vulnetix-sensor" + func EnrollMessage(integration, kid, profile, sensorKey, mdmDeviceID string, ts int64, ...) []byte + func NormalizeFleet(s string) (string, error) + func ParseKey(raw []byte) ([]byte, error) + func PolkitRule(level string) string + func SaveSnapshotAt(path string, sn Snapshot) error + func Uninstall(ctx context.Context, endpoint, authHeader, code, sensorKey string) error + type Config struct + AllowMajorUpdate *bool + AllowUserStop bool + AutoUpdate *bool + DNSListen string + EgressListen string + FeedKey string + Feeds []string + Forward []string + HeartbeatAlertMinutes int + Hold string + InventoryEvery string + Mode string + Protection string + UpdateBaseURL string + func (c Config) AllowMajorUpdateOn() bool + func (c Config) AutoUpdateOn() bool + func (c Config) Level() string + func (c Config) UserMayStop() bool + type Credential struct + DeviceUUID string + Endpoint string + Scheme string + Value string + func (c Credential) AuthHeader() string + func (c Credential) SensorKeyParam(sensorKey string) string + type EnrollRequest struct + Arch string + ComputeKind string + Fleet string + Hostname string + MDMDeviceID string + OS string + Profile string + SensorKey string + Version string + type EnrollResponse struct + Config Config + ConfigEtag string + Credential struct{ ... } + DeviceUUID string + Fleet string + Profile ProfileRef + func EnrollWithMDM(ctx context.Context, endpoint string, privKeySeed []byte, ...) (EnrollResponse, error) + func EnrollWithPerson(ctx context.Context, endpoint, authHeader string, req EnrollRequest) (EnrollResponse, error) + func (r EnrollResponse) Snapshot() Snapshot + func (r EnrollResponse) StoredCredential(endpoint string) Credential + type File struct + Content string + Mode os.FileMode + Path string + func RenderUnits(cfg Config, binPath string, opts ...UnitOptions) []File + type HTTPError struct + Message string + Method string + Path string + Revoked bool + Status int + func (e *HTTPError) Error() string + type ProfileRef struct + Name string + UUID string + type Snapshot struct + Config Config + ConfigEtag string + Profile ProfileRef + func LoadSnapshot(paths ...string) (Snapshot, string, error) + func PollConfig(ctx context.Context, endpoint, authHeader, etag, sensorKey string) (Snapshot, bool, error) + type Store struct + Dir string + func (s Store) ConfigPath() string + func (s Store) CredentialPath() string + func (s Store) HasCredential() bool + func (s Store) LoadCredential() (Credential, error) + func (s Store) SaveCredential(c Credential) error + func (s Store) SaveSnapshot(sn Snapshot) error + func (s Store) Uninstalling() bool + func (s Store) UninstallingPath() string + type UnitOptions struct + ConfigDir string + PolkitDir string + UnitDir string + func (o UnitOptions) PolkitRulePath() string + func (o UnitOptions) UnitPaths() []string