pages

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppManagementCreatePage

func AppManagementCreatePage(currentAppIDStr, csrfToken string) g.Node

AppManagementCreatePage renders the app creation form

func AppManagementDetailPage

func AppManagementDetailPage(data AppManagementDetailData, currentAppIDStr string) g.Node

AppManagementDetailPage renders the app detail page

func AppManagementEditPage

func AppManagementEditPage(data AppManagementEditData, currentAppIDStr, csrfToken string) g.Node

AppManagementEditPage renders the app edit form

func AppsListPage

func AppsListPage(data AppsListPageData) g.Node

AppsListPage renders the apps list page with cards

func AppsManagementPage

func AppsManagementPage(data AppsManagementData, currentAppIDStr string) g.Node

AppsManagementPage renders the apps management page (admin only)

func ConfigViewerPage added in v0.0.9

func ConfigViewerPage(data ConfigViewerPageData) g.Node

ConfigViewerPage renders the configuration viewer page

func DashboardPage

func DashboardPage(stats *DashboardStats, basePath string, appIDStr string, extensionWidgets []g.Node) g.Node

DashboardPage renders the dashboard stats page content

func EnvironmentCreatePage

func EnvironmentCreatePage(basePath string, appIDStr string, csrfToken string) g.Node

EnvironmentCreatePage renders the create environment page

func EnvironmentDetailPage

func EnvironmentDetailPage(data EnvironmentDetailData, basePath string, appIDStr string) g.Node

EnvironmentDetailPage renders the environment detail page

func EnvironmentEditPage

func EnvironmentEditPage(data EnvironmentEditData, basePath string, appIDStr string, csrfToken string) g.Node

EnvironmentEditPage renders the edit environment page

func EnvironmentsPage

func EnvironmentsPage(data EnvironmentsData, basePath string, appIDStr string) g.Node

EnvironmentsPage renders the environments list page

func ErrorPage

func ErrorPage(errorMessage string, basePath string) g.Node

ErrorPage renders an error page content (used within base layout)

func GeneralSettingsPage

func GeneralSettingsPage(data GeneralSettingsPageData) g.Node

GeneralSettingsPage renders the general settings page

func Login

func Login(data LoginPageData) g.Node

Login renders a standalone login page (no base layout)

func NotFound

func NotFound(basePath string) g.Node

NotFound renders a 404 page (standalone, no base layout)

func OrganizationCreatePage

func OrganizationCreatePage(appIDStr, csrfToken string) g.Node

OrganizationCreatePage renders the organization creation form

func OrganizationDetailPage

func OrganizationDetailPage(data OrganizationDetailData, appIDStr string) g.Node

OrganizationDetailPage renders the organization detail page

func OrganizationEditPage

func OrganizationEditPage(data OrganizationEditData, appIDStr, csrfToken string) g.Node

OrganizationEditPage renders the organization edit form

func OrganizationsPage

func OrganizationsPage(data OrganizationsData, appIDStr string) g.Node

OrganizationsPage renders the organizations list page

func PluginsPage

func PluginsPage(data PluginsPageData) g.Node

PluginsPage renders the full plugins management page

func SessionsPage

func SessionsPage(data SessionsPageData) g.Node

SessionsPage renders the full sessions management page

func SettingsPage

func SettingsPage(data SettingsPageData) g.Node

SettingsPage renders the complete settings page with tabs

func Signup

func Signup(data SignupPageData) g.Node

Signup renders a standalone signup page (no base layout)

func UserDetailPage

func UserDetailPage(data UserDetailPageData) g.Node

UserDetailPage renders the complete user detail page

func UserEditPage

func UserEditPage(data UserEditPageData) g.Node

UserEditPage renders the complete user edit page

func UsersPage

func UsersPage(data UsersData, basePath string, appIDStr string) g.Node

UsersPage renders the users list page

Types

type APIKey

type APIKey struct {
	ID         string
	Name       string
	Key        string
	CreatedAt  time.Time
	LastUsedAt *time.Time
}

APIKey represents an API key

type APIKeyData

type APIKeyData struct {
	ID         string
	Name       string
	Key        string // Only shown once after creation
	Prefix     string // Always shown (first 8 chars)
	Scopes     []string
	RateLimit  int
	ExpiresAt  string
	LastUsedAt string
	CreatedAt  string
	IsActive   bool
}

