tracking

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

APIClient represents the API client informations

func NewAPIClient

func NewAPIClient(envID string, params ...func(r *decisionapi.APIClient)) (*APIClient, error)

NewAPIClient creates a tracking API Client with environment ID and option builders

func (APIClient) ActivateCampaign

func (r APIClient) ActivateCampaign(request model.ActivationHit) error

ActivateCampaign activate a campaign / variation id to the Decision API

func (APIClient) SendEvent

func (r APIClient) SendEvent(request model.Event) error

SendEvent sends an event to the Flagship event collection

func (APIClient) SendHit

func (r APIClient) SendHit(visitorID string, hit model.HitInterface) error

SendHit sends a tracking hit to the Data Collect API

type APIClientInterface

type APIClientInterface interface {
	SendHit(visitorID string, hit model.HitInterface) error
	ActivateCampaign(request model.ActivationHit) error
	SendEvent(request model.Event) error
}

APIClientInterface sends a hit to the data collect

type MockAPIClient

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

MockAPIClient represents a fake API client informations

func NewMockAPIClient

func NewMockAPIClient(envID string, shouldFail bool) *MockAPIClient

NewMockAPIClient creates a mock API client that returns success or fail status

func (MockAPIClient) SendHit

func (r MockAPIClient) SendHit(hit model.HitInterface) error

SendHit sends a tracking hit to the Data Collect API

Jump to

Keyboard shortcuts

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