Documentation
¶
Index ¶
- type AdminHandler
- func (h *AdminHandler) AddLicenseAddon(c *gin.Context)
- func (h *AdminHandler) AnalyticsActivationTrend(c *gin.Context)
- func (h *AdminHandler) AnalyticsBreakdown(c *gin.Context)
- func (h *AdminHandler) AnalyticsInsights(c *gin.Context)
- func (h *AdminHandler) AnalyticsSummary(c *gin.Context)
- func (h *AdminHandler) AnalyticsUsageTop(c *gin.Context)
- func (h *AdminHandler) ChangeLicensePlan(c *gin.Context)
- func (h *AdminHandler) CreateAPIKey(c *gin.Context)
- func (h *AdminHandler) CreateAddon(c *gin.Context)
- func (h *AdminHandler) CreateEntitlement(c *gin.Context)
- func (h *AdminHandler) CreateLicense(c *gin.Context)
- func (h *AdminHandler) CreatePlan(c *gin.Context)
- func (h *AdminHandler) CreateProduct(c *gin.Context)
- func (h *AdminHandler) DeleteAPIKey(c *gin.Context)
- func (h *AdminHandler) DeleteActivation(c *gin.Context)
- func (h *AdminHandler) DeleteAddon(c *gin.Context)
- func (h *AdminHandler) DeleteEntitlement(c *gin.Context)
- func (h *AdminHandler) DeletePlan(c *gin.Context)
- func (h *AdminHandler) DeleteProduct(c *gin.Context)
- func (h *AdminHandler) ExportLicenses(c *gin.Context)
- func (h *AdminHandler) GetEmailTemplates(c *gin.Context)
- func (h *AdminHandler) GetLicense(c *gin.Context)
- func (h *AdminHandler) GetPlan(c *gin.Context)
- func (h *AdminHandler) GetProduct(c *gin.Context)
- func (h *AdminHandler) GetSettings(c *gin.Context)
- func (h *AdminHandler) GetUserDetail(c *gin.Context)
- func (h *AdminHandler) InviteTeamMember(c *gin.Context)
- func (h *AdminHandler) ListAPIKeys(c *gin.Context)
- func (h *AdminHandler) ListAddons(c *gin.Context)
- func (h *AdminHandler) ListAnalytics(c *gin.Context)
- func (h *AdminHandler) ListAuditLogs(c *gin.Context)
- func (h *AdminHandler) ListFloatingSessions(c *gin.Context)
- func (h *AdminHandler) ListLicenseAddons(c *gin.Context)
- func (h *AdminHandler) ListLicenseSeats(c *gin.Context)
- func (h *AdminHandler) ListLicenseUsage(c *gin.Context)
- func (h *AdminHandler) ListLicenses(c *gin.Context)
- func (h *AdminHandler) ListPlans(c *gin.Context)
- func (h *AdminHandler) ListProducts(c *gin.Context)
- func (h *AdminHandler) ListTeamMembers(c *gin.Context)
- func (h *AdminHandler) ListUsers(c *gin.Context)
- func (h *AdminHandler) RefundLicense(c *gin.Context)
- func (h *AdminHandler) ReinstateLicense(c *gin.Context)
- func (h *AdminHandler) RemoveLicenseAddon(c *gin.Context)
- func (h *AdminHandler) RemoveTeamMember(c *gin.Context)
- func (h *AdminHandler) ResetLicenseUsage(c *gin.Context)
- func (h *AdminHandler) RevokeLicense(c *gin.Context)
- func (h *AdminHandler) SendTestEmail(c *gin.Context)
- func (h *AdminHandler) Stats(c *gin.Context)
- func (h *AdminHandler) SuspendLicense(c *gin.Context)
- func (h *AdminHandler) UpdateAddon(c *gin.Context)
- func (h *AdminHandler) UpdateEntitlement(c *gin.Context)
- func (h *AdminHandler) UpdatePlan(c *gin.Context)
- func (h *AdminHandler) UpdateProduct(c *gin.Context)
- func (h *AdminHandler) UpdateSettings(c *gin.Context)
- type EntitlementHandler
- type FloatingHandler
- type LicenseHandler
- type OAuthHandler
- func (h *OAuthHandler) Callback(c *gin.Context)
- func (h *OAuthHandler) DevLogin(c *gin.Context)
- func (h *OAuthHandler) Logout(c *gin.Context)
- func (h *OAuthHandler) Me(c *gin.Context)
- func (h *OAuthHandler) Providers(c *gin.Context)
- func (h *OAuthHandler) Redirect(c *gin.Context)
- func (h *OAuthHandler) Refresh(c *gin.Context)
- type PayPalCanceler
- type SeatHandler
- type SetupHandler
- type SystemHandler
- type UsageHandler
- type WebhookAdminHandler
- func (h *WebhookAdminHandler) CreateWebhook(c *gin.Context)
- func (h *WebhookAdminHandler) DeleteWebhook(c *gin.Context)
- func (h *WebhookAdminHandler) ListDeliveries(c *gin.Context)
- func (h *WebhookAdminHandler) ListWebhooks(c *gin.Context)
- func (h *WebhookAdminHandler) TestWebhook(c *gin.Context)
- func (h *WebhookAdminHandler) UpdateWebhook(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminHandler ¶
type AdminHandler struct {
Store *store.Store
Webhook *service.WebhookService
PayPalCancel PayPalCanceler // optional: set if PayPal is configured
}
func NewAdminHandler ¶
func NewAdminHandler(s *store.Store, wh *service.WebhookService) *AdminHandler
func (*AdminHandler) AddLicenseAddon ¶
func (h *AdminHandler) AddLicenseAddon(c *gin.Context)
func (*AdminHandler) AnalyticsActivationTrend ¶
func (h *AdminHandler) AnalyticsActivationTrend(c *gin.Context)
func (*AdminHandler) AnalyticsBreakdown ¶
func (h *AdminHandler) AnalyticsBreakdown(c *gin.Context)
func (*AdminHandler) AnalyticsInsights ¶
func (h *AdminHandler) AnalyticsInsights(c *gin.Context)
func (*AdminHandler) AnalyticsSummary ¶
func (h *AdminHandler) AnalyticsSummary(c *gin.Context)
func (*AdminHandler) AnalyticsUsageTop ¶
func (h *AdminHandler) AnalyticsUsageTop(c *gin.Context)
func (*AdminHandler) ChangeLicensePlan ¶
func (h *AdminHandler) ChangeLicensePlan(c *gin.Context)
func (*AdminHandler) CreateAPIKey ¶
func (h *AdminHandler) CreateAPIKey(c *gin.Context)
func (*AdminHandler) CreateAddon ¶
func (h *AdminHandler) CreateAddon(c *gin.Context)
func (*AdminHandler) CreateEntitlement ¶
func (h *AdminHandler) CreateEntitlement(c *gin.Context)
func (*AdminHandler) CreateLicense ¶
func (h *AdminHandler) CreateLicense(c *gin.Context)
func (*AdminHandler) CreatePlan ¶
func (h *AdminHandler) CreatePlan(c *gin.Context)
func (*AdminHandler) CreateProduct ¶
func (h *AdminHandler) CreateProduct(c *gin.Context)
func (*AdminHandler) DeleteAPIKey ¶
func (h *AdminHandler) DeleteAPIKey(c *gin.Context)
func (*AdminHandler) DeleteActivation ¶
func (h *AdminHandler) DeleteActivation(c *gin.Context)
func (*AdminHandler) DeleteAddon ¶
func (h *AdminHandler) DeleteAddon(c *gin.Context)
func (*AdminHandler) DeleteEntitlement ¶
func (h *AdminHandler) DeleteEntitlement(c *gin.Context)
func (*AdminHandler) DeletePlan ¶
func (h *AdminHandler) DeletePlan(c *gin.Context)
func (*AdminHandler) DeleteProduct ¶
func (h *AdminHandler) DeleteProduct(c *gin.Context)
func (*AdminHandler) ExportLicenses ¶
func (h *AdminHandler) ExportLicenses(c *gin.Context)
ExportLicenses exports all licenses as CSV or JSON. GET /api/v1/admin/licenses/export?format=csv&product_id=xxx&status=xxx
func (*AdminHandler) GetEmailTemplates ¶
func (h *AdminHandler) GetEmailTemplates(c *gin.Context)
GetEmailTemplates returns all email templates (custom from DB + hardcoded defaults).
func (*AdminHandler) GetLicense ¶
func (h *AdminHandler) GetLicense(c *gin.Context)
func (*AdminHandler) GetPlan ¶
func (h *AdminHandler) GetPlan(c *gin.Context)
func (*AdminHandler) GetProduct ¶
func (h *AdminHandler) GetProduct(c *gin.Context)
func (*AdminHandler) GetSettings ¶
func (h *AdminHandler) GetSettings(c *gin.Context)
func (*AdminHandler) GetUserDetail ¶
func (h *AdminHandler) GetUserDetail(c *gin.Context)
func (*AdminHandler) InviteTeamMember ¶
func (h *AdminHandler) InviteTeamMember(c *gin.Context)
InviteTeamMember promotes an existing user to admin, or creates a placeholder admin user. Only owners can invite new admins.
func (*AdminHandler) ListAPIKeys ¶
func (h *AdminHandler) ListAPIKeys(c *gin.Context)
func (*AdminHandler) ListAddons ¶
func (h *AdminHandler) ListAddons(c *gin.Context)
func (*AdminHandler) ListAnalytics ¶
func (h *AdminHandler) ListAnalytics(c *gin.Context)
func (*AdminHandler) ListAuditLogs ¶
func (h *AdminHandler) ListAuditLogs(c *gin.Context)
func (*AdminHandler) ListFloatingSessions ¶
func (h *AdminHandler) ListFloatingSessions(c *gin.Context)
func (*AdminHandler) ListLicenseAddons ¶
func (h *AdminHandler) ListLicenseAddons(c *gin.Context)
func (*AdminHandler) ListLicenseSeats ¶
func (h *AdminHandler) ListLicenseSeats(c *gin.Context)
func (*AdminHandler) ListLicenseUsage ¶
func (h *AdminHandler) ListLicenseUsage(c *gin.Context)
func (*AdminHandler) ListLicenses ¶
func (h *AdminHandler) ListLicenses(c *gin.Context)
func (*AdminHandler) ListPlans ¶
func (h *AdminHandler) ListPlans(c *gin.Context)
func (*AdminHandler) ListProducts ¶
func (h *AdminHandler) ListProducts(c *gin.Context)
func (*AdminHandler) ListTeamMembers ¶
func (h *AdminHandler) ListTeamMembers(c *gin.Context)
ListTeamMembers returns all platform admins (owner + admin roles).
func (*AdminHandler) ListUsers ¶
func (h *AdminHandler) ListUsers(c *gin.Context)
func (*AdminHandler) RefundLicense ¶
func (h *AdminHandler) RefundLicense(c *gin.Context)
func (*AdminHandler) ReinstateLicense ¶
func (h *AdminHandler) ReinstateLicense(c *gin.Context)
func (*AdminHandler) RemoveLicenseAddon ¶
func (h *AdminHandler) RemoveLicenseAddon(c *gin.Context)
func (*AdminHandler) RemoveTeamMember ¶
func (h *AdminHandler) RemoveTeamMember(c *gin.Context)
RemoveTeamMember demotes an admin back to regular user. Only owners can remove admins. Cannot remove the last owner.
func (*AdminHandler) ResetLicenseUsage ¶
func (h *AdminHandler) ResetLicenseUsage(c *gin.Context)
func (*AdminHandler) RevokeLicense ¶
func (h *AdminHandler) RevokeLicense(c *gin.Context)
func (*AdminHandler) SendTestEmail ¶
func (h *AdminHandler) SendTestEmail(c *gin.Context)
func (*AdminHandler) Stats ¶
func (h *AdminHandler) Stats(c *gin.Context)
func (*AdminHandler) SuspendLicense ¶
func (h *AdminHandler) SuspendLicense(c *gin.Context)
func (*AdminHandler) UpdateAddon ¶
func (h *AdminHandler) UpdateAddon(c *gin.Context)
func (*AdminHandler) UpdateEntitlement ¶
func (h *AdminHandler) UpdateEntitlement(c *gin.Context)
func (*AdminHandler) UpdatePlan ¶
func (h *AdminHandler) UpdatePlan(c *gin.Context)
func (*AdminHandler) UpdateProduct ¶
func (h *AdminHandler) UpdateProduct(c *gin.Context)
func (*AdminHandler) UpdateSettings ¶
func (h *AdminHandler) UpdateSettings(c *gin.Context)
type EntitlementHandler ¶
type EntitlementHandler struct {
// contains filtered or unexported fields
}
func NewEntitlementHandler ¶
func NewEntitlementHandler(svc *service.EntitlementService) *EntitlementHandler
func (*EntitlementHandler) Check ¶
func (h *EntitlementHandler) Check(c *gin.Context)
type FloatingHandler ¶
type FloatingHandler struct {
// contains filtered or unexported fields
}
func NewFloatingHandler ¶
func NewFloatingHandler(svc *service.FloatingService) *FloatingHandler
func (*FloatingHandler) CheckIn ¶
func (h *FloatingHandler) CheckIn(c *gin.Context)
func (*FloatingHandler) CheckOut ¶
func (h *FloatingHandler) CheckOut(c *gin.Context)
func (*FloatingHandler) Heartbeat ¶
func (h *FloatingHandler) Heartbeat(c *gin.Context)
type LicenseHandler ¶
type LicenseHandler struct {
// contains filtered or unexported fields
}
func NewLicenseHandler ¶
func NewLicenseHandler(svc *service.LicenseService) *LicenseHandler
func (*LicenseHandler) Activate ¶
func (h *LicenseHandler) Activate(c *gin.Context)
func (*LicenseHandler) Deactivate ¶
func (h *LicenseHandler) Deactivate(c *gin.Context)
func (*LicenseHandler) Verify ¶
func (h *LicenseHandler) Verify(c *gin.Context)
type OAuthHandler ¶
type OAuthHandler struct {
Store *store.Store
Config *config.Config
Registry *oauth.Registry
Email *service.EmailService
}
func (*OAuthHandler) Callback ¶
func (h *OAuthHandler) Callback(c *gin.Context)
func (*OAuthHandler) DevLogin ¶
func (h *OAuthHandler) DevLogin(c *gin.Context)
DevLogin is a development-only endpoint that creates a session without OAuth. Security: This endpoint is ONLY available when BOTH conditions are met:
- ENVIRONMENT is explicitly set to "development"
- The server is NOT listening on a public interface (checked via BASE_URL)
This prevents accidental exposure in production deployments.
func (*OAuthHandler) Logout ¶
func (h *OAuthHandler) Logout(c *gin.Context)
func (*OAuthHandler) Me ¶
func (h *OAuthHandler) Me(c *gin.Context)
func (*OAuthHandler) Providers ¶
func (h *OAuthHandler) Providers(c *gin.Context)
func (*OAuthHandler) Redirect ¶
func (h *OAuthHandler) Redirect(c *gin.Context)
func (*OAuthHandler) Refresh ¶
func (h *OAuthHandler) Refresh(c *gin.Context)
type PayPalCanceler ¶
type PayPalCanceler interface {
CancelSubscriptionByID(ctx context.Context, subscriptionID, reason string) error
}
PayPalCanceler can cancel PayPal subscriptions (implemented by PayPalHandler).
type SeatHandler ¶
type SeatHandler struct {
// contains filtered or unexported fields
}
func NewSeatHandler ¶
func NewSeatHandler(svc *service.SeatService) *SeatHandler
func (*SeatHandler) AddSeat ¶
func (h *SeatHandler) AddSeat(c *gin.Context)
func (*SeatHandler) ListSeats ¶
func (h *SeatHandler) ListSeats(c *gin.Context)
func (*SeatHandler) RemoveSeat ¶
func (h *SeatHandler) RemoveSeat(c *gin.Context)
type SetupHandler ¶
SetupHandler manages the first-run setup wizard.
func NewSetupHandler ¶
func NewSetupHandler(s *store.Store) *SetupHandler
func (*SetupHandler) Initialize ¶
func (h *SetupHandler) Initialize(c *gin.Context)
Initialize completes setup in one call. This is the ONLY endpoint that allows creating the first owner without authentication. POST /api/v1/setup/initialize
func (*SetupHandler) Status ¶
func (h *SetupHandler) Status(c *gin.Context)
Status returns whether setup is needed and which step the wizard is on. GET /api/v1/setup/status
type SystemHandler ¶
type SystemHandler struct {
Store *store.Store
RepoOwner string
RepoName string
// contains filtered or unexported fields
}
func NewSystemHandler ¶
func NewSystemHandler(s *store.Store) *SystemHandler
func (*SystemHandler) CheckUpdate ¶
func (h *SystemHandler) CheckUpdate(c *gin.Context)
CheckUpdate checks GitHub for a newer release. Results are cached for 1 hour. On startup, the background checker calls this periodically so the dashboard always shows fresh update status without the admin clicking anything.
func (*SystemHandler) GetMigrationStatus ¶
func (h *SystemHandler) GetMigrationStatus(c *gin.Context)
func (*SystemHandler) GetVersion ¶
func (h *SystemHandler) GetVersion(c *gin.Context)
func (*SystemHandler) StartAutoCheck ¶
func (h *SystemHandler) StartAutoCheck(done <-chan struct{})
StartAutoCheck runs a background loop that checks for updates every 6 hours. The result is cached so the admin dashboard always has fresh data.
type UsageHandler ¶
type UsageHandler struct {
// contains filtered or unexported fields
}
func NewUsageHandler ¶
func NewUsageHandler(svc *service.UsageService) *UsageHandler
func (*UsageHandler) GetQuotaStatus ¶
func (h *UsageHandler) GetQuotaStatus(c *gin.Context)
func (*UsageHandler) RecordUsage ¶
func (h *UsageHandler) RecordUsage(c *gin.Context)
type WebhookAdminHandler ¶
type WebhookAdminHandler struct {
Store *store.Store
Webhook *service.WebhookService
}
func NewWebhookAdminHandler ¶
func NewWebhookAdminHandler(s *store.Store, wh *service.WebhookService) *WebhookAdminHandler
func (*WebhookAdminHandler) CreateWebhook ¶
func (h *WebhookAdminHandler) CreateWebhook(c *gin.Context)
func (*WebhookAdminHandler) DeleteWebhook ¶
func (h *WebhookAdminHandler) DeleteWebhook(c *gin.Context)
func (*WebhookAdminHandler) ListDeliveries ¶
func (h *WebhookAdminHandler) ListDeliveries(c *gin.Context)
func (*WebhookAdminHandler) ListWebhooks ¶
func (h *WebhookAdminHandler) ListWebhooks(c *gin.Context)
func (*WebhookAdminHandler) TestWebhook ¶
func (h *WebhookAdminHandler) TestWebhook(c *gin.Context)
func (*WebhookAdminHandler) UpdateWebhook ¶
func (h *WebhookAdminHandler) UpdateWebhook(c *gin.Context)