Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorHandlingTracking = errors.New(errors.LevelError, int(web.StatusNotFound), "error handling tracking [error: %s]") ErrorTrackingStatus = errors.New(errors.LevelError, 1, "error sending tracking [status: %d, error: %s]") )
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
WebTracking *WebTrackingConfig `json:"web-tracking"`
}
AppConfig ...
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(service *WebTracking) *Controller
func (*Controller) DummyHandler ¶
func (c *Controller) DummyHandler(ctx *web.Context) error
func (*Controller) MiddlewareTracking ¶
func (c *Controller) MiddlewareTracking() web.MiddlewareFunc
func (*Controller) RegisterRoutes ¶
func (c *Controller) RegisterRoutes(w manager.IWeb) error
type TrackingRequest ¶
type TrackingRequest struct {
Tracking struct {
Category *string `json:"category" validate:"notzero"`
Action *string `json:"action" validate:"notzero"`
Label *string `json:"label"`
Value *int64 `json:"value"`
Viewer *string `json:"viewer"`
Viewed *string `json:"viewed"`
Latitude *float64 `json:"latitude"`
Longitude *float64 `json:"longitude"`
Street *string `json:"street"`
MetaData *json.RawMessage `json:"meta_data"`
} `json:"tracking"`
}
type WebTracking ¶
type WebTracking struct {
// contains filtered or unexported fields
}
func NewWebTracking ¶
func NewWebTracking(options ...WebTrackingOption) (*WebTracking, error)
NewWebTracking ...
func (*WebTracking) Reconfigure ¶
func (w *WebTracking) Reconfigure(options ...WebTrackingOption)
Reconfigure ...
type WebTrackingConfig ¶
type WebTrackingConfig struct {
Host string `json:"host"`
TrackingHost string `json:"tracking_host"`
Log struct {
Level string `json:"level"`
} `json:"log"`
}
WebTrackingConfig ...
type WebTrackingOption ¶
type WebTrackingOption func(w *WebTracking)
WebTrackingOption ...
func WithConfiguration ¶
func WithConfiguration(config *WebTrackingConfig) WebTrackingOption
WithConfiguration ...
Source Files
¶
Click to show internal directories.
Click to hide internal directories.