segment

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed files/*
	EmbeddedFS embed.FS
)

Functions

func GetSegmentWriteKey

func GetSegmentWriteKey() (string, error)

Types

type EventInfo

type EventInfo struct {
	EventName      types.EventType
	Detail         string
	AdditionalInfo map[string]interface{} `json:"-"`
}

func NewEventInfo

func NewEventInfo(eventType types.EventType, detail string) *EventInfo

func (*EventInfo) WithAdditionalInfo

func (e *EventInfo) WithAdditionalInfo(k string, v interface{})

type Segment

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

func Init

func Init() *Segment

func New

func New(url string, writeKey string, accountID int, region string, isProxyConfigured bool) *Segment

func NewNoOp

func NewNoOp() *Segment

func (*Segment) SetInstallID

func (client *Segment) SetInstallID(i string)

func (*Segment) Track

func (client *Segment) Track(eventName types.EventType) *analytics.Track

func (*Segment) TrackInfo

func (client *Segment) TrackInfo(eventInfo *EventInfo) *analytics.Track

Jump to

Keyboard shortcuts

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