Documentation
¶
Index ¶
- func CompressFiles(input *core.InputFiles) ([]byte, error)
- func CreateUser(email string) error
- func SendTrackingToServer(bundle *Client) error
- type AnalyticsFile
- type Client
- func (t *Client) AppendProperties(properties map[string]interface{})
- func (t *Client) Debug(event string)
- func (t *Client) Error(event string)
- func (t *Client) Hash(value any) string
- func (t *Client) Info(event string)
- func (client *Client) NewFieldListener(level zapcore.LevelEnabler) zapcore.Core
- func (t *Client) Panic(event string)
- func (t *Client) PanicHandler(err *error, errHandler ErrorHandler)
- func (t *Client) UploadSource(source *core.InputFiles)
- func (t *Client) Warn(event string)
- type ErrorHandler
- type LogLevel
- type User
- type Validated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressFiles ¶
func CompressFiles(input *core.InputFiles) ([]byte, error)
func CreateUser ¶
func SendTrackingToServer ¶
Types ¶
type AnalyticsFile ¶
type Client ¶
type Client struct {
UserId string `json:"id"`
Event string `json:"event"`
Source []byte `json:"source,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
}
func (*Client) AppendProperties ¶
func (*Client) Hash ¶
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) 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)
type ErrorHandler ¶
type ErrorHandler interface {
PrintErr(err error)
}
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:"-"`
}
func RetrieveUser ¶
func RetrieveUser(result AnalyticsFile) *User
func (*User) CheckUserEmailValidation ¶
func (*User) RegisterUser ¶
func (*User) SendUserEmailValidation ¶
Click to show internal directories.
Click to hide internal directories.