Versions in this module Expand all Collapse all v0 v0.0.1 Oct 31, 2026 Changes in this version + const Version + var ErrAborted error = codeError(connect.CodeAborted) + var ErrAlreadyExists error = codeError(connect.CodeAlreadyExists) + var ErrCanceled error = codeError(connect.CodeCanceled) + var ErrClosed = ingest.ErrClosed + var ErrDataLoss error = codeError(connect.CodeDataLoss) + var ErrDeadlineExceeded error = codeError(connect.CodeDeadlineExceeded) + var ErrFailedPrecondition error = codeError(connect.CodeFailedPrecondition) + var ErrInternal error = codeError(connect.CodeInternal) + var ErrInvalidArgument error = codeError(connect.CodeInvalidArgument) + var ErrNotFound error = codeError(connect.CodeNotFound) + var ErrOutOfRange error = codeError(connect.CodeOutOfRange) + var ErrPermissionDenied error = codeError(connect.CodePermissionDenied) + var ErrQueueOverflow = ingest.ErrQueueOverflow + var ErrResourceExhausted error = codeError(connect.CodeResourceExhausted) + var ErrUnauthenticated error = codeError(connect.CodeUnauthenticated) + var ErrUnavailable error = codeError(connect.CodeUnavailable) + var ErrUnimplemented error = codeError(connect.CodeUnimplemented) + var ErrUnknown error = codeError(connect.CodeUnknown) + type ActivityClient struct + func (a *ActivityClient) EventExplorer(ctx context.Context, req *activityv1.GetEventExplorerRequest) (*activityv1.GetEventExplorerResponse, error) + func (a *ActivityClient) Feed(ctx context.Context, req *activityv1.GetActivityFeedRequest) (*activityv1.GetActivityFeedResponse, error) + func (a *ActivityClient) FilterSchema(ctx context.Context, req *commonv1.GetFilterSchemaRequest) (*commonv1.GetFilterSchemaResponse, error) + func (a *ActivityClient) Heatmap(ctx context.Context, req *activityv1.GetActivityHeatmapRequest) (*activityv1.GetActivityHeatmapResponse, error) + func (a *ActivityClient) ProfileSessions(ctx context.Context, req *activityv1.GetProfileSessionsRequest) (*activityv1.GetProfileSessionsResponse, error) + func (a *ActivityClient) ProfileStats(ctx context.Context, req *activityv1.GetProfileStatsRequest) (*activityv1.GetProfileStatsResponse, error) + func (a *ActivityClient) PropertyValues(ctx context.Context, req *activityv1.GetPropertyValuesRequest) (*activityv1.GetPropertyValuesResponse, error) + type BatchConfig struct + MaxQueueSize int + MaxSize int + MaxWait time.Duration + type Client struct + Activity *ActivityClient + Insights *InsightsClient + Profiles *ProfilesClient + func New(opts Options) (*Client, error) + func (c *Client) Close(ctx context.Context) error + func (c *Client) Flush(ctx context.Context) error + func (c *Client) Identify(externalID string, opts ...IdentifyOption) + func (c *Client) Track(distinctID string, kind Kind, opts ...TrackOption) + func (c *Client) TrackWellKnown(distinctID string, event proto.Message, opts ...TrackOption) + type Coordinates struct + Latitude float64 + Longitude float64 + type Error struct + Code connect.Code + Err error + Message string + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type Event = eventsv1.Event + type Field struct + func Any(key string, value any) Field + func Bool(key string, value bool) Field + func Duration(key string, value time.Duration) Field + func Float(key string, value float64) Field + func Int[T integer](key string, value T) Field + func String(key, value string) Field + func Time(key string, value time.Time) Field + type GetOption func(*getOptions) + func IncludeBots() GetOption + type Identify = sdkprofilesv1.IdentifyRequest + type IdentifyOption interface + func Avatar(value string) IdentifyOption + func Email(value string) IdentifyOption + func FirstName(value string) IdentifyOption + func LastName(value string) IdentifyOption + func Name(value string) IdentifyOption + func WithAnonymousID(id string) IdentifyOption + func WithDeviceID(id string) IdentifyOption + type InsightsClient struct + func (i *InsightsClient) FilterSchema(ctx context.Context, req *commonv1.GetFilterSchemaRequest) (*commonv1.GetFilterSchemaResponse, error) + func (i *InsightsClient) PropertyValues(ctx context.Context, req *insightsv1.GetPropertyValuesRequest) (*insightsv1.GetPropertyValuesResponse, error) + func (i *InsightsClient) Query(ctx context.Context, req *insightsv1.QueryRequest) (*insightsv1.QueryResponse, error) + func (i *InsightsClient) SegmentUsers(ctx context.Context, req *insightsv1.SegmentUsersRequest) (*insightsv1.SegmentUsersResponse, error) + type Kind string + type Location struct + City string + Continent string + Coordinates *Coordinates + Country string + MetroCode string + PostalCode string + Region string + Timezone string + type OnError func(err error, lost Undelivered) + type Options struct + APIKey string + Batch BatchConfig + Endpoint string + HTTPClient *http.Client + Logger *slog.Logger + OnError OnError + Timeout time.Duration + type ProfilesClient struct + func (p *ProfilesClient) Delete(ctx context.Context, id string) (*profilesv1.DeleteResponse, error) + func (p *ProfilesClient) Get(ctx context.Context, id string, opts ...GetOption) (*profilesv1.Profile, error) + func (p *ProfilesClient) GetByExternalID(ctx context.Context, externalID string, opts ...GetOption) (*profilesv1.Profile, error) + func (p *ProfilesClient) List(ctx context.Context, req *profilesv1.ListRequest) iter.Seq2[*profilesv1.Profile, error] + type Properties map[string]any + type TrackOption interface + func WithLocation(loc Location) TrackOption + func WithSessionID(id string) TrackOption + func WithTimestamp(t time.Time) TrackOption + type Traits map[string]any + type Undelivered struct + Events []*Event + Identifies []*Identify