trackplan

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package trackplan stores the intended instrumentation — the events (and their properties) an app MEANS to track. Declared once (usually by the coding agent that wired the tracking), then compared against what actually arrives, so "I instrumented signup/activate/checkout" becomes verifiable: which planned events flow, which never arrived, which properties are missing. The missing half of agent-driven analytics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	Events  []PlannedEvent `json:"events"`
	Updated time.Time      `json:"updated"`
}

Plan is the whole declared instrumentation, replaced atomically on set.

type PlannedEvent

type PlannedEvent struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Properties  []string `json:"properties,omitempty"` // property keys expected on this event
}

PlannedEvent is one event the app intends to send.

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Store, error)

func (*Store) Get

func (s *Store) Get() Plan

Get returns the current plan (empty Events = no plan declared yet).

func (*Store) Set

func (s *Store) Set(events []PlannedEvent) (Plan, error)

Set replaces the plan wholesale — the declaring agent owns the full picture.

Jump to

Keyboard shortcuts

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