apptimize

package module
v0.0.0-...-2703089 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 7 Imported by: 0

README

go report card GoDoc

The Apptimize SDK for Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadAttributes = fmt.Errorf("track only supports a single map or struct of key -> value pairs")

ErrBadAttributes is the error returned when too many attribute maps or structs are passed into the track method

Functions

This section is empty.

Types

type Apptimize

type Apptimize interface {
	// Variant returns the variant of the code block that should be executed for a user in an experiment
	Variant(userID, experiment string) (string, error)

	// Track tracks a significant user event within an experiment
	Track(userID, event string, attributes ...interface{}) error
}

Apptimize is a partially implemented aptimize sdk in golang.

func New

func New(cfg *Config) Apptimize

New returns a new Apptimize instance

type Config

type Config struct {
	// APIToken is the API Token from the Apptimize dashboard (required)
	APIToken string

	// AppName is the name of the customer application (optional)
	AppName string

	// AppVersion is the version number of the customer application (optional)
	AppVersion string
}

Config are the config parameters of the apptimze interface

Jump to

Keyboard shortcuts

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