Documentation ¶
Index ¶
- Constants
- type Annotations
- type App
- type Browser
- type Collector
- type Contexts
- type Device
- type Enrichments
- type Envelope
- type Event
- type EventMeta
- type Group
- type JsonbEnvelope
- type Location
- type Network
- type Os
- type PageAttrs
- type Payload
- type PayloadValidationError
- type Pipeline
- type Screen
- type SelfDescribingContext
- type SelfDescribingEvent
- type SelfDescribingPayload
- func (e SelfDescribingPayload) AsByte() ([]byte, error)
- func (e SelfDescribingPayload) AsMap() (map[string]interface{}, error)
- func (e SelfDescribingPayload) PayloadAsByte() ([]byte, error)
- func (e SelfDescribingPayload) Scan(input interface{}) error
- func (e SelfDescribingPayload) SchemaName() *string
- func (e SelfDescribingPayload) Value() (driver.Value, error)
- type Session
- type Source
- type StringEnvelope
- type Team
- type User
- type Validation
- type ValidationError
- type Web
Constants ¶
View Source
const ( VENDOR string = "vendor" NAMESPACE string = "namespace" VERSION string = "version" FORMAT string = "format" PATH string = "path" INPUT_PROTOCOL string = "inputProtocol" SCHEMA string = "schema" )
View Source
const HTTP_HEADERS_CONTEXT string = "io.silverton/buz/internal/contexts/httpHeaders/v1.0.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Browser ¶
type Browser struct { Lang *string `json:"language,omitempty"` Cookies *bool `json:"cookies,omitempty"` ColorDepth *int64 `json:"colorDepth,omitempty"` Charset *string `json:"charset,omitempty"` ViewportSize *string `json:"viewportSize,omitempty"` ViewportWidth *int `json:"viewportWidth,omitempty"` ViewportHeight *int `json:"viewportHeight,omitempty"` DocumentSize *string `json:"documentSize,omitempty"` DocumentWidth *int `json:"documentWidth,omitempty"` DocumentHeight *int `json:"documentHeight,omitempty"` }
type Collector ¶
type Contexts ¶ added in v0.13.0
type Contexts map[string]interface{}
func BuildContextsFromRequest ¶ added in v0.12.1
type Device ¶
type Device struct { Ip string `json:"ip"` Useragent string `json:"useragent"` Id string `json:"id"` // Server-side cookie, header, or query params Idfa *string `json:"idfa,omitempty"` // [iOS] Idfv *string `json:"idfv,omitempty"` // [iOS] AdId *string `json:"adId,omitempty"` // [Android] Google play services advertising id AndroidId *string `json:"androidId,omitempty"` // [Android] Android id AdTrackingEnabled *bool `json:"adTrackingEnabled,omitempty"` Manufacturer *string `json:"manufacturer,omitempty"` Model *string `json:"model,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` Token *string `json:"token,omitempty"` *Os `json:"os,omitempty"` *Browser `json:"browser,omitempty"` *Screen `json:"screen,omitempty"` *Network `json:"network,omitempty"` *App `json:"app,omitempty"` *Location `json:"location,omitempty"` Traits map[string]interface{} `json:"traits,omitempty"` }
type Envelope ¶
type Envelope struct { db.BasePKeylessModel EventMeta `json:"event" gorm:"type:json"` Pipeline `json:"pipeline" gorm:"type:json"` Device `json:"device,omitempty" gorm:"type:json"` *User `json:"user,omitempty" gorm:"type:json"` *Session `json:"session,omitempty" gorm:"type:json"` *Web `json:"web,omitempty" gorm:"type:json"` *Annotations `json:"annotations,omitempty" gorm:"type:json"` *Enrichments `json:"enrichments,omitempty" gorm:"type:json"` Validation `json:"validation" gorm:"type:json"` Contexts *Contexts `json:"contexts,omitempty" gorm:"type:json"` Payload Payload `json:"payload" gorm:"type:json"` }
func BuildCommonEnvelope ¶ added in v0.12.1
func BuildCommonEnvelope(c *gin.Context, conf config.Middleware, m *meta.CollectorMeta) Envelope
type EventMeta ¶
type EventMeta struct { Protocol string `json:"protocol,omitempty"` Uuid uuid.UUID `json:"uuid,omitempty"` Vendor string `json:"vendor,omitempty"` Namespace string `json:"namespace,omitempty"` Version string `json:"version,omitempty"` Format string `json:"format,omitempty"` Schema string `json:"schema,omitempty"` DisableValidation bool `json:"disableValidation,omitempty"` }
func (*EventMeta) DbSchemaName ¶ added in v0.12.2
Return the desired database schema name using event metadata. An event with `com.something` vendor should be directed into a `com_something` schema.
func (*EventMeta) DbTableName ¶ added in v0.12.2
Return the desired database table name using event metadata. An event with a namespace of `some.namespace.something` and a version of `1.0` and/or `1.1` should be directed into a `some_namespace_something_1` table.
type JsonbEnvelope ¶
type JsonbEnvelope struct { db.BasePKeylessModel EventMeta `json:"event" gorm:"type:jsonb"` Pipeline `json:"pipeline" gorm:"type:jsonb"` *Device `json:"device" gorm:"type:jsonb"` *User `json:"user" gorm:"type:jsonb"` *Session `json:"session" gorm:"type:jsonb"` *Web `json:"web" gorm:"type:jsonb"` *Annotations `json:"annotations" gorm:"type:jsonb"` *Enrichments `json:"enrichments" gorm:"type:jsonb"` Validation `json:"validation" gorm:"type:jsonb"` Contexts *Contexts `json:"contexts" gorm:"type:jsonb"` Payload Payload `json:"payload" gorm:"type:jsonb"` }
type PageAttrs ¶
type PageAttrs struct { Url string `json:"url,omitempty"` Title *string `json:"title,omitempty"` Scheme string `json:"scheme,omitempty"` Host string `json:"host,omitempty"` Port string `json:"port,omitempty"` Path string `json:"path,omitempty"` Query *map[string]interface{} `json:"query,omitempty"` Fragment *string `json:"fragment,omitempty"` Medium *string `json:"medium,omitempty"` Source *string `json:"source,omitempty"` Term *string `json:"term,omitempty"` Content *string `json:"content,omitempty"` Campaign *string `json:"campaign,omitempty"` }
type PayloadValidationError ¶
type SelfDescribingContext ¶ added in v0.13.0
type SelfDescribingContext SelfDescribingPayload
type SelfDescribingEvent ¶ added in v0.13.0
type SelfDescribingEvent struct { Contexts `json:"contexts"` Payload SelfDescribingPayload `json:"payload"` }
type SelfDescribingPayload ¶ added in v0.13.0
type SelfDescribingPayload struct { Schema string `json:"schema"` Data map[string]interface{} `json:"data"` }
func (SelfDescribingPayload) AsByte ¶ added in v0.13.0
func (e SelfDescribingPayload) AsByte() ([]byte, error)
func (SelfDescribingPayload) AsMap ¶ added in v0.13.0
func (e SelfDescribingPayload) AsMap() (map[string]interface{}, error)
func (SelfDescribingPayload) PayloadAsByte ¶ added in v0.13.0
func (e SelfDescribingPayload) PayloadAsByte() ([]byte, error)
func (SelfDescribingPayload) Scan ¶ added in v0.13.0
func (e SelfDescribingPayload) Scan(input interface{}) error
func (SelfDescribingPayload) SchemaName ¶ added in v0.13.0
func (e SelfDescribingPayload) SchemaName() *string
type Session ¶
type Source ¶
type StringEnvelope ¶
type StringEnvelope struct { db.BasePKeylessModel EventMeta `json:"event" gorm:"type:string"` Pipeline `json:"pipeline" gorm:"type:string"` *Device `json:"device" gorm:"type:string"` *User `json:"user" gorm:"type:string"` *Session `json:"session" gorm:"type:string"` *Web `json:"web" gorm:"type:string"` *Annotations `json:"annotations" gorm:"type:string"` *Enrichments `json:"enrichments" gorm:"type:string"` Validation `json:"validation" gorm:"type:string"` Contexts *Contexts `json:"contexts" gorm:"type:string"` Payload Payload `json:"payload" gorm:"type:string"` }
type User ¶
type Validation ¶
type Validation struct { IsValid *bool `json:"isValid"` Error *ValidationError `json:"error,omitempty"` }
func (Validation) Scan ¶
func (e Validation) Scan(input interface{}) error
type ValidationError ¶
type ValidationError struct { ErrorType *string `json:"errorType,omitempty"` ErrorResolution *string `json:"errorResolution,omitempty"` Errors []PayloadValidationError `json:"payloadValidationErrors,omitempty"` }
func (*ValidationError) Scan ¶
func (e *ValidationError) Scan(input interface{}) error
Click to show internal directories.
Click to hide internal directories.