APIKeyData represents an API key for display

type APIKeysTabPageData

type APIKeysTabPageData struct {
	APIKeys       []APIKeyData
	Organizations []OrganizationOption // For organization selector
	IsSaaSMode    bool
	CanCreateKeys bool
	CSRFToken     string
}

APIKeysTabPageData contains data for the API keys management tab

type ActivityItem

type ActivityItem struct {
	Title       string
	Description string
	Time        string
	Type        string // success, warning, error, info
}

ActivityItem represents a recent activity entry

type AppCardData

type AppCardData struct {
	App         *app.App
	Role        string // owner, admin, member
	MemberCount int
}

AppCardData represents data for a single app card

type AppManagementDetailData

type AppManagementDetailData struct {
	App         *app.App
	MemberCount int
}

AppManagementDetailData contains data for the app detail page

type AppManagementEditData

type AppManagementEditData struct {
	App *app.App
}

AppManagementEditData contains data for the app edit page

type AppsListPageData

type AppsListPageData struct {
	Apps              []*AppCardData
	BasePath          string
	CanCreateApps     bool
	ShowCreateAppCard bool
}

AppsListPageData holds data for the apps list page

type AppsManagementData

type AppsManagementData struct {
	Apps          []*app.App
	Page          int
	TotalPages    int
	Total         int
	CanCreateApps bool // Based on multiapp plugin being enabled
}

AppsManagementData contains data for the apps management list page

type ConfigSourceMetadata added in v0.0.9

type ConfigSourceMetadata struct {
	Name         string
	Type         string
	Priority     int
	LastLoaded   time.Time
	LastModified time.Time
	IsWatching   bool
	KeyCount     int
	ErrorCount   int
	LastError    string
}

ConfigSourceMetadata represents metadata about a configuration source

type ConfigViewerPageData added in v0.0.9

type ConfigViewerPageData struct {
	ConfigYAML     string
	SourceMetadata []ConfigSourceMetadata
	BasePath       string
}

ConfigViewerPageData contains data for the config viewer page

type DashboardStats

type DashboardStats struct {
	TotalUsers     int
	ActiveUsers    int
	NewUsersToday  int
	TotalSessions  int
	ActiveSessions int
	FailedLogins   int
	UserGrowth     float64
	SessionGrowth  float64
	RecentActivity []ActivityItem
	SystemStatus   []StatusItem
	Plugins        []PluginItem
}

DashboardStats represents statistics for the dashboard

type EnvironmentDetailData

type EnvironmentDetailData struct {
	Environment *environment.Environment
}

EnvironmentDetailData holds data for environment detail page

type EnvironmentEditData

type EnvironmentEditData struct {
	Environment *environment.Environment
}

EnvironmentEditData holds data for environment edit page

type EnvironmentsData

type EnvironmentsData struct {
	Environments []*environment.Environment
	Pagination   *p.PageMeta `json:"pagination,omitempty"`
}

EnvironmentsData holds data for environments list page

type GeneralSettings

type GeneralSettings struct {
	DashboardName            string
	SessionDuration          int
	MaxLoginAttempts         int
	RequireEmailVerification bool
}

GeneralSettings contains general dashboard settings

type GeneralSettingsPageData

type GeneralSettingsPageData struct {
	Settings  GeneralSettings
	BasePath  string
	CSRFToken string
	AppID     string
}

GeneralSettingsPageData contains data for the general settings page

type ImpersonationLog

type ImpersonationLog struct {
	ID         string
	AdminID    string
	AdminEmail string
	UserID     string
	UserEmail  string
	Reason     string
	StartedAt  time.Time
	EndedAt    *time.Time
	Duration   string
}

ImpersonationLog represents an impersonation audit entry

type LoginData

type LoginData struct {
	ShowSignup  bool
	IsFirstUser bool
	Redirect    string
}

LoginData contains data specific to the login page

type LoginPageData

type LoginPageData struct {
	Title     string
	Error     string
	CSRFToken string
	BasePath  string
	Data      LoginData
}

LoginPageData represents all data needed for login page

type MFAMethod

type MFAMethod struct {
	ID      string
	Type    string // "totp", "sms", "email", "webauthn"
	Name    string
	Enabled bool
}

MFAMethod represents an MFA method configuration

