Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EventSchemaMap = map[AppMetricEventType]interface{}{ NavigateTo: NavigateToCofxSchema, ScreensOnWillFocus: NavigateToCofxSchema, }
EventSchemaMap Every event should have a schema attached
View Source
string]interface{}{ "view_id": map[string]interface{}{ "type": "string", "maxLength": 32, }, "params": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "screen": map[string]interface{}{ "type": "string", "maxLength": 32, }, }, "additionalProperties": false, "required": []string{"screen"}, }, }, "additionalProperties": false, "required": []string{"view_id", "params"}, }"type": "object", "properties": map[
Functions ¶
This section is empty.
Types ¶
type AppMetric ¶
type AppMetric struct { Event AppMetricEventType `json:"event"` Value json.RawMessage `json:"value"` AppVersion string `json:"app_version"` OS string `json:"os"` SessionID string `json:"session_id"` CreatedAt string `json:"created_at"` }
Value is `json.RawMessage` so we can send any json shape, including strings Validation is handled using JSON schemas defined in validators.go, instead of Golang structs
type AppMetricEventType ¶
type AppMetricEventType string
const ( // status-react navigation events ScreensOnWillFocus AppMetricEventType = "screens/on-will-focus" )
type AppMetricValidationError ¶
type AppMetricValidationError struct { Metric AppMetric Errors []gojsonschema.ResultError }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database sql wrapper for operations with browser objects.
func (*Database) GetAppMetrics ¶
func (*Database) SaveAppMetrics ¶
func (*Database) ValidateAppMetrics ¶
Click to show internal directories.
Click to hide internal directories.