mixpanel

package
v0.0.0-...-7841a0e Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthTransport

type BasicAuthTransport struct {
	APISecret string
}

func (BasicAuthTransport) RoundTrip

func (ba BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Client

type Client struct {
	*http.Client
}

func NewClient

func NewClient(apiSecret string) *Client

func (Client) Export

func (c Client) Export(ctx context.Context, fromDate, toDate time.Time) (ers *ExportResultScanner, err error)

type Event

type Event struct {
	Event      string
	Properties EventProperties
}

func ParseEvent

func ParseEvent(data []byte) (rawData *Event, err error)

type EventProperties

type EventProperties struct {
	DistinctID              *string      `json:"distinct_id,omitempty"`
	Time                    *int         `json:"time,omitempty"`
	OS                      *string      `json:"$os,omitempty"`
	Browser                 *string      `json:"$browser,omitempty"`
	ProjectID               *string      `json:"Project ID,omitempty"`
	Code                    *string      `json:"code,omitempty"`
	ScreenClass             *string      `json:"screen_class,omitempty"`
	ProductCategory         *string      `json:"product_category,omitempty"`
	MPDeviceModel           *string      `json:"mp_device_model,omitempty"`
	Manufacturer            *string      `json:"$manufacturer,omitempty"`
	ActiveDeviceConfigFlags *[]string    `json:"active_device_config_flags,omitempty"`
	ScreenWidth             *int         `json:"$screen_width,omitempty"`
	City                    *string      `json:"city,omitempty"`
	Label                   interface{}  `json:"label,omitempty"` // string array and strings are being send
	UnderwritersIDs         *[]string    `json:"underwriters_ids,omitempty"`
	UserID                  *string      `json:"user_id,omitempty"`
	SameAsResiAddress       *bool        `json:"same_as_resi_address,omitempty"`
	Service                 *string      `json:"service,omitempty"`
	Radio                   *string      `json:"$radio,omitempty"`
	ScreenName              *string      `json:"screen_name,omitempty"`
	AppRelease              interface{}  ` json:"$app_release,omitempty"` // Both strings and integers are being send.
	ScreenHeight            *int         `json:"$screen_height,omitempty"`
	DeviceID                *string      `json:"$device_id,omitempty"`
	MPCountryCode           *string      `json:"mp_country_code,omitempty"`
	Type                    *string      `json:"type,omitempty"`
	Product                 *string      `json:"product,omitempty"`
	OSVersion               *string      `json:"$os_version,omitempty"`
	WiFi                    *bool        `json:"$wifi,omitempty"`
	LibVersion              *string      `json:"$lib_version,omitempty"`
	Error                   *string      `json:"error,omitempty"`
	IOSIFA                  *string      `json:"$ios_ifa,omitempty"`
	ApplePay                *bool        `json:"apple-pay,omitempty"`
	Action                  *string      `json:"action,omitempty"`
	UnderwriterID           *string      `json:"underwriter-id,omitempty"`
	ProductCategories       *string      `json:"product_categories,omitempty"`
	AppBuildNumber          *interface{} `json:"$app_build_number,omitempty"` // Both strings and integers are being send.
	ActiveConfigFlags       *[]string    `json:"active_config_flags,omitempty"`
	AppVersionString        *string      `json:"$app_version_string,omitempty"`
	GUID                    *string      `json:"guid,omitempty"`
	Model                   *string      `json:"$model,omitempty"`
	Region                  *string      `json:"$region,omitempty"`
	MPLib                   *string      `json:"mp_lib,omitempty"`
	Value                   *interface{} `json:"value,omitempty"` // Both strings and integers are being send.
	AppVersion              *string      `json:"$app_version,omitempty"`
	MPProcessingTimeMs      *int         `json:"mp_processing_time_ms,omitempty"`
	Identifier              *string      `json:"identifier,omitempty"`
	ErrorCode               *string      `json:"error_code,omitempty"`
	InsertID                *string      `json:"$insert_id,omitempty"`
}

type ExportResultScanner

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

func NewExportResultScanner

func NewExportResultScanner(scanner bufio.Scanner) *ExportResultScanner

func (*ExportResultScanner) Bytes

func (ers *ExportResultScanner) Bytes() []byte

func (*ExportResultScanner) Err

func (ers *ExportResultScanner) Err() error

Err returns the first non-EOF error that was encountered by the ExportResultScanner.

func (*ExportResultScanner) Event

func (ers *ExportResultScanner) Event() *Event

func (*ExportResultScanner) RawEventBytes

func (ers *ExportResultScanner) RawEventBytes() []byte

func (*ExportResultScanner) Scan

func (ers *ExportResultScanner) Scan() bool

type ParseExportResultFunc

type ParseExportResultFunc func(data []byte) (event *Event, err error)

Jump to

Keyboard shortcuts

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