Documentation ¶
Index ¶
- Constants
- Variables
- type Ampli
- func (a *Ampli) Command(userID string, event CommandEvent, eventOptions ...EventOptions)
- func (a *Ampli) Flush()
- func (a *Ampli) Identify(userID string, identify IdentifyEvent, eventOptions ...EventOptions)
- func (a *Ampli) InitializedAndEnabled() bool
- func (a *Ampli) Load(options LoadOptions)
- func (a *Ampli) Project(userID string, event ProjectEvent, eventOptions ...EventOptions)
- func (a *Ampli) Shutdown()
- func (a *Ampli) Track(userID string, event Event, eventOptions ...EventOptions)
- type CommandBuilder
- type CommandEvent
- type Environment
- type Event
- type EventOptions
- type ExecuteResult
- type IdentifyBuilder
- type IdentifyEvent
- type LoadClientOptions
- type LoadOptions
- type ProjectBuilder
- type ProjectEvent
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 APIKey = map[Environment]string{ EnvironmentDevelopment: ``, EnvironmentProduction: ``, }
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) Identify ¶
func (a *Ampli) Identify(userID string, identify IdentifyEvent, eventOptions ...EventOptions)
Identify identifies a user and set user properties.
func (*Ampli) InitializedAndEnabled ¶
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)
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 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 }
Click to show internal directories.
Click to hide internal directories.