analytics

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationDeploymentWebhookTrack added in v0.8.0

func ApplicationDeploymentWebhookTrack(opts *ApplicationDeploymentWebhookTrackOpts) segmentTrack

ApplicationDeploymentWebhookTrack returns a new track for when an application launch has completed from a webhook

func ApplicationLaunchStartTrack added in v0.8.0

func ApplicationLaunchStartTrack(opts *ApplicationLaunchStartTrackOpts) segmentTrack

ApplicationLaunchStartTrack returns a new track for when an application launch has started

func ApplicationLaunchSuccessTrack added in v0.8.0

func ApplicationLaunchSuccessTrack(opts *ApplicationLaunchSuccessTrackOpts) segmentTrack

ApplicationLaunchSuccessTrack returns a new track for when an application launch has completed

func ClusterConnectionStartTrack added in v0.8.0

func ClusterConnectionStartTrack(opts *ClusterConnectionStartTrackOpts) segmentTrack

ClusterConnectionStartTrack returns a new track for when a cluster connection has started

func ClusterConnectionSuccessTrack added in v0.8.0

func ClusterConnectionSuccessTrack(opts *ClusterConnectionSuccessTrackOpts) segmentTrack

ClusterConnectionSuccessTrack returns a new track for when a cluster connection has finished

func ClusterDestroyingStartTrack added in v0.10.2

func ClusterDestroyingStartTrack(opts *ClusterDestroyingStartTrackOpts) segmentTrack

ClusterDestroyingStartTrack returns a track for when a cluster has started destroying

func ClusterDestroyingSuccessTrack added in v0.10.2

func ClusterDestroyingSuccessTrack(opts *ClusterDestroyingSuccessTrackOpts) segmentTrack

ClusterDestroyingSuccessTrack returns a new track for when a cluster has successfully provisioned

func ClusterProvisioningErrorTrack added in v0.8.0

func ClusterProvisioningErrorTrack(opts *ClusterProvisioningErrorTrackOpts) segmentTrack

ClusterProvisioningErrorTrack returns a track for when a cluster has experienced a provisioning error

func ClusterProvisioningStartTrack added in v0.8.0

func ClusterProvisioningStartTrack(opts *ClusterProvisioningStartTrackOpts) segmentTrack

ClusterProvisioningStartTrack returns a track for when a cluster has started provisioning

func ClusterProvisioningSuccessTrack added in v0.8.0

func ClusterProvisioningSuccessTrack(opts *ClusterProvisioningSuccessTrackOpts) segmentTrack

ClusterProvisioningSuccessTrack returns a new track for when a cluster has successfully provisioned

func CreateSegmentIdentifyUser added in v0.8.0

func CreateSegmentIdentifyUser(user *models.User) *segmentIdentifyNewUser

CreateSegmentIdentifyUser creates an identifier for users

func GithubConnectionStartTrack added in v0.8.0

func GithubConnectionStartTrack(opts *GithubConnectionStartTrackOpts) segmentTrack

GithubConnectionStartTrack returns a new track for when a github account connection has started

func GithubConnectionSuccessTrack added in v0.8.0

func GithubConnectionSuccessTrack(opts *GithubConnectionSuccessTrackOpts) segmentTrack

GithubConnectionSuccessTrack returns a new track when a github account connection has completed

func ProjectCreateTrack added in v0.8.0

func ProjectCreateTrack(opts *ProjectCreateTrackOpts) segmentTrack

ProjectCreateTrack returns a track for when a project is created

func RegistryConnectionStartTrack added in v0.8.0

func RegistryConnectionStartTrack(opts *RegistryConnectionStartTrackOpts) segmentTrack

RegistryConnectionStartTrack returns a new track for when a registry connection has started

func RegistryConnectionSuccessTrack added in v0.8.0

func RegistryConnectionSuccessTrack(opts *RegistryConnectionSuccessTrackOpts) segmentTrack

RegistryConnectionSuccessTrack returns a new track for when a registry connection has completed

func RegistryProvisioningErrorTrack added in v0.8.0

func RegistryProvisioningErrorTrack(opts *RegistryProvisioningErrorTrackOpts) segmentTrack

RegistryProvisioningErrorTrack returns a new track for when a registry provisioning has failed

func RegistryProvisioningStartTrack added in v0.8.0

func RegistryProvisioningStartTrack(opts *RegistryProvisioningStartTrackOpts) segmentTrack

