Generated from package comments and exported declarations. Edit the Go source, not this file.
growth
import "codeberg.org/hemanta212/playgo/api/growth"
Package growth defines acquisition, funnel, retention, and overview reporting contracts.
Growth dashboards consume these read models rather than raw analytics rows. Implementations own the internal-account filters, attribution windows, and cohort calculations, so every client renders consistent numbers without reimplementing the definitions.
These are investigation read models. They are not a source of truth for money reconciliation - for that, use the ledger and payment contracts, which are built to balance.
Constants
const (
DefaultTimezone = "America/New_York"
ExclusionRuleVersion = "growth-exclusion/2026-07-17.v1"
)
Variables
var ErrInvalidQuery = errors.New("invalid growth query")
type AcquisitionChannel
type AcquisitionChannel struct {
Source string
Medium string
Campaign string
LandingTouches int64
AnonymousVisitors int64
RegisteredUsers int64
ActivatedUsers int64
DepositedUsers int64
}
type AcquisitionReport
type AcquisitionReport struct {
GeneratedAt time.Time
Window Window
Timezone string
ExclusionRuleVersion string
Channels []AcquisitionChannel
}
type FunnelReport
type FunnelReport struct {
GeneratedAt time.Time
Window Window
Timezone string
ExclusionRuleVersion string
RegisteredUsers int64
ActivatedUsers int64
DepositedUsers int64
CashedOutUsers int64
}
type Overview
type Overview struct {
GeneratedAt time.Time
Window Window
Timezone string
ExclusionRuleVersion string
LandingTouches int64
AnonymousVisitors int64
RegisteredUsers int64
ActivatedUsers int64
ActiveUsers int64
DepositedUsers int64
CashedOutUsers int64
RegistrationRateBPS int64
ActivationRateBPS int64
}
type Query
type Query struct {
From time.Time
To time.Time
Timezone string
}
type RetentionCohort
type RetentionCohort struct {
CohortDate string
CohortSize int64
D1 RetentionWindow
D7 RetentionWindow
D30 RetentionWindow
}
type RetentionMetric
type RetentionMetric struct {
Mature bool
Users *int64
RateBPS *int64
}
type RetentionQuery
type RetentionQuery struct {
From time.Time
To time.Time
AsOf time.Time
Timezone string
}
type RetentionReport
type RetentionReport struct {
GeneratedAt time.Time
Window Window
AsOf time.Time
Timezone string
ExclusionRuleVersion string
Cohorts []RetentionCohort
}
type RetentionWindow
type RetentionWindow struct {
Exact RetentionMetric
Rolling RetentionMetric
}
type Window
type Window struct {
From time.Time
To time.Time
}
Generated by gomarkdoc