analytics

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressFiles

func CompressFiles(input *core.InputFiles) ([]byte, error)

Types

type AnalyticsFile

type AnalyticsFile struct {
	Id string
}

func GetOrCreateAnalyticsFile added in v0.6.3

func GetOrCreateAnalyticsFile() AnalyticsFile

type Client

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

func NewClient

func NewClient() *Client

func (*Client) AppendProperties

func (t *Client) AppendProperties(properties map[string]interface{})

func (*Client) AppendProperty added in v0.6.3

func (t *Client) AppendProperty(key string, value any)

func (*Client) AttachAuthorizations added in v0.6.3

func (t *Client) AttachAuthorizations(loginInfo auth.LoginInfo)

func (*Client) Error

func (t *Client) Error(event string)

func (*Client) Hash

func (t *Client) Hash(value any) string

Hash hashes a value, using this analytic sender's userId as a salt. It does not output anything or in any way modify the sender's state.

func (*Client) Info

func (t *Client) Info(event string)

func (*Client) NewFieldListener

func (client *Client) NewFieldListener(level zapcore.LevelEnabler) zapcore.Core

func (*Client) PanicHandler

func (t *Client) PanicHandler(err *error, errHandler ErrorHandler)

func (*Client) UploadSource

func (t *Client) UploadSource(source *core.InputFiles)

func (*Client) Warn

func (t *Client) Warn(event string)

type ErrorHandler

type ErrorHandler interface {
	PrintErr(err error)
}

type LogLevel

type LogLevel string
const (
	Panic LogLevel = "panic"
	Error LogLevel = "error"
	Warn  LogLevel = "warn"
	Info  LogLevel = "info"
	Debug LogLevel = "debug"
)

type Payload added in v0.6.3

type Payload struct {
	UserId     string         `json:"id"`
	Event      string         `json:"event"`
	Source     []byte         `json:"source,omitempty"`
	Properties map[string]any `json:"properties"`
}

type User

type User struct {
	Email string `json:"email,omitempty"`
	// uuid generated if user does not provide email
	Id string `json:"id,omitempty"`
	// omit validated field from being saved since we wouldn't trust the client side value anyways
	Validated bool `json:"-"`
}

type Validated

type Validated struct {
	Validated bool
}

Jump to

Keyboard shortcuts

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