type NotificationTemplate

type NotificationTemplate struct {
	ID       string
	Name     string
	Type     string // "email" or "sms"
	Subject  string
	Language string
	Updated  time.Time
}

NotificationTemplate represents an email/SMS template

type OrganizationDetailData

type OrganizationDetailData struct {
	Organization *organization.Organization
	MemberCount  int
}

OrganizationDetailData contains data for the organization detail page

type OrganizationEditData

type OrganizationEditData struct {
	Organization *organization.Organization
}

OrganizationEditData contains data for the organization edit page

type OrganizationOption

type OrganizationOption struct {
	ID   string
	Name string
}

OrganizationOption represents an organization for selection

type OrganizationsData

type OrganizationsData struct {
	Organizations []*organization.Organization
	Page          int
	TotalPages    int
	Total         int
}

OrganizationsData contains data for the organizations list page

type PluginItem

type PluginItem struct {
	ID          string
	Name        string
	Description string
	Category    string
	Status      string // enabled, disabled
	Icon        string // lucide icon name
}

PluginItem represents a plugin entry

type PluginsPageData

type PluginsPageData struct {
	Plugins        []PluginItem
	FilterStatus   string // "all", "enabled", "disabled"
	FilterCategory string
	BasePath       string
	CSRFToken      string
}

PluginsPageData contains data for the plugins page

type SessionData

type SessionData struct {
	ID        string
	UserID    string
	IPAddress string
	UserAgent string
	CreatedAt time.Time
	ExpiresAt time.Time
}

SessionData represents a user session

type SessionsPageData

type SessionsPageData struct {
	Sessions  []SessionData
	Query     string
	BasePath  string
	CSRFToken string
	// Statistics
	AvgDuration      string // e.g., "2.5h", "45m"
	SessionsToday    int
	SessionsThisWeek int
}

SessionsPageData contains data for the sessions page

type SettingsPageData

type SettingsPageData struct {
	ActiveTab             string // "general", "apikeys", "webhooks", "notifications", "social", "impersonation", "mfa"
	General               GeneralSettings
	APIKeys               APIKeysTabPageData // Full API keys page data
	Webhooks              []Webhook
	NotificationTemplates []NotificationTemplate
	SocialProviders       []SocialProvider
	ImpersonationLogs     []ImpersonationLog
	MFAMethods            []MFAMethod
	IsSaaSMode            bool
	BasePath              string
	CSRFToken             string
	EnabledPlugins        map[string]bool
}

SettingsPageData contains data for the settings page

type SignupData

type SignupData struct {
	Redirect    string
	IsFirstUser bool
}

SignupData contains form data

type SignupPageData

type SignupPageData struct {
	Title     string
	CSRFToken string
	BasePath  string
	Error     string
	Data      SignupData
}

SignupPageData contains data for signup page

type SocialProvider

type SocialProvider struct {
	ID          string
	Provider    string // "google", "github", etc.
	Name        string
	ClientID    string
	Enabled     bool
	RedirectURL string
}

SocialProvider represents an OAuth provider configuration

type StatusItem

type StatusItem struct {
	Name   string
	Status string // operational, degraded, down
	Color  string // green, yellow, red
}

StatusItem represents a system status entry

type UserDetailData

type UserDetailData struct {
	ID            string
	Email         string
	Name          string
	Username      string
	EmailVerified bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

UserDetailData contains user detail information

type UserDetailPageData

type UserDetailPageData struct {
	User      UserDetailData
	Sessions  []SessionData // Active sessions for this user
	BasePath  string
	CSRFToken string
}

UserDetailPageData contains data for the user detail page

type UserEditData

type UserEditData struct {
	UserID        string
	Name          string
	Email         string
	Username      string
	EmailVerified bool
}

UserEditData contains data for editing a user

type UserEditPageData

type UserEditPageData struct {
	User      UserEditData
	BasePath  string
	CSRFToken string
}

UserEditPageData contains data for the user edit page

type UsersData

type UsersData struct {
	Users      []*user.User
	Page       int
	TotalPages int
	Total      int
	Query      string
}

UsersData contains data for the users list page

type Webhook

type Webhook struct {
	ID      string
	URL     string
	Events  []string
	Enabled bool
}

Webhook represents a webhook configuration

Jump to

Keyboard shortcuts

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