Documentation
¶
Index ¶
- Constants
- type APIKeyCreateInput
- type APIKeyCreateOutput
- type APIKeyDetailInput
- type APIKeyDetailOutput
- type APIKeyItem
- type APIKeyListInput
- type APIKeyListOutput
- type APIKeyRevokeInput
- type APIKeyRevokeOutput
- type APIKeyRotateInput
- type APIKeyRotateOutput
- type ActivityItem
- type AppDetailInput
- type AppDetailOutput
- type AppItem
- type AppsListOutput
- type AuditLogItem
- type AuditLogsInput
- type AuditLogsOutput
- type AuthenticateInput
- type AuthenticateOutput
- type BridgeManager
- type BulkDeleteUsersInput
- type BulkDeleteUsersOutput
- type ChangePasswordInput
- type CheckSessionOutput
- type CreateAppInput
- type CreateEnvironmentInput
- type CreateOrganizationInput
- type CurrentUserProfileOutput
- type CurrentUserSessionsOutput
- type DashboardStatsInput
- type DashboardStatsOutput
- type DeleteAppInput
- type DeleteEnvironmentInput
- type DeleteOrganizationInput
- type DeleteUserInput
- type EnvironmentDetailInput
- type EnvironmentDetailOutput
- type EnvironmentItem
- type EnvironmentsListInput
- type EnvironmentsListOutput
- type ExtensionRegistry
- type ExtensionWidget
- type ExtensionWidgetsInput
- type ExtensionWidgetsOutput
- type GeneralSettingsInput
- type GeneralSettingsOutput
- type GenericSuccessOutput
- type GrowthPoint
- type ListRolesInput
- type ListRolesOutput
- type LogoutOutput
- type MemberItem
- type OrganizationDetailInput
- type OrganizationDetailOutput
- type OrganizationItem
- type OrganizationsListInput
- type OrganizationsListOutput
- type PluginInfo
- type PluginItem
- type PluginsListInput
- type PluginsListOutput
- type PluginsOverviewInput
- type PluginsOverviewOutput
- type ProfileRevokeSessionInput
- type ProfileSessionItem
- type PromoteEnvironmentInput
- type PromotionItem
- type RecentActivityInput
- type RecentActivityOutput
- type RegisterInput
- type RegisterOutput
- type RequestPasswordResetInput
- type RequestPasswordResetOutput
- type ResetPasswordInput
- type ResetPasswordOutput
- type RevokeAllSessionsInput
- type RevokeSessionInput
- type RoleItem
- type SchemaOutput
- type SectionSettingsInput
- type SectionSettingsOutput
- type SecuritySettingsOutput
- type SessionItem
- type SessionSettingsOutput
- type SessionsListInput
- type SessionsListOutput
- type StatusComponent
- type SwitchEnvironmentInput
- type SystemConfigInput
- type SystemConfigOutput
- type SystemStatusInput
- type SystemStatusOutput
- type TogglePluginInput
- type UpdateAppInput
- type UpdateCurrentUserProfileInput
- type UpdateGeneralSettingsInput
- type UpdateOrganizationInput
- type UpdatePasswordInput
- type UpdateSectionSettingsInput
- type UpdateSecuritySettingsInput
- type UpdateSessionSettingsInput
- type UpdateUserInput
- type UpdateUserRolesInput
- type UserDetailInput
- type UserDetailOutput
- type UserInfo
- type UserItem
- type UsersListInput
- type UsersListOutput
Constants ¶
const SettingsMetadataKey = "settings"
SettingsMetadataKey is the key used in App.Metadata for storing settings.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyCreateInput ¶
type APIKeyCreateInput struct {
AppID string `json:"appId" validate:"required"`
Name string `json:"name" validate:"required"`
KeyType string `json:"keyType,omitempty"` // pk, sk, rk
Scopes string `json:"scopes,omitempty"` // comma-separated
RateLimit int `json:"rateLimit,omitempty"`
ExpiresIn int `json:"expiresIn,omitempty"` // days
Description string `json:"description,omitempty"`
}
APIKeyCreateInput represents create API key request.
type APIKeyCreateOutput ¶
type APIKeyCreateOutput struct {
Success bool `json:"success"`
ID string `json:"id"`
Name string `json:"name"`
Key string `json:"key"` // The actual API key - shown only once
}
APIKeyCreateOutput represents create API key response.
type APIKeyDetailInput ¶
type APIKeyDetailInput struct {
AppID string `json:"appId" validate:"required"`
KeyID string `json:"keyId" validate:"required"`
}
APIKeyDetailInput represents get API key detail request.
type APIKeyDetailOutput ¶
type APIKeyDetailOutput struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
KeyType string `json:"keyType"`
KeyPrefix string `json:"keyPrefix"`
Scopes []string `json:"scopes"`
Active bool `json:"active"`
RateLimit int `json:"rateLimit"`
Permissions map[string]string `json:"permissions,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
UsageCount int64 `json:"usageCount"`
LastUsedAt string `json:"lastUsedAt,omitempty"`
ExpiresAt string `json:"expiresAt,omitempty"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
IsExpired bool `json:"isExpired"`
}
APIKeyDetailOutput represents API key detail response.
type APIKeyItem ¶
type APIKeyItem struct {
ID string `json:"id"`
Name string `json:"name"`
KeyType string `json:"keyType"`
KeyPrefix string `json:"keyPrefix"`
Scopes []string `json:"scopes"`
Active bool `json:"active"`
RateLimit int `json:"rateLimit"`
LastUsedAt string `json:"lastUsedAt,omitempty"`
ExpiresAt string `json:"expiresAt,omitempty"`
CreatedAt string `json:"createdAt"`
IsExpired bool `json:"isExpired"`
}
APIKeyItem represents an API key in the list.
type APIKeyListInput ¶
type APIKeyListInput struct {
AppID string `json:"appId" validate:"required"`
Page int `json:"page,omitempty"`
PageSize int `json:"pageSize,omitempty"`
}
APIKeyListInput represents list API keys request.
type APIKeyListOutput ¶
type APIKeyListOutput struct {
APIKeys []APIKeyItem `json:"apiKeys"`
TotalItems int `json:"totalItems"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
TotalPages int `json:"totalPages"`
}
APIKeyListOutput represents list API keys response.
type APIKeyRevokeInput ¶
type APIKeyRevokeInput struct {
AppID string `json:"appId" validate:"required"`
KeyID string `json:"keyId" validate:"required"`
}
APIKeyRevokeInput represents revoke API key request.
type APIKeyRevokeOutput ¶
APIKeyRevokeOutput represents revoke API key response.
type APIKeyRotateInput ¶
type APIKeyRotateInput struct {
AppID string `json:"appId" validate:"required"`
KeyID string `json:"keyId" validate:"required"`
}
APIKeyRotateInput represents rotate API key request.
type APIKeyRotateOutput ¶
type APIKeyRotateOutput struct {
Success bool `json:"success"`
ID string `json:"id"`
Key string `json:"key"` // The new API key - shown only once
}
APIKeyRotateOutput represents rotate API key response.
type ActivityItem ¶
type ActivityItem struct {
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description"`
UserEmail string `json:"userEmail,omitempty"`
Timestamp string `json:"timestamp"`
Icon string `json:"icon,omitempty"`
}
ActivityItem represents a single activity.
type AppDetailInput ¶
type AppDetailInput struct {
AppID string `json:"appId" validate:"required"`
}
AppDetailInput represents app detail request.
type AppDetailOutput ¶
type AppDetailOutput struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
UserCount int `json:"userCount"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt,omitempty"`
Status string `json:"status"`
}
AppDetailOutput represents app detail response.
type AppItem ¶
type AppItem struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
UserCount int `json:"userCount"`
CreatedAt string `json:"createdAt"`
Status string `json:"status"`
}
AppItem represents an app in the list.
type AppsListOutput ¶
type AppsListOutput struct {
Apps []AppItem `json:"apps"`
IsMultiApp bool `json:"isMultiApp"` // Whether multiapp mode is enabled
DefaultAppID string `json:"defaultAppId"` // Default app ID in standalone mode
}
AppsListOutput represents apps list response.
type AuditLogItem ¶
type AuditLogItem struct {
ID string `json:"id"`
Timestamp string `json:"timestamp"`
Action string `json:"action"`
UserEmail string `json:"userEmail,omitempty"`
Resource string `json:"resource"`
Status string `json:"status"`
Details string `json:"details,omitempty"`
}
AuditLogItem represents an audit log entry.
type AuditLogsInput ¶
type AuditLogsInput struct {
AppID string `json:"appId" validate:"required"`
Action string `json:"action,omitempty"`
User string `json:"user,omitempty"`
StartDate string `json:"startDate,omitempty"`
EndDate string `json:"endDate,omitempty"`
}
AuditLogsInput represents audit logs request.
type AuditLogsOutput ¶
type AuditLogsOutput struct {
Logs []AuditLogItem `json:"logs"`
}
AuditLogsOutput represents audit logs response.
type AuthenticateInput ¶
type AuthenticateInput struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required"`
}
AuthenticateInput represents the login request.
type AuthenticateOutput ¶
type AuthenticateOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
SessionToken string `json:"sessionToken,omitempty"`
RedirectURL string `json:"redirectUrl,omitempty"`
User *UserInfo `json:"user,omitempty"`
}
AuthenticateOutput represents the login response.
type BridgeManager ¶
type BridgeManager struct {
// contains filtered or unexported fields
}
BridgeManager manages all bridge functions for the dashboard.
func NewBridgeManager ¶
func NewBridgeManager( existingBridge *bridge.Bridge, services *services.Services, log forge.Logger, basePath string, userSvc user.ServiceInterface, sessionSvc session.ServiceInterface, appSvc app.Service, orgSvc *organization.Service, rbacSvc rbac.ServiceInterface, apikeySvc *apikey.Service, auditSvc *audit.Service, envSvc environment.EnvironmentService, enabledPlugins map[string]bool, extensionRegistry ExtensionRegistry, ) *BridgeManager
NewBridgeManager creates a new bridge manager with an existing bridge instance.
func (*BridgeManager) GetBridge ¶
func (bm *BridgeManager) GetBridge() *bridge.Bridge
GetBridge returns the bridge instance.
func (*BridgeManager) RegisterFunctions ¶
func (bm *BridgeManager) RegisterFunctions() error
RegisterFunctions registers all bridge functions.
type BulkDeleteUsersInput ¶
type BulkDeleteUsersInput struct {
AppID string `json:"appId" validate:"required"`
UserIDs []string `json:"userIds" validate:"required,min=1"`
}
BulkDeleteUsersInput represents bulk user delete request.
type BulkDeleteUsersOutput ¶
type BulkDeleteUsersOutput struct {
SuccessCount int `json:"successCount"`
FailedCount int `json:"failedCount"`
Errors map[string]string `json:"errors,omitempty"` // userID -> error message
}
BulkDeleteUsersOutput represents bulk delete response.
type ChangePasswordInput ¶
type ChangePasswordInput struct {
CurrentPassword string `json:"currentPassword" validate:"required"`
NewPassword string `json:"newPassword" validate:"required,min=8"`
}
ChangePasswordInput represents the change password request.
type CheckSessionOutput ¶
type CheckSessionOutput struct {
Valid bool `json:"valid"`
User *UserInfo `json:"user,omitempty"`
ExpiresAt time.Time `json:"expiresAt,omitempty"`
SessionID string `json:"sessionId,omitempty"`
}
CheckSessionOutput represents session validation response.
type CreateAppInput ¶
type CreateAppInput struct {
Name string `json:"name" validate:"required"`
Description string `json:"description,omitempty"`
}
CreateAppInput represents app creation request.
type CreateEnvironmentInput ¶
type CreateEnvironmentInput struct {
AppID string `json:"appId" validate:"required"`
Name string `json:"name" validate:"required"`
Slug string `json:"slug"`
Type string `json:"type"` // development, staging, production
Description string `json:"description"`
}
CreateEnvironmentInput represents environment creation request.
type CreateOrganizationInput ¶
type CreateOrganizationInput struct {
AppID string `json:"appId" validate:"required"`
Name string `json:"name" validate:"required"`
Description string `json:"description,omitempty"`
}
CreateOrganizationInput represents organization creation request.
type CurrentUserProfileOutput ¶
type CurrentUserProfileOutput struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name,omitempty"`
Image string `json:"image,omitempty"`
EmailVerified bool `json:"emailVerified"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt,omitempty"`
}
CurrentUserProfileOutput represents the current user's profile.
type CurrentUserSessionsOutput ¶
type CurrentUserSessionsOutput struct {
Sessions []ProfileSessionItem `json:"sessions"`
}
CurrentUserSessionsOutput represents the current user's sessions.
type DashboardStatsInput ¶
type DashboardStatsInput struct {
AppID string `json:"appId" validate:"required"`
}
DashboardStatsInput represents stats request.
type DashboardStatsOutput ¶
type DashboardStatsOutput struct {
TotalUsers int64 `json:"totalUsers"`
ActiveUsers int64 `json:"activeUsers"`
TotalSessions int64 `json:"totalSessions"`
ActiveSessions int64 `json:"activeSessions"`
NewUsersToday int64 `json:"newUsersToday"`
NewUsersWeek int64 `json:"newUsersWeek"`
GrowthRate float64 `json:"growthRate"`
UserGrowthData []GrowthPoint `json:"userGrowthData"`
}
DashboardStatsOutput represents dashboard statistics.
type DeleteAppInput ¶
type DeleteAppInput struct {
AppID string `json:"appId" validate:"required"`
}
DeleteAppInput represents app delete request.
type DeleteEnvironmentInput ¶
type DeleteEnvironmentInput struct {
AppID string `json:"appId" validate:"required"`
EnvID string `json:"envId" validate:"required"`
}
DeleteEnvironmentInput represents environment delete request.
type DeleteOrganizationInput ¶
type DeleteOrganizationInput struct {
OrgID string `json:"orgId" validate:"required"`
}
DeleteOrganizationInput represents organization delete request.
type DeleteUserInput ¶
type DeleteUserInput struct {
UserID string `json:"userId" validate:"required"`
}
DeleteUserInput represents user delete request.
type EnvironmentDetailInput ¶
type EnvironmentDetailInput struct {
AppID string `json:"appId" validate:"required"`
EnvID string `json:"envId" validate:"required"`
}
EnvironmentDetailInput represents environment detail request.
type EnvironmentDetailOutput ¶
type EnvironmentDetailOutput struct {
ID string `json:"id"`
AppID string `json:"appId"`
Name string `json:"name"`
Slug string `json:"slug"`
Type environment.EnvironmentType `json:"type"`
Status environment.EnvironmentStatus `json:"status"`
Config map[string]any `json:"config"`
IsDefault bool `json:"isDefault"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Promotions []PromotionItem `json:"promotions"`
}
EnvironmentDetailOutput represents environment detail response.
type EnvironmentItem ¶
type EnvironmentItem struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Type environment.EnvironmentType `json:"type"`
Status environment.EnvironmentStatus `json:"status"`
CreatedAt string `json:"createdAt"`
}
EnvironmentItem represents an environment.
type EnvironmentsListInput ¶
type EnvironmentsListInput struct {
AppID string `json:"appId" validate:"required"`
}
EnvironmentsListInput represents environments list request.
type EnvironmentsListOutput ¶
type EnvironmentsListOutput struct {
Environments []EnvironmentItem `json:"environments"`
Current *EnvironmentItem `json:"current,omitempty"`
}
EnvironmentsListOutput represents environments list response.
type ExtensionRegistry ¶
type ExtensionRegistry interface {
GetDashboardWidgets() []ui.DashboardWidget
}
ExtensionRegistry interface for accessing dashboard extensions.
type ExtensionWidget ¶
type ExtensionWidget struct {
ExtensionID string `json:"extensionId"`
Title string `json:"title"`
Content string `json:"content"` // HTML content or data
Type string `json:"type"` // "html", "component", "chart"
}
ExtensionWidget represents a dashboard extension widget.
type ExtensionWidgetsInput ¶
type ExtensionWidgetsInput struct {
AppID string `json:"appId" validate:"required"`
}
ExtensionWidgetsInput represents extension widgets request.
type ExtensionWidgetsOutput ¶
type ExtensionWidgetsOutput struct {
Widgets []ExtensionWidget `json:"widgets"`
}
ExtensionWidgetsOutput represents extension widgets.
type GeneralSettingsInput ¶
type GeneralSettingsInput struct {
AppID string `json:"appId" validate:"required"`
}
GeneralSettingsInput represents general settings request.
type GeneralSettingsOutput ¶
type GeneralSettingsOutput struct {
AppName string `json:"appName"`
Description string `json:"description,omitempty"`
Timezone string `json:"timezone"`
Language string `json:"language"`
DateFormat string `json:"dateFormat,omitempty"`
SupportEmail string `json:"supportEmail,omitempty"`
WebsiteUrl string `json:"websiteUrl,omitempty"`
}
GeneralSettingsOutput represents general settings response.
type GenericSuccessOutput ¶
GenericSuccessOutput represents a generic success response.
type GrowthPoint ¶
GrowthPoint represents a data point for growth charts.
type ListRolesInput ¶
type ListRolesInput struct {
AppID string `json:"appId" validate:"required"`
OrgID string `json:"orgId,omitempty"`
}
ListRolesInput represents list roles request.
type ListRolesOutput ¶
type ListRolesOutput struct {
Roles []RoleItem `json:"roles"`
}
ListRolesOutput represents list roles response.
type LogoutOutput ¶
LogoutOutput represents logout response.
type MemberItem ¶
type MemberItem struct {
UserID string `json:"userId"`
Email string `json:"email"`
Name string `json:"name,omitempty"`
Roles []string `json:"roles"`
JoinedAt string `json:"joinedAt"`
}
MemberItem represents a member in an organization.
type OrganizationDetailInput ¶
type OrganizationDetailInput struct {
OrgID string `json:"orgId" validate:"required"`
}
OrganizationDetailInput represents organization detail request.
type OrganizationDetailOutput ¶
type OrganizationDetailOutput struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Members []MemberItem `json:"members"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt,omitempty"`
Status string `json:"status"`
}
OrganizationDetailOutput represents organization detail response.
type OrganizationItem ¶
type OrganizationItem struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
MemberCount int `json:"memberCount"`
CreatedAt string `json:"createdAt"`
Status string `json:"status"`
}
OrganizationItem represents an organization in the list.
type OrganizationsListInput ¶
type OrganizationsListInput struct {
AppID string `json:"appId" validate:"required"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
}
OrganizationsListInput represents organizations list request.
type OrganizationsListOutput ¶
type OrganizationsListOutput struct {
Organizations []OrganizationItem `json:"organizations"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
TotalPages int `json:"totalPages"`
}
OrganizationsListOutput represents organizations list response.
type PluginInfo ¶
type PluginInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
Status string `json:"status"` // "enabled", "disabled"
Icon string `json:"icon"`
}
PluginInfo represents information about a plugin.
type PluginItem ¶
type PluginItem struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Category string `json:"category"`
Enabled bool `json:"enabled"`
}
PluginItem represents a plugin.
type PluginsListInput ¶
type PluginsListInput struct {
AppID string `json:"appId" validate:"required"`
}
PluginsListInput represents plugins list request.
type PluginsListOutput ¶
type PluginsListOutput struct {
Plugins []PluginItem `json:"plugins"`
}
PluginsListOutput represents plugins list response.
type PluginsOverviewInput ¶
type PluginsOverviewInput struct {
AppID string `json:"appId" validate:"required"`
}
PluginsOverviewInput represents plugins overview request.
type PluginsOverviewOutput ¶
type PluginsOverviewOutput struct {
EnabledCount int `json:"enabledCount"`
TotalCount int `json:"totalCount"`
Plugins []PluginInfo `json:"plugins"`
}
PluginsOverviewOutput represents plugins overview.
type ProfileRevokeSessionInput ¶
type ProfileRevokeSessionInput struct {
SessionID string `json:"sessionId" validate:"required"`
}
ProfileRevokeSessionInput represents the revoke session request for profile page.
type ProfileSessionItem ¶
type ProfileSessionItem struct {
ID string `json:"id"`
UserAgent string `json:"userAgent,omitempty"`
IPAddress string `json:"ipAddress,omitempty"`
CreatedAt string `json:"createdAt"`
LastActiveAt string `json:"lastActiveAt,omitempty"`
ExpiresAt string `json:"expiresAt,omitempty"`
IsCurrent bool `json:"isCurrent"`
}
ProfileSessionItem represents a session in the profile page.
type PromoteEnvironmentInput ¶
type PromoteEnvironmentInput struct {
AppID string `json:"appId" validate:"required"`
SourceEnvID string `json:"sourceEnvId" validate:"required"`
TargetEnvID string `json:"targetEnvId" validate:"required"`
}
PromoteEnvironmentInput represents environment promotion request.
type PromotionItem ¶
type PromotionItem struct {
ID string `json:"id"`
FromEnvID string `json:"fromEnvId"`
FromEnvName string `json:"fromEnvName"`
ToEnvID string `json:"toEnvId"`
ToEnvName string `json:"toEnvName"`
Status string `json:"status"`
CreatedAt string `json:"createdAt"`
}
PromotionItem represents a promotion history item.
type RecentActivityInput ¶
type RecentActivityInput struct {
AppID string `json:"appId" validate:"required"`
Limit int `json:"limit,omitempty"`
}
RecentActivityInput represents recent activity request.
type RecentActivityOutput ¶
type RecentActivityOutput struct {
Activities []ActivityItem `json:"activities"`
}
RecentActivityOutput represents recent activity.
type RegisterInput ¶
type RegisterInput struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required,min:8"`
Name string `json:"name,omitempty"`
}
RegisterInput represents the signup request.
type RegisterOutput ¶
type RegisterOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
SessionToken string `json:"sessionToken,omitempty"`
RedirectURL string `json:"redirectUrl,omitempty"`
User *UserInfo `json:"user,omitempty"`
}
RegisterOutput represents the signup response.
type RequestPasswordResetInput ¶
type RequestPasswordResetInput struct {
Email string `json:"email" validate:"required,email"`
}
RequestPasswordResetInput represents password reset request.
type RequestPasswordResetOutput ¶
type RequestPasswordResetOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
}
RequestPasswordResetOutput represents password reset response.
type ResetPasswordInput ¶
type ResetPasswordInput struct {
Token string `json:"token" validate:"required"`
Password string `json:"password" validate:"required,min:8"`
}
ResetPasswordInput represents password reset with token.
type ResetPasswordOutput ¶
ResetPasswordOutput represents password reset response.
type RevokeAllSessionsInput ¶
type RevokeAllSessionsInput struct {
UserID string `json:"userId" validate:"required"`
}
RevokeAllSessionsInput represents revoke all sessions request.
type RevokeSessionInput ¶
type RevokeSessionInput struct {
SessionID string `json:"sessionId" validate:"required"`
}
RevokeSessionInput represents session revoke request.
type RoleItem ¶
type RoleItem struct {
ID string `json:"id"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
}
RoleItem represents a role.
type SchemaOutput ¶
SchemaOutput represents the settings schema response.
type SectionSettingsInput ¶
type SectionSettingsInput struct {
AppID string `json:"appId" validate:"required"`
SectionID string `json:"sectionId" validate:"required"`
}
SectionSettingsInput represents a request for any section's settings.
type SectionSettingsOutput ¶
type SectionSettingsOutput struct {
SectionID string `json:"sectionId"`
Data map[string]any `json:"data"`
}
SectionSettingsOutput represents any section's settings response.
type SecuritySettingsOutput ¶
type SecuritySettingsOutput struct {
PasswordMinLength int `json:"passwordMinLength"`
RequireUppercase bool `json:"requireUppercase"`
RequireLowercase bool `json:"requireLowercase"`
RequireNumbers bool `json:"requireNumbers"`
RequireSpecialChars bool `json:"requireSpecialChars"`
MaxLoginAttempts int `json:"maxLoginAttempts"`
LockoutDuration int `json:"lockoutDuration"`
RequireMFA bool `json:"requireMFA"`
AllowedMFAMethods []string `json:"allowedMfaMethods,omitempty"`
AllowedIPAddresses []string `json:"allowedIpAddresses,omitempty"`
}
SecuritySettingsOutput represents security settings response.
type SessionItem ¶
type SessionItem struct {
ID string `json:"id"`
UserID string `json:"userId"`
UserEmail string `json:"userEmail,omitempty"`
IPAddress string `json:"ipAddress,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Device string `json:"device,omitempty"`
Location string `json:"location,omitempty"`
CreatedAt string `json:"createdAt"`
ExpiresAt string `json:"expiresAt"`
LastUsed string `json:"lastUsed,omitempty"`
IsActive bool `json:"isActive"`
}
SessionItem represents a session in the list.
type SessionSettingsOutput ¶
type SessionSettingsOutput struct {
SessionDuration int `json:"sessionDuration"`
RefreshTokenDuration int `json:"refreshTokenDuration"`
IdleTimeout int `json:"idleTimeout"`
AllowMultipleSessions bool `json:"allowMultipleSessions"`
MaxConcurrentSessions int `json:"maxConcurrentSessions"`
RememberMeEnabled bool `json:"rememberMeEnabled"`
RememberMeDuration int `json:"rememberMeDuration"`
CookieSameSite string `json:"cookieSameSite"`
CookieSecure bool `json:"cookieSecure"`
}
SessionSettingsOutput represents session settings response.
type SessionsListInput ¶
type SessionsListInput struct {
AppID string `json:"appId" validate:"required"`
UserID string `json:"userId,omitempty"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
Status *string `json:"status,omitempty"` // "active", "expired", "all"
SearchEmail string `json:"searchEmail,omitempty"` // Email search filter
}
SessionsListInput represents sessions list request.
type SessionsListOutput ¶
type SessionsListOutput struct {
Sessions []SessionItem `json:"sessions"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
TotalPages int `json:"totalPages"`
}
SessionsListOutput represents sessions list response.
type StatusComponent ¶
type StatusComponent struct {
Name string `json:"name"`
Status string `json:"status"` // "operational", "degraded", "down"
Description string `json:"description,omitempty"`
Color string `json:"color"` // "green", "yellow", "red"
}
StatusComponent represents a single system component status.
type SwitchEnvironmentInput ¶
type SwitchEnvironmentInput struct {
AppID string `json:"appId" validate:"required"`
EnvID string `json:"envId" validate:"required"`
}
SwitchEnvironmentInput represents environment switch request.
type SystemConfigInput ¶
type SystemConfigInput struct {
}
SystemConfigInput represents system config request.
type SystemConfigOutput ¶
type SystemConfigOutput struct {
Version string `json:"version"`
Environment string `json:"environment"`
Features map[string]bool `json:"features"`
Settings map[string]any `json:"settings"`
}
SystemConfigOutput represents system config.
type SystemStatusInput ¶
type SystemStatusInput struct {
AppID string `json:"appId" validate:"required"`
}
SystemStatusInput represents system status request.
type SystemStatusOutput ¶
type SystemStatusOutput struct {
Components []StatusComponent `json:"components"`
}
SystemStatusOutput represents system status.
type TogglePluginInput ¶
type TogglePluginInput struct {
AppID string `json:"appId" validate:"required"`
PluginID string `json:"pluginId" validate:"required"`
Enabled bool `json:"enabled"`
}
TogglePluginInput represents plugin toggle request.
type UpdateAppInput ¶
type UpdateAppInput struct {
AppID string `json:"appId" validate:"required"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
UpdateAppInput represents app update request.
type UpdateCurrentUserProfileInput ¶
type UpdateCurrentUserProfileInput struct {
Name *string `json:"name,omitempty"`
Image *string `json:"image,omitempty"`
}
UpdateCurrentUserProfileInput represents the update profile request.
type UpdateGeneralSettingsInput ¶
type UpdateGeneralSettingsInput struct {
AppID string `json:"appId" validate:"required"`
AppName string `json:"appName,omitempty"`
Description string `json:"description,omitempty"`
Timezone string `json:"timezone,omitempty"`
Language string `json:"language,omitempty"`
DateFormat string `json:"dateFormat,omitempty"`
SupportEmail string `json:"supportEmail,omitempty"`
WebsiteUrl string `json:"websiteUrl,omitempty"`
}
UpdateGeneralSettingsInput represents general settings update request.
type UpdateOrganizationInput ¶
type UpdateOrganizationInput struct {
OrgID string `json:"orgId" validate:"required"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
UpdateOrganizationInput represents organization update request.
type UpdatePasswordInput ¶
type UpdatePasswordInput struct {
UserID string `json:"userId" validate:"required"`
AppID string `json:"appId" validate:"required"`
NewPassword string `json:"newPassword" validate:"required"`
}
UpdatePasswordInput represents password update request.
type UpdateSectionSettingsInput ¶
type UpdateSectionSettingsInput struct {
AppID string `json:"appId" validate:"required"`
SectionID string `json:"sectionId" validate:"required"`
Data map[string]any `json:"data" validate:"required"`
}
UpdateSectionSettingsInput represents a section settings update request.
type UpdateSecuritySettingsInput ¶
type UpdateSecuritySettingsInput struct {
AppID string `json:"appId" validate:"required"`
PasswordMinLength *int `json:"passwordMinLength,omitempty"`
RequireUppercase *bool `json:"requireUppercase,omitempty"`
RequireLowercase *bool `json:"requireLowercase,omitempty"`
RequireNumbers *bool `json:"requireNumbers,omitempty"`
RequireSpecialChars *bool `json:"requireSpecialChars,omitempty"`
MaxLoginAttempts *int `json:"maxLoginAttempts,omitempty"`
LockoutDuration *int `json:"lockoutDuration,omitempty"`
RequireMFA *bool `json:"requireMFA,omitempty"`
AllowedMFAMethods []string `json:"allowedMfaMethods,omitempty"`
AllowedIPAddresses []string `json:"allowedIpAddresses,omitempty"`
}
UpdateSecuritySettingsInput represents security settings update request.
type UpdateSessionSettingsInput ¶
type UpdateSessionSettingsInput struct {
AppID string `json:"appId" validate:"required"`
SessionDuration *int `json:"sessionDuration,omitempty"`
RefreshTokenDuration *int `json:"refreshTokenDuration,omitempty"`
IdleTimeout *int `json:"idleTimeout,omitempty"`
AllowMultipleSessions *bool `json:"allowMultipleSessions,omitempty"`
MaxConcurrentSessions *int `json:"maxConcurrentSessions,omitempty"`
RememberMeEnabled *bool `json:"rememberMeEnabled,omitempty"`
RememberMeDuration *int `json:"rememberMeDuration,omitempty"`
CookieSameSite *string `json:"cookieSameSite,omitempty"`
CookieSecure *bool `json:"cookieSecure,omitempty"`
}
UpdateSessionSettingsInput represents session settings update request.
type UpdateUserInput ¶
type UpdateUserInput struct {
UserID string `json:"userId" validate:"required"`
AppID string `json:"appId" validate:"required"`
Name *string `json:"name,omitempty"`
Email *string `json:"email,omitempty"`
EmailVerified *bool `json:"emailVerified,omitempty"`
Image *string `json:"image,omitempty"`
}
UpdateUserInput represents user update request.
type UpdateUserRolesInput ¶
type UpdateUserRolesInput struct {
UserID string `json:"userId" validate:"required"`
AppID string `json:"appId" validate:"required"`
OrgID string `json:"orgId,omitempty"`
RoleIDs []string `json:"roleIds"` // Array of role IDs to assign
}
UpdateUserRolesInput represents user role update request.
type UserDetailInput ¶
type UserDetailInput struct {
UserID string `json:"userId" validate:"required"`
AppID string `json:"appId,omitempty"`
}
UserDetailInput represents user detail request.
type UserDetailOutput ¶
type UserDetailOutput struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name,omitempty"`
EmailVerified bool `json:"emailVerified"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt,omitempty"`
Roles []string `json:"roles,omitempty"`
Status string `json:"status"`
LastLoginAt string `json:"lastLoginAt,omitempty"`
SessionCount int `json:"sessionCount"`
}
UserDetailOutput represents user detail response.
type UserInfo ¶
type UserInfo struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name,omitempty"`
}
UserInfo represents basic user information.
type UserItem ¶
type UserItem struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name,omitempty"`
EmailVerified bool `json:"emailVerified"`
CreatedAt string `json:"createdAt"`
Roles []string `json:"roles,omitempty"`
Status string `json:"status"`
}
UserItem represents a user in the list.
type UsersListInput ¶
type UsersListInput struct {
AppID string `json:"appId" validate:"required"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
SearchTerm string `json:"searchTerm,omitempty"`
SortBy string `json:"sortBy,omitempty"`
SortOrder string `json:"sortOrder,omitempty"`
Status *string `json:"status,omitempty"` // "active", "inactive", "banned"
EmailVerified *bool `json:"emailVerified,omitempty"` // true/false
RoleFilter string `json:"roleFilter,omitempty"` // role name to filter by
}
UsersListInput represents users list request.