Documentation ¶
Index ¶
- func CreateSegmentIdentifyNewUser(user *models.User, registeredViaGithub bool) *segmentIdentifyNewUser
- func CreateSegmentNewClusterEvent(opts *NewClusterEventOpts) *segmentNewClusterEventTrack
- func CreateSegmentNewUserTrack(user *models.User) *segmentNewUserTrack
- func CreateSegmentRedeployViaWebhookTrack(userId string, repository string) *segmentRedeployViaWebhookTrack
- type AnalyticsSegment
- type AnalyticsSegmentClient
- type NewClusterEventOpts
- type SegmentEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSegmentIdentifyNewUser ¶
func CreateSegmentIdentifyNewUser(user *models.User, registeredViaGithub bool) *segmentIdentifyNewUser
Creates a segment Identifier struct for new users. As we handle registration with github, it also accepts a param to check if the new user has registered with github or not.
func CreateSegmentNewClusterEvent ¶ added in v0.7.2
func CreateSegmentNewClusterEvent(opts *NewClusterEventOpts) *segmentNewClusterEventTrack
CreateSegmentNewClusterEvent creates a track of type "New Cluster Event", which tracks whenever a cluster is newly provisioned, connected, or destroyed.
func CreateSegmentNewUserTrack ¶
CreateSegmentNewUserTrack creates a track of type "New User", which tracks when a user has registered
func CreateSegmentRedeployViaWebhookTrack ¶
func CreateSegmentRedeployViaWebhookTrack(userId string, repository string) *segmentRedeployViaWebhookTrack
CreateSegmentRedeployViaWebhookTrack creates a track of type "Triggered Re-deploy via Webhook", which tracks whenever a repository is redeployed via webhook call
Types ¶
type AnalyticsSegment ¶
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 NewClusterEventOpts ¶ added in v0.7.2
type NewClusterEventOpts struct { UserId string ProjId string ClusterName string ClusterType string // EKS, DOKS, or GKE EventType string // connected, provisioned, or destroyed }
NewClusterEventOpts are the parameters for creating a "New Cluster Event" track
type SegmentEvent ¶
type SegmentEvent string
const ( NewUser SegmentEvent = "New User" RedeployViaWebhook SegmentEvent = "Triggered Re-deploy via Webhook" NewClusterEvent SegmentEvent = "New Cluster Event" )