cfanalytics

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR = "error"
View Source
const START_BEGIN = "start_begin"
View Source
const START_END = "start_end"
View Source
const STOP = "stop"
View Source
const UNINSTALL = "uninstall"

Variables

This section is empty.

Functions

func PromptOptIn

func PromptOptIn(conf config.Config, ui UI) error

func SetTelemetryState

func SetTelemetryState(response string, conf config.Config) error

func TrackEvent

func TrackEvent(event string, data map[string]interface{}, client analytics.Client) error

Types

type AnalyticsEvent

type AnalyticsEvent struct {
	SegClient ClientInterface
	Event     string
	UserId    string
	Data      map[string]interface{}
	OS        string
	Version   string
}

func (*AnalyticsEvent) SendAnalytics

func (s *AnalyticsEvent) SendAnalytics() error

type ClientInterface

type ClientInterface interface {
	Enqueue(message analytics.Message) error
}

type UI

type UI interface {
	Say(message string, args ...interface{})
	Ask(prompt string) (answer string)
}

Jump to

Keyboard shortcuts

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