ampli

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdentifyEventType      = amplitude.IdentifyEventType
	GroupIdentifyEventType = amplitude.GroupIdentifyEventType

	ServerZoneUS = amplitude.ServerZoneUS
	ServerZoneEU = amplitude.ServerZoneEU
)

Variables

View Source
var (
	NewClientConfig = amplitude.NewConfig
	NewClient       = amplitude.NewClient
)
View Source
var Command = struct {
	Builder func() interface {
		Arguments(arguments []string) interface {
			CalledAs(calledAs string) interface {
				CommandName(commandName string) interface {
					CommandPath(commandPath string) CommandBuilder
				}
			}
		}
	}
}{
	Builder: func() interface {
		Arguments(arguments []string) interface {
			CalledAs(calledAs string) interface {
				CommandName(commandName string) interface {
					CommandPath(commandPath string) CommandBuilder
				}
			}
		}
	} {
		return &commandBuilder{
			properties: map[string]interface{}{},
		}
	},
}
View Source
var Identify = struct {
	Builder func() interface {
		DdevEnvironment(ddevEnvironment string) interface {
			DockerPlatform(dockerPlatform string) interface {
				DockerVersion(dockerVersion string) interface {
					Timezone(timezone string) IdentifyBuilder
				}
			}
		}
	}
}{
	Builder: func() interface {
		DdevEnvironment(ddevEnvironment string) interface {
			DockerPlatform(dockerPlatform string) interface {
				DockerVersion(dockerVersion string) interface {
					Timezone(timezone string) IdentifyBuilder
				}
			}
		}
	} {
		return &identifyBuilder{
			properties: map[string]interface{}{},
		}
	},
}
View Source
var Instance = Ampli{}
View Source
var Project = struct {
	Builder func() interface {
		AddOns(addOns []string) interface {
			Containers(containers []string) interface {
				ContainersOmitted(containersOmitted []string) interface {
					FailOnHookFail(failOnHookFail bool) interface {
						Id(id string) interface {
							NodejsVersion(nodejsVersion string) interface {
								PerformanceMode(performanceMode string) interface {
									PhpVersion(phpVersion string) interface {
										ProjectType(projectType string) interface {
											RouterDisabled(routerDisabled bool) interface {
												WebserverType(webserverType string) ProjectBuilder
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}{
	Builder: func() interface {
		AddOns(addOns []string) interface {
			Containers(containers []string) interface {
				ContainersOmitted(containersOmitted []string) interface {
					FailOnHookFail(failOnHookFail bool) interface {
						Id(id string) interface {
							NodejsVersion(nodejsVersion string) interface {
								PerformanceMode(performanceMode string) interface {
									PhpVersion(phpVersion string) interface {
										ProjectType(projectType string) interface {
											RouterDisabled(routerDisabled bool) interface {
												WebserverType(webserverType string) ProjectBuilder
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	} {
		return &projectBuilder{
			properties: map[string]interface{}{},
		}
	},
}

Functions

This section is empty.

Types

type Ampli

type Ampli struct {
	Disabled bool
	Client   amplitude.Client
	// contains filtered or unexported fields
}

func (*Ampli) Command

func (a *Ampli) Command(userID string, event CommandEvent, eventOptions ...EventOptions)

func (*Ampli) Flush

func (a *Ampli) Flush()

Flush flushes events waiting in buffer.

func (*Ampli) Identify

func (a *Ampli) Identify(userID string, identify IdentifyEvent, eventOptions ...EventOptions)

Identify identifies a user and set user properties.

func (*Ampli) InitializedAndEnabled

func (a *Ampli) InitializedAndEnabled() bool

InitializedAndEnabled checks if Ampli is initialized and enabled.

func (*Ampli) Load

func (a *Ampli) Load(options LoadOptions)

Load initializes the Ampli wrapper. Call once when your application starts.

func (*Ampli) Project

func (a *Ampli) Project(userID string, event ProjectEvent, eventOptions ...EventOptions)

func (*Ampli) Shutdown

func (a *Ampli) Shutdown()

Shutdown disables and shutdowns Ampli Instance.

func (*Ampli) Track

func (a *Ampli) Track(userID string, event Event, eventOptions ...EventOptions)

Track tracks an event.

type CommandBuilder

type CommandBuilder interface {
	Build() CommandEvent
}

type CommandEvent

type CommandEvent interface {
	Event
	// contains filtered or unexported methods
}

type Environment

type Environment string
const (
	EnvironmentDevelopment Environment = `development`

	EnvironmentProduction Environment = `production`
)

type Event

type Event interface {
	ToAmplitudeEvent() amplitude.Event
}

type EventOptions

type EventOptions = amplitude.EventOptions

type ExecuteResult

type ExecuteResult = amplitude.ExecuteResult

type IdentifyBuilder

type IdentifyBuilder interface {
	Build() IdentifyEvent
	User(user string) IdentifyBuilder
	WslDistro(wslDistro string) IdentifyBuilder
}

type IdentifyEvent

type IdentifyEvent interface {
	Event
	// contains filtered or unexported methods
}

type LoadClientOptions

type LoadClientOptions struct {
	APIKey        string
	Instance      amplitude.Client
	Configuration amplitude.Config
}

LoadClientOptions is Client options setting to initialize Ampli client.

Params:

  • APIKey: the API key of Amplitude project
  • Instance: the core SDK instance used by Ampli client
  • Configuration: the core SDK client configuration instance

type LoadOptions

type LoadOptions struct {
	Environment Environment
	Disabled    bool
	Client      LoadClientOptions
}

LoadOptions is options setting to initialize Ampli client.

Params:

  • Environment: the environment of Amplitude Data project
  • Disabled: the flag of disabled Ampli client
  • Client: the LoadClientOptions struct

type ProjectBuilder

type ProjectBuilder interface {
	Build() ProjectEvent
	DatabaseType(databaseType string) ProjectBuilder
	DatabaseVersion(databaseVersion string) ProjectBuilder
	Router(router string) ProjectBuilder
}

type ProjectEvent

type ProjectEvent interface {
	Event
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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