RegistryProvisioningStartTrack returns a new track for when a registry provisioning has started

func RegistryProvisioningSuccessTrack added in v0.8.0

func RegistryProvisioningSuccessTrack(opts *RegistryProvisioningSuccessTrackOpts) segmentTrack

RegistryProvisioningSuccessTrack returns a new track for when a registry provisioning has completed

func UserCreateTrack added in v0.8.0

func UserCreateTrack(opts *UserCreateTrackOpts) segmentTrack

UserCreateTrack returns a track for when a user is created

func UserVerifyEmailTrack added in v0.8.1

func UserVerifyEmailTrack(opts *UserVerifyEmailTrackOpts) segmentTrack

UserVerifyEmailTrack returns a track for when a user's email is verified

Types

type AnalyticsSegment

type AnalyticsSegment struct {
	segment.Client
	// contains filtered or unexported fields
}

func (*AnalyticsSegment) Identify

func (c *AnalyticsSegment) Identify(identifier segmentIdentifier) error

func (*AnalyticsSegment) Track

func (c *AnalyticsSegment) Track(track segmentTrack) error

Superset of segment client track function, this will accept analytics defined tracks only and will log an error if the client is not initialized

type AnalyticsSegmentClient

type AnalyticsSegmentClient interface {
	Identify(segmentIdentifier) error
	Track(segmentTrack) error
}

func InitializeAnalyticsSegmentClient

func InitializeAnalyticsSegmentClient(segmentClientKey string, logger *logger.Logger) AnalyticsSegmentClient

Initialize the segment client and return a superset of it, the AnalyticsSegmentClient will handle cases when the segment client failed on initialization or not enabled

type ApplicationDeploymentWebhookTrackOpts added in v0.8.0

type ApplicationDeploymentWebhookTrackOpts struct {
	*ApplicationScopedTrackOpts

	ImageURI string
}

ApplicationDeploymentWebhookTrackOpts are the options for creating a track when an application launch has completed from a webhook

type ApplicationLaunchStartTrackOpts added in v0.8.0

type ApplicationLaunchStartTrackOpts struct {
	*ClusterScopedTrackOpts

	FlowID string
}

ApplicationLaunchStartTrackOpts are the options for creating a track when an application launch has started

type ApplicationLaunchSuccessTrackOpts added in v0.8.0

type ApplicationLaunchSuccessTrackOpts struct {
	*ApplicationScopedTrackOpts

	FlowID string
}

ApplicationLaunchSuccessTrackOpts are the options for creating a track when an application launch has completed

type ApplicationScopedTrack added in v0.8.0

type ApplicationScopedTrack struct {
	*ClusterScopedTrack
	// contains filtered or unexported fields
}

ApplicationScopedTrack is a track that automatically adds an app name and namespace to the track

type ApplicationScopedTrackOpts added in v0.8.0

type ApplicationScopedTrackOpts struct {
	*ClusterScopedTrackOpts

	Name      string
	Namespace string
	ChartName string
}

ApplicationScopedTrackOpts are the options for created a new app-scoped track

func GetApplicationScopedTrackOpts added in v0.8.0

func GetApplicationScopedTrackOpts(userID, projID, clusterID uint, name, namespace, chartName string) *ApplicationScopedTrackOpts

GetApplicationScopedTrackOpts is a helper method to getting the ApplicationScopedTrackOpts

type ClusterConnectionStartTrackOpts added in v0.8.0

type ClusterConnectionStartTrackOpts struct {
	// note that this is a project-scoped track, since the cluster has not been created yet
	*ProjectScopedTrackOpts

	ClusterCandidateID uint
}

ClusterConnectionStartTrackOpts are the options for creating a track when a cluster connection has started

type ClusterConnectionSuccessTrackOpts added in v0.8.0

type ClusterConnectionSuccessTrackOpts struct {
	*ClusterScopedTrackOpts

	ClusterCandidateID uint
}

ClusterConnectionSuccessTrackOpts are the options for creating a track when a cluster connection has finished

type ClusterDestroyingStartTrackOpts added in v0.10.2

type ClusterDestroyingStartTrackOpts struct {
	*ClusterScopedTrackOpts

	ClusterType types.InfraKind
	InfraID     uint
}

ClusterDestroyingStartTrackOpts are the options for creating a track when a cluster has started destroying

type ClusterDestroyingSuccessTrackOpts added in v0.10.2

type ClusterDestroyingSuccessTrackOpts struct {
	*ClusterScopedTrackOpts

	ClusterType types.InfraKind
	InfraID     uint
}

