Versions in this module Expand all Collapse all v4 v4.2.0 Jun 15, 2023 Changes in this version type Alias + OriginalTimestamp time.Time + SentAt time.Time type Group + OriginalTimestamp time.Time + SentAt time.Time type Identify + OriginalTimestamp time.Time + SentAt time.Time type Page + OriginalTimestamp time.Time + SentAt time.Time type Screen + OriginalTimestamp time.Time + SentAt time.Time type Track + OriginalTimestamp time.Time + SentAt time.Time v4.1.0 Jan 17, 2023 Changes in this version type Config + DisableGzip bool v4.0.0 Jan 5, 2023 Changes in this version + const DefaultBatchSize + const DefaultEndpoint + const DefaultInterval + const Version + var ErrClosed = errors.New("the client was already closed") + var ErrMessageTooBig = errors.New("the message exceeds the maximum allowed size") + var ErrTooManyRequests = errors.New("too many requests are already in-flight") + func ValidateFields(msg FieldGetter) error + type Alias struct + Channel string + Context *Context + Integrations Integrations + MessageId string + PreviousId string + Timestamp time.Time + Type string + UserId string + func (msg Alias) Validate() error + type AppInfo struct + Build string + Name string + Namespace string + Version string + type Callback interface + Failure func(Message, error) + Success func(Message) + type CampaignInfo struct + Content string + Medium string + Name string + Source string + Term string + type Client interface + Enqueue func(Message) error + func New(writeKey string, dataPlaneUrl string) Client + func NewWithConfig(writeKey string, config Config) (cli Client, err error) + type Config struct + BatchSize int + Callback Callback + DataPlaneUrl string + DefaultContext *Context + Endpoint string + Gzip int + Interval time.Duration + Logger Logger + MaxBatchBytes int + MaxMessageBytes int + NoProxySupport bool + RetryAfter func(int) time.Duration + Transport http.RoundTripper + Verbose bool + type ConfigError struct + Field string + Reason string + Value interface{} + func (e ConfigError) Error() string + type Context struct + App AppInfo + Campaign CampaignInfo + Device DeviceInfo + Direct bool + Extra map[string]interface{} + IP net.IP + Library LibraryInfo + Locale string + Location LocationInfo + Network NetworkInfo + OS OSInfo + Page PageInfo + Referrer ReferrerInfo + Screen ScreenInfo + Timezone string + Traits Traits + UserAgent string + func (ctx Context) MarshalJSON() ([]byte, error) + type DeviceInfo struct + AdvertisingID string + Id string + Manufacturer string + Model string + Name string + Type string + Version string + type FieldError struct + Name string + Type string + Value interface{} + func (e FieldError) Error() string + type FieldGetter interface + GetField func(field string) (interface{}, bool) + type Group struct + AnonymousId string + Channel string + Context *Context + GroupId string + Integrations Integrations + MessageId string + Timestamp time.Time + Traits Traits + Type string + UserId string + func (msg Group) Validate() error + type Identify struct + AnonymousId string + Channel string + Context *Context + Integrations Integrations + MessageId string + Timestamp time.Time + Traits Traits + Type string + UserId string + func (msg Identify) Validate() error + type Integrations map[string]interface + func (i Integrations) Disable(name string) Integrations + func (i Integrations) DisableAll() Integrations + func (i Integrations) Enable(name string) Integrations + func (i Integrations) EnableAll() Integrations + func (i Integrations) Set(name string, value interface{}) Integrations + func NewIntegrations() Integrations + type LibraryInfo struct + Name string + Version string + type LocationInfo struct + City string + Country string + Latitude float64 + Longitude float64 + Region string + Speed float64 + type Logger interface + Errorf func(format string, args ...interface{}) + Logf func(format string, args ...interface{}) + func StdLogger(logger *log.Logger) Logger + type Message interface + Validate func() error + type NetworkInfo struct + Bluetooth bool + Carrier string + Cellular bool + WIFI bool + type OSInfo struct + Name string + Version string + type Page struct + AnonymousId string + Channel string + Context *Context + Integrations Integrations + MessageId string + Name string + Properties Properties + Timestamp time.Time + Type string + UserId string + func (msg Page) Validate() error + type PageInfo struct + Hash string + Path string + Referrer string + Search string + Title string + URL string + type Product struct + ID string + Name string + Price float64 + SKU string + type Properties map[string]interface + func (p Properties) Set(name string, value interface{}) Properties + func (p Properties) SetCategory(category string) Properties + func (p Properties) SetCoupon(coupon string) Properties + func (p Properties) SetCurrency(currency string) Properties + func (p Properties) SetDiscount(discount float64) Properties + func (p Properties) SetName(name string) Properties + func (p Properties) SetOrderId(id string) Properties + func (p Properties) SetPath(path string) Properties + func (p Properties) SetPrice(price float64) Properties + func (p Properties) SetProductId(id string) Properties + func (p Properties) SetProducts(products ...Product) Properties + func (p Properties) SetReferrer(referrer string) Properties + func (p Properties) SetRepeat(repeat bool) Properties + func (p Properties) SetRevenue(revenue float64) Properties + func (p Properties) SetSKU(sku string) Properties + func (p Properties) SetShipping(shipping float64) Properties + func (p Properties) SetSubtotal(subtotal float64) Properties + func (p Properties) SetTax(tax float64) Properties + func (p Properties) SetTitle(title string) Properties + func (p Properties) SetTotal(total float64) Properties + func (p Properties) SetURL(url string) Properties + func (p Properties) SetValue(value float64) Properties + func NewProperties() Properties + type ReferrerInfo struct + Link string + Name string + Type string + URL string + type Screen struct + AnonymousId string + Channel string + Context *Context + Integrations Integrations + MessageId string + Name string + Properties Properties + Timestamp time.Time + Type string + UserId string + func (msg Screen) Validate() error + type ScreenInfo struct + Density int + Height int + Width int + type Track struct + AnonymousId string + Channel string + Context *Context + Event string + Integrations Integrations + MessageId string + Properties Properties + Timestamp time.Time + Type string + UserId string + func (msg Track) Validate() error + type Traits map[string]interface + func (t Traits) Set(field string, value interface{}) Traits + func (t Traits) SetAddress(address string) Traits + func (t Traits) SetAge(age int) Traits + func (t Traits) SetAvatar(url string) Traits + func (t Traits) SetBirthday(date time.Time) Traits + func (t Traits) SetCreatedAt(date time.Time) Traits + func (t Traits) SetDescription(desc string) Traits + func (t Traits) SetEmail(email string) Traits + func (t Traits) SetFirstName(firstName string) Traits + func (t Traits) SetGender(gender string) Traits + func (t Traits) SetLastName(lastName string) Traits + func (t Traits) SetName(name string) Traits + func (t Traits) SetPhone(phone string) Traits + func (t Traits) SetTitle(title string) Traits + func (t Traits) SetUsername(username string) Traits + func (t Traits) SetWebsite(url string) Traits + func NewTraits() Traits Other modules containing this package github.com/rudderlabs/analytics-go