Documentation ¶
Index ¶
- Variables
- func AsyncLogError(ctx *kong.Context, uerr error)
- func AsyncLogInvoke(ctx *kong.Context)
- func IsConsentRecorded() (rec bool)
- func PromptForConsent(in io.Reader, out io.Writer) (c bool, err error)
- func ReadConsent(in io.Reader, out io.Writer) (c bool, err error)
- func Submit(e Event) (err error)
- func WriteConsent(consent bool) (err error)
- type Event
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HeapBaseURI is the location of Heap API endpoint HeapBaseURI = "https://heapanalytics.com" // HeapAppID identifies what Heap App events are recorded against HeapAppID = "4248790180" // development id, overridden during `make build` // ConsentGiven records whether tracking consent has been given by the user ConsentGiven bool )
Functions ¶
func AsyncLogError ¶ added in v1.3.1
AsyncLogError logs an invocation of the cli
func AsyncLogInvoke ¶ added in v1.3.1
AsyncLogInvoke logs an invocation of the cli
func IsConsentRecorded ¶
func IsConsentRecorded() (rec bool)
IsConsentRecorded returns if valid consent has been recorded for tracking
func PromptForConsent ¶
PromptForConsent interactively prompts the user for consent
func ReadConsent ¶
ReadConsent finds if consent has been given, either from file or by prompt.
func Submit ¶
Submit submits an analytics event to Section
Behavior is determined by consent:
if consent not given { prompt for consent }
if consent == true { submit analytics }
func WriteConsent ¶
WriteConsent writes the current consent state to a persistent file
Types ¶
Click to show internal directories.
Click to hide internal directories.