ClusterDestroyingSuccessTrackOpts are the options for creating a track when a cluster has successfully provisioned

type ClusterProvisioningErrorTrackOpts added in v0.8.0

type ClusterProvisioningErrorTrackOpts struct {
	// note that this is a project-scoped track, since the cluster has not been created yet
	*ProjectScopedTrackOpts

	ClusterType types.InfraKind
	InfraID     uint
}

ClusterProvisioningErrorTrackOpts are the options for creating a track when a cluster has experienced a provisioning error

type ClusterProvisioningStartTrackOpts added in v0.8.0

type ClusterProvisioningStartTrackOpts struct {
	// note that this is a project-scoped track, since the cluster has not been created yet
	*ProjectScopedTrackOpts

	ClusterType types.InfraKind
	InfraID     uint
}

ClusterProvisioningStartTrackOpts are the options for creating a track when a cluster has started provisioning

type ClusterProvisioningSuccessTrackOpts added in v0.8.0

type ClusterProvisioningSuccessTrackOpts struct {
	*ClusterScopedTrackOpts

	ClusterType types.InfraKind
	InfraID     uint
}

ClusterProvisioningSuccessTrackOpts are the options for creating a track when a cluster has successfully provisioned

type ClusterScopedTrack added in v0.8.0

type ClusterScopedTrack struct {
	*ProjectScopedTrack
	// contains filtered or unexported fields
}

ClusterScopedTrack is a track that automatically adds a cluster id to the track

type ClusterScopedTrackOpts added in v0.8.0

type ClusterScopedTrackOpts struct {
	*ProjectScopedTrackOpts

	ClusterID uint
}

ClusterScopedTrackOpts are the options for created a new cluster-scoped track

func GetClusterScopedTrackOpts added in v0.8.0

func GetClusterScopedTrackOpts(userID, projID, clusterID uint) *ClusterScopedTrackOpts

GetClusterScopedTrackOpts is a helper method to getting the ClusterScopedTrackOpts

type GithubConnectionStartTrackOpts added in v0.8.0

type GithubConnectionStartTrackOpts struct {
	// note that this is a user-scoped track, since github repos are tied to the user
	*UserScopedTrackOpts
}

GithubConnectionStartTrackOpts are the options for creating a track when a github account connection has started

type GithubConnectionSuccessTrackOpts added in v0.8.0

type GithubConnectionSuccessTrackOpts struct {
	// note that this is a user-scoped track, since github repos are tied to the user
	*UserScopedTrackOpts
}

GithubConnectionSuccessTrackOpts are the options for creating a track when a github account connection has completed

type ProjectCreateTrackOpts added in v0.8.0

type ProjectCreateTrackOpts struct {
	*ProjectScopedTrackOpts
}

ProjectCreateTrackOpts are the options for creating a track when a project is created

type ProjectScopedTrack added in v0.8.0

type ProjectScopedTrack struct {
	*UserScopedTrack
	// contains filtered or unexported fields
}

ProjectScopedTrack is a track that automatically adds a project id to the track

type ProjectScopedTrackOpts added in v0.8.0

type ProjectScopedTrackOpts struct {
	*UserScopedTrackOpts

	ProjectID uint
}

ProjectScopedTrackOpts are the options for created a new project-scoped track

func GetProjectScopedTrackOpts added in v0.8.0

func GetProjectScopedTrackOpts(userID, projID uint) *ProjectScopedTrackOpts

GetProjectScopedTrackOpts is a helper method to getting the ProjectScopedTrackOpts

type RegistryConnectionStartTrackOpts added in v0.8.0

type RegistryConnectionStartTrackOpts struct {
	// note that this is a project-scoped track, since the cluster has not been created yet
	*ProjectScopedTrackOpts

	// a random id assigned to this connection request
	FlowID string
}

RegistryConnectionStartTrackOpts are the options for creating a track when a registry connection has started

type RegistryConnectionSuccessTrackOpts added in v0.8.0

type RegistryConnectionSuccessTrackOpts struct {
	*RegistryScopedTrackOpts

	// a random id assigned to this connection request
	FlowID string
}

RegistryConnectionSuccessTrackOpts are the options for creating a track when a registry connection has completed

type RegistryProvisioningErrorTrackOpts added in v0.8.0

type RegistryProvisioningErrorTrackOpts struct {
	// note that this is a project-scoped track, since the registry has not been created yet
	*ProjectScopedTrackOpts

	RegistryType types.InfraKind
	InfraID      uint
}

RegistryProvisioningErrorTrackOpts are the options for creating a track when a registry provisioning has failed

type RegistryProvisioningStartTrackOpts added in v0.8.0

type RegistryProvisioningStartTrackOpts struct {
	// note that this is a project-scoped track, since the registry has not been created yet
	*ProjectScopedTrackOpts

	RegistryType types.InfraKind
	InfraID      uint
}

RegistryProvisioningStartTrackOpts are the options for creating a track when a registry provisioning has started

type RegistryProvisioningSuccessTrackOpts added in v0.8.0

type RegistryProvisioningSuccessTrackOpts struct {
	*RegistryScopedTrackOpts

	RegistryType types.InfraKind
	InfraID      uint
}

RegistryProvisioningSuccessTrackOpts are the options for creating a track when a registry provisioning has completed

type RegistryScopedTrack added in v0.8.0

type RegistryScopedTrack struct {
	*ProjectScopedTrack
	// contains filtered or unexported fields
}

RegistryScopedTrack is a track that automatically adds a registry id to the track

type RegistryScopedTrackOpts added in v0.8.0

type RegistryScopedTrackOpts struct {
	*ProjectScopedTrackOpts

	RegistryID uint
}

RegistryScopedTrackOpts are the options for created a new registry-scoped track

func GetRegistryScopedTrackOpts added in v0.8.0

func GetRegistryScopedTrackOpts(userID, projID, regID uint) *RegistryScopedTrackOpts

GetRegistryScopedTrackOpts is a helper method to getting the RegistryScopedTrackOpts

type SegmentEvent

type SegmentEvent string
const (
	// onboarding flow
	UserCreate      SegmentEvent = "New User"
	UserVerifyEmail SegmentEvent = "User Verified Email"
	ProjectCreate   SegmentEvent = "New Project Event"

	ClusterProvisioningStart   SegmentEvent = "Cluster Provisioning Started"
	ClusterProvisioningError   SegmentEvent = "Cluster Provisioning Error"
	ClusterProvisioningSuccess SegmentEvent = "Cluster Provisioning Success"

	RegistryProvisioningStart   SegmentEvent = "Registry Provisioning Started"
	RegistryProvisioningError   SegmentEvent = "Registry Provisioning Error"
	RegistryProvisioningSuccess SegmentEvent = "Registry Provisioning Success"

	ClusterConnectionStart   SegmentEvent = "Cluster Connection Started"
	ClusterConnectionSuccess SegmentEvent = "Cluster Connection Success"

	RegistryConnectionStart   SegmentEvent = "Registry Connection Started"
	RegistryConnectionSuccess SegmentEvent = "Registry Connection Success"

	GithubConnectionStart   SegmentEvent = "Github Connection Started"
	GithubConnectionSuccess SegmentEvent = "Github Connection Success"

	// launch flow
	ApplicationLaunchStart   SegmentEvent = "Application Launch Started"
	ApplicationLaunchSuccess SegmentEvent = "Application Launch Success"

	ApplicationDeploymentWebhook SegmentEvent = "Triggered Re-deploy via Webhook"

	// delete events
	ClusterDestroyingStart   SegmentEvent = "Cluster Destroying Start"
	ClusterDestroyingSuccess SegmentEvent = "Cluster Destroying Success"
)

type UserCreateTrackOpts added in v0.8.0

type UserCreateTrackOpts struct {
	*UserScopedTrackOpts

	Email string
}

UserCreateTrackOpts are the options for creating a track when a user is created

type UserScopedTrack added in v0.8.0

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

UserScopedTrack is a track that automatically adds a user id to the tracking

type UserScopedTrackOpts added in v0.8.0

type UserScopedTrackOpts struct {
	UserID uint
	// contains filtered or unexported fields
}

UserScopedTrackOpts are the options for created a new user-scoped track

func GetUserScopedTrackOpts added in v0.8.0

func GetUserScopedTrackOpts(userID uint) *UserScopedTrackOpts

GetUserScopedTrackOpts is a helper method to getting the UserScopedTrackOpts

type UserVerifyEmailTrackOpts added in v0.8.1

type UserVerifyEmailTrackOpts struct {
	*UserScopedTrackOpts

	Email string
}

UserCreateTrackOpts are the options for creating a track when a user's email is verified

Jump to

Keyboard shortcuts

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