Documentation
¶
Index ¶
- Constants
- func AssignApplicationOrganization(c *gin.Context)
- func ChangeInfo(c *gin.Context)
- func ChangePassword(c *gin.Context)
- func CheckSystemReachability(c *gin.Context)
- func ConfigureAlerts(c *gin.Context)
- func ConfirmCustomersImport(c *gin.Context)
- func ConfirmDistributorsImport(c *gin.Context)
- func ConfirmResellersImport(c *gin.Context)
- func ConfirmUsersImport(c *gin.Context)
- func CreateCustomer(c *gin.Context)
- func CreateDistributor(c *gin.Context)
- func CreateReseller(c *gin.Context)
- func CreateSystem(c *gin.Context)
- func CreateSystemAlertSilence(c *gin.Context)
- func CreateUser(c *gin.Context)
- func DeleteApplication(c *gin.Context)
- func DeleteCustomer(c *gin.Context)
- func DeleteDistributor(c *gin.Context)
- func DeleteMyAvatar(c *gin.Context)
- func DeleteRebrandingAsset(c *gin.Context)
- func DeleteRebrandingProduct(c *gin.Context)
- func DeleteReseller(c *gin.Context)
- func DeleteSystem(c *gin.Context)
- func DeleteSystemAlertSilence(c *gin.Context)
- func DeleteSystemBackup(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DeleteUserAvatar(c *gin.Context)
- func DestroyCustomer(c *gin.Context)
- func DestroyDistributor(c *gin.Context)
- func DestroyReseller(c *gin.Context)
- func DestroySystem(c *gin.Context)
- func DestroyUser(c *gin.Context)
- func DisableAlerts(c *gin.Context)
- func DisableImpersonationConsent(c *gin.Context)
- func DisableRebranding(c *gin.Context)
- func DownloadSystemBackup(c *gin.Context)
- func EnableImpersonationConsent(c *gin.Context)
- func EnableRebranding(c *gin.Context)
- func ExchangeToken(c *gin.Context)
- func ExitImpersonationWithAudit(c *gin.Context)
- func ExportCustomers(c *gin.Context)
- func ExportDistributors(c *gin.Context)
- func ExportResellers(c *gin.Context)
- func ExportSystems(c *gin.Context)
- func ExportUsers(c *gin.Context)
- func FetchFilteredRoles(user *models.User) ([]models.Role, error)
- func GetAlertingConfig(c *gin.Context)
- func GetAlerts(c *gin.Context)
- func GetAlertsHistory(c *gin.Context)
- func GetAlertsStats(c *gin.Context)
- func GetAlertsTotals(c *gin.Context)
- func GetAlertsTrend(c *gin.Context)
- func GetApplication(c *gin.Context)
- func GetApplicationFilters(c *gin.Context)
- func GetApplicationTotals(c *gin.Context)
- func GetApplicationTypeSummary(c *gin.Context)
- func GetApplications(c *gin.Context)
- func GetApplicationsTrend(c *gin.Context)
- func GetCurrentUser(c *gin.Context)
- func GetCustomer(c *gin.Context)
- func GetCustomerStats(c *gin.Context)
- func GetCustomers(c *gin.Context)
- func GetCustomersImportTemplate(c *gin.Context)
- func GetCustomersTotals(c *gin.Context)
- func GetCustomersTrend(c *gin.Context)
- func GetDistributor(c *gin.Context)
- func GetDistributorStats(c *gin.Context)
- func GetDistributors(c *gin.Context)
- func GetDistributorsImportTemplate(c *gin.Context)
- func GetDistributorsTotals(c *gin.Context)
- func GetDistributorsTrend(c *gin.Context)
- func GetImpersonationConsentStatus(c *gin.Context)
- func GetImpersonationSession(c *gin.Context)
- func GetImpersonationSessions(c *gin.Context)
- func GetImpersonationStatus(c *gin.Context)
- func GetOrganizationRoles(c *gin.Context)
- func GetOrganizations(c *gin.Context)
- func GetPublicAvatar(c *gin.Context)
- func GetRebrandingAsset(c *gin.Context)
- func GetRebrandingOrgProducts(c *gin.Context)
- func GetRebrandingProducts(c *gin.Context)
- func GetRebrandingStatus(c *gin.Context)
- func GetReseller(c *gin.Context)
- func GetResellerStats(c *gin.Context)
- func GetResellers(c *gin.Context)
- func GetResellersImportTemplate(c *gin.Context)
- func GetResellersTotals(c *gin.Context)
- func GetResellersTrend(c *gin.Context)
- func GetRoles(c *gin.Context)
- func GetSessionAudit(c *gin.Context)
- func GetSystem(c *gin.Context)
- func GetSystemAlertHistory(c *gin.Context)
- func GetSystemAlertSilence(c *gin.Context)
- func GetSystemAlertSilences(c *gin.Context)
- func GetSystemAlerts(c *gin.Context)
- func GetSystemBackups(c *gin.Context)
- func GetSystemFilters(c *gin.Context)
- func GetSystemInventoryByID(c *gin.Context)
- func GetSystemInventoryChanges(c *gin.Context)
- func GetSystemInventoryDiffs(c *gin.Context)
- func GetSystemInventoryHistory(c *gin.Context)
- func GetSystemInventoryTimeline(c *gin.Context)
- func GetSystemLatestInventory(c *gin.Context)
- func GetSystemLatestInventoryChanges(c *gin.Context)
- func GetSystemLatestInventoryDiff(c *gin.Context)
- func GetSystems(c *gin.Context)
- func GetSystemsTotals(c *gin.Context)
- func GetSystemsTrend(c *gin.Context)
- func GetThirdPartyApplications(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserFilters(c *gin.Context)
- func GetUserPermissions(c *gin.Context)
- func GetUserProfile(c *gin.Context)
- func GetUsers(c *gin.Context)
- func GetUsersImportTemplate(c *gin.Context)
- func GetUsersTotals(c *gin.Context)
- func GetUsersTrend(c *gin.Context)
- func HasOrgRolePermission(userOrgRole, requiredOrgRole string) bool
- func HasPermission(userPermissions, orgPermissions []string, permission string) bool
- func ImpersonateUserWithConsent(c *gin.Context)
- func Logout(c *gin.Context)
- func ReactivateCustomer(c *gin.Context)
- func ReactivateDistributor(c *gin.Context)
- func ReactivateReseller(c *gin.Context)
- func ReactivateSystem(c *gin.Context)
- func ReactivateUser(c *gin.Context)
- func RefreshToken(c *gin.Context)
- func RegenerateSystemSecret(c *gin.Context)
- func RegisterSystem(c *gin.Context)
- func ResetUserPassword(c *gin.Context)
- func RestoreCustomer(c *gin.Context)
- func RestoreDistributor(c *gin.Context)
- func RestoreReseller(c *gin.Context)
- func RestoreSystem(c *gin.Context)
- func RestoreUser(c *gin.Context)
- func SuspendCustomer(c *gin.Context)
- func SuspendDistributor(c *gin.Context)
- func SuspendReseller(c *gin.Context)
- func SuspendSystem(c *gin.Context)
- func SuspendUser(c *gin.Context)
- func UnassignApplicationOrganization(c *gin.Context)
- func UpdateApplication(c *gin.Context)
- func UpdateCustomer(c *gin.Context)
- func UpdateDistributor(c *gin.Context)
- func UpdateReseller(c *gin.Context)
- func UpdateSystem(c *gin.Context)
- func UpdateSystemAlertSilence(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UploadMyAvatar(c *gin.Context)
- func UploadRebrandingAssets(c *gin.Context)
- func UploadUserAvatar(c *gin.Context)
- func ValidateCustomersImport(c *gin.Context)
- func ValidateDistributorsImport(c *gin.Context)
- func ValidateResellersImport(c *gin.Context)
- func ValidateUsersImport(c *gin.Context)
- type BackupListResponse
- type BackupMetadata
- type ImpersonateRequest
- type RefreshTokenRequest
- type TokenExchangeRequest
- type TokenExchangeResponse
Constants ¶
const (
MaxCustomersExportLimit = 10000 // Maximum customers to export (DoS protection)
)
const (
MaxDistributorsExportLimit = 10000 // Maximum distributors to export (DoS protection)
)
const (
MaxExportLimit = 10000 // Maximum systems to export (DoS protection)
)
const (
MaxResellersExportLimit = 10000 // Maximum resellers to export (DoS protection)
)
const (
MaxUsersExportLimit = 10000 // Maximum users to export (DoS protection)
)
Variables ¶
This section is empty.
Functions ¶
func AssignApplicationOrganization ¶
AssignApplicationOrganization handles PATCH /api/applications/:id/assign - assigns organization
func ChangeInfo ¶
ChangeInfo allows the current user to change their own personal information POST /me/change-info
func ChangePassword ¶
ChangePassword allows the current user to change their own password POST /me/change-password
func CheckSystemReachability ¶
CheckSystemReachability handles GET /api/systems/:id/reachability - checks if a system's web UI is reachable
func ConfigureAlerts ¶
ConfigureAlerts handles POST /api/alerts/config
func ConfirmCustomersImport ¶
ConfirmCustomersImport handles POST /api/customers/import/confirm
func ConfirmDistributorsImport ¶
ConfirmDistributorsImport handles POST /api/distributors/import/confirm
func ConfirmResellersImport ¶
ConfirmResellersImport handles POST /api/resellers/import/confirm
func ConfirmUsersImport ¶
ConfirmUsersImport handles POST /api/users/import/confirm.
Behavior matrix:
valid → CREATE
error → skipped (reason=error)
ambiguous → CREATE with the chosen org if a resolution is provided, otherwise skipped
warning → UPDATE the existing user (looked up by email) when override=true,
otherwise skipped
`skip_rows` no longer exists in the request: the backend computes skips automatically.
func CreateCustomer ¶
CreateCustomer handles POST /api/customers - creates a new customer locally and syncs to Logto
func CreateDistributor ¶
CreateDistributor handles POST /api/distributors - creates a new distributor locally and syncs to Logto
func CreateReseller ¶
CreateReseller handles POST /api/resellers - creates a new reseller locally and syncs to Logto
func CreateSystem ¶
CreateSystem handles POST /api/systems - creates a new system
func CreateSystemAlertSilence ¶
CreateSystemAlertSilence handles POST /api/systems/:id/alerts/silences Creates a silence in Alertmanager for a specific active system alert.
func CreateUser ¶
CreateUser handles POST /api/users - creates a new user locally and syncs to Logto
func DeleteApplication ¶
DeleteApplication handles DELETE /api/applications/:id - soft deletes an application
func DeleteCustomer ¶
DeleteCustomer handles DELETE /api/customers/:id - soft-deletes a customer locally and syncs to Logto
func DeleteDistributor ¶
DeleteDistributor handles DELETE /api/distributors/:id - soft-deletes a distributor locally and syncs to Logto
func DeleteMyAvatar ¶
DeleteMyAvatar removes the avatar for the current user. DELETE /api/me/avatar
func DeleteRebrandingAsset ¶
DeleteRebrandingAsset deletes a single asset for an org+product
func DeleteRebrandingProduct ¶
DeleteRebrandingProduct deletes all rebranding assets for an org+product
func DeleteReseller ¶
DeleteReseller handles DELETE /api/resellers/:id - soft-deletes a reseller locally and syncs to Logto
func DeleteSystem ¶
DeleteSystem handles DELETE /api/systems/:id - deletes a system
func DeleteSystemAlertSilence ¶
DeleteSystemAlertSilence handles DELETE /api/systems/:id/alerts/silences/:silence_id Deletes a system-scoped silence in Alertmanager after validating its ownership.
func DeleteSystemBackup ¶
DeleteSystemBackup handles DELETE /api/systems/:id/backups/:backup_id — removes a backup object from storage. RBAC-gated like the read endpoints.
func DeleteUser ¶
DeleteUser handles DELETE /api/users/:id - soft-deletes a user account locally and syncs to Logto
func DeleteUserAvatar ¶
DeleteUserAvatar removes the avatar for another user (admin). DELETE /api/users/:id/avatar
func DestroyCustomer ¶
DestroyCustomer handles DELETE /api/customers/:id/destroy - permanently deletes a customer
func DestroyDistributor ¶
DestroyDistributor handles DELETE /api/distributors/:id/destroy - permanently deletes a distributor
func DestroyReseller ¶
DestroyReseller handles DELETE /api/resellers/:id/destroy - permanently deletes a reseller
func DestroySystem ¶
DestroySystem handles DELETE /api/systems/:id/destroy - permanently deletes a system
func DestroyUser ¶
DestroyUser handles DELETE /api/users/:id/destroy - permanently deletes a user
func DisableAlerts ¶
DisableAlerts handles DELETE /api/alerts/config
func DisableImpersonationConsent ¶
DisableImpersonationConsent allows a user to disable consent for being impersonated DELETE /api/impersonate/consent
func DisableRebranding ¶
DisableRebranding disables rebranding for an organization (Owner + Admin only)
func DownloadSystemBackup ¶
DownloadSystemBackup handles GET /api/systems/:id/backups/:backup_id/download. It returns 200 with a JSON body containing a short-lived presigned URL so the caller can fetch the object directly from Spaces.
func EnableImpersonationConsent ¶
EnableImpersonationConsent allows a user to enable consent for being impersonated POST /api/impersonate/consent
func EnableRebranding ¶
EnableRebranding enables rebranding for an organization (Owner + Admin only)
func ExchangeToken ¶
ExchangeToken converts Logto access token to custom JWT POST /auth/exchange
func ExitImpersonationWithAudit ¶
ExitImpersonationWithAudit allows user to exit impersonation mode and logs the session end DELETE /api/impersonate
func ExportCustomers ¶
ExportCustomers handles GET /api/customers/export - exports customers with applied filters
func ExportDistributors ¶
ExportDistributors handles GET /api/distributors/export - exports distributors with applied filters
func ExportResellers ¶
ExportResellers handles GET /api/resellers/export - exports resellers with applied filters
func ExportSystems ¶
ExportSystems handles GET /api/systems/export - exports systems with applied filters
func ExportUsers ¶
ExportUsers handles GET /api/users/export - exports users with applied filters
func FetchFilteredRoles ¶
FetchFilteredRoles returns user roles filtered by access control. Extracted for reuse by the aggregated users filters endpoint.
func GetAlertingConfig ¶
GetAlertingConfig handles GET /api/alerts/config By default returns structured JSON parsed from Mimir YAML. Use ?format=yaml to get the raw (redacted) YAML.
func GetAlerts ¶
GetAlerts handles GET /api/alerts
Lists active alerts. Scope follows the same three modes as /alerts/totals:
- no organization_id → caller's full hierarchy (cross-tenant fan-out)
- organization_id=X → single tenant X
- organization_id=X & include=descendants → X plus its sub-tree
Customer callers are always pinned to their own organization.
Response contains the paginated slice plus a `pagination` object and a `warnings` array (always present, populated only when one or more tenants failed during fan-out — the rest of the result is still returned).
func GetAlertsHistory ¶
GetAlertsHistory handles GET /api/alerts/history Returns paginated resolved alert history scoped to the caller's hierarchy (no organization_id), a single tenant (organization_id=X), or a sub-tree (organization_id=X&include=descendants). Mirrors the scope rules of /api/alerts/totals. Supports date range and multi-value label filters.
func GetAlertsStats ¶
GetAlertsStats handles GET /api/alerts/stats Returns aggregate statistics over alert_history for the caller's scope: total, by_severity buckets, top-N alertname / system_key, plus MTTR and MTBF approximations. Honors the same scope rules as /alerts/totals (no organization_id / single tenant / descendants drill-down) and accepts an optional date range (from_date / to_date, RFC3339).
func GetAlertsTotals ¶
GetAlertsTotals handles GET /api/alerts/totals Returns active alert counts by severity (from Mimir) and total history count (from DB).
Without organization_id the totals are aggregated across the caller's full hierarchy (one Mimir call per tenant, fanned out with bounded concurrency and a global timeout). With organization_id the call is scoped to that single tenant.
func GetAlertsTrend ¶
GetAlertsTrend handles GET /api/alerts/trend Returns trend data for resolved alerts over a specified period, scoped to the caller's hierarchy (no organization_id), a specific tenant, or a sub-tree (organization_id=X&include=descendants). Mirrors the scope rules of /api/alerts/totals.
func GetApplication ¶
GetApplication handles GET /api/applications/:id - retrieves a single application
func GetApplicationFilters ¶
GetApplicationFilters handles GET /api/filters/applications - aggregated filters endpoint Returns types, versions, systems, and organizations in a single response. Single RBAC resolution, parallel data fetching.
func GetApplicationTotals ¶
GetApplicationTotals handles GET /api/applications/totals - returns statistics
func GetApplicationTypeSummary ¶
GetApplicationTypeSummary handles GET /api/applications/summary - returns applications grouped by type
func GetApplications ¶
GetApplications handles GET /api/applications - retrieves all applications with pagination
func GetApplicationsTrend ¶
GetApplicationsTrend returns trend data for applications over a specified period
func GetCurrentUser ¶
GetCurrentUser returns current user information from JWT token GET /me
func GetCustomer ¶
GetCustomer handles GET /api/customers/:id - retrieves a single customer
func GetCustomerStats ¶
GetCustomerStats handles GET /api/customers/:id/stats - retrieves users, systems and applications count for a customer
func GetCustomers ¶
GetCustomers handles GET /api/customers - list customers with pagination
func GetCustomersImportTemplate ¶
GetCustomersImportTemplate handles GET /api/customers/import/template
func GetCustomersTotals ¶
GetCustomersTotals returns the total count of customers accessible to the user
func GetCustomersTrend ¶
GetCustomersTrend returns trend data for customers over a specified period
func GetDistributor ¶
GetDistributor handles GET /api/distributors/:id - retrieves a single distributor
func GetDistributorStats ¶
GetDistributorStats handles GET /api/distributors/:id/stats - retrieves users and systems count for a distributor
func GetDistributors ¶
GetDistributors handles GET /api/distributors - list distributors with pagination
func GetDistributorsImportTemplate ¶
GetDistributorsImportTemplate handles GET /api/distributors/import/template
func GetDistributorsTotals ¶
GetDistributorsTotals returns the total count of distributors accessible to the user
func GetDistributorsTrend ¶
GetDistributorsTrend returns trend data for distributors over a specified period
func GetImpersonationConsentStatus ¶
GetImpersonationConsentStatus gets the current consent status for the user GET /api/impersonate/consent
func GetImpersonationSession ¶
GetImpersonationSession retrieves details for a specific impersonation session GET /api/impersonate/sessions/:session_id
func GetImpersonationSessions ¶
GetImpersonationSessions retrieves all impersonation sessions for current user GET /api/impersonate/sessions
func GetImpersonationStatus ¶
GetImpersonationStatus checks if user is currently impersonating and returns session info GET /api/impersonate/status
func GetOrganizationRoles ¶
GetOrganizationRoles returns all available organization roles
func GetOrganizations ¶
GetOrganizations returns organizations the current user can assign users to with pagination and search
func GetPublicAvatar ¶
GetPublicAvatar serves a user's avatar image without authentication. GET /api/public/users/:id/avatar
func GetRebrandingAsset ¶
GetRebrandingAsset serves a single asset binary for an org+product (authenticated via JWT)
func GetRebrandingOrgProducts ¶
GetRebrandingOrgProducts returns rebranding products configuration for an organization
func GetRebrandingProducts ¶
GetRebrandingProducts returns all rebrandable products
func GetRebrandingStatus ¶
GetRebrandingStatus returns the rebranding status for an organization
func GetReseller ¶
GetReseller handles GET /api/resellers/:id - retrieves a single reseller
func GetResellerStats ¶
GetResellerStats handles GET /api/resellers/:id/stats - retrieves users and systems count for a reseller
func GetResellers ¶
GetResellers handles GET /api/resellers - list resellers with pagination
func GetResellersImportTemplate ¶
GetResellersImportTemplate handles GET /api/resellers/import/template
func GetResellersTotals ¶
GetResellersTotals returns the total count of resellers accessible to the user
func GetResellersTrend ¶
GetResellersTrend returns trend data for resellers over a specified period
func GetSessionAudit ¶
GetSessionAudit retrieves audit history for a specific impersonation session GET /api/impersonate/sessions/:session_id/audit
func GetSystemAlertHistory ¶
GetSystemAlertHistory handles GET /api/systems/:id/alerts/history Returns paginated resolved/inactive alert history for a system, with optional date range (?from_date=, ?to_date=, RFC3339) and multi-value label filters (alertname, severity, status).
func GetSystemAlertSilence ¶
GetSystemAlertSilence handles GET /api/systems/:id/alerts/silences/:silence_id Returns a single silence after validating it belongs to this system.
func GetSystemAlertSilences ¶
GetSystemAlertSilences handles GET /api/systems/:id/alerts/silences Returns all active and pending silences in Alertmanager that are scoped to this system.
func GetSystemAlerts ¶
GetSystemAlerts handles GET /api/systems/:id/alerts Returns active alerts from Mimir for a specific system, filtered by system_key.
func GetSystemBackups ¶
GetSystemBackups handles GET /api/systems/:id/backups — returns the list of backups stored for the given system, enriched with size, checksum, and uploader metadata. Access is gated by the same RBAC rules as GetSystem.
func GetSystemFilters ¶
GetSystemFilters handles GET /api/filters/systems - aggregated filters endpoint Returns products, created_by, versions, and organizations in a single response. Single auth check, parallel data fetching.
func GetSystemInventoryByID ¶
GetSystemInventoryByID handles GET /api/systems/:id/inventory/:inventory_id - retrieves a specific inventory record
func GetSystemInventoryChanges ¶
GetSystemInventoryChanges handles GET /api/systems/:id/inventory/changes - retrieves changes summary
func GetSystemInventoryDiffs ¶
GetSystemInventoryDiffs handles GET /api/systems/:id/inventory/diffs - retrieves paginated diffs
func GetSystemInventoryHistory ¶
GetSystemInventoryHistory handles GET /api/systems/:id/inventory - retrieves paginated inventory history
func GetSystemInventoryTimeline ¶
GetSystemInventoryTimeline handles GET /api/systems/:id/inventory/timeline - retrieves date-grouped timeline
func GetSystemLatestInventory ¶
GetSystemLatestInventory handles GET /api/systems/:id/inventory/latest - retrieves latest inventory
func GetSystemLatestInventoryChanges ¶
GetSystemLatestInventoryChanges handles GET /api/systems/:id/inventory/changes/latest - retrieves latest batch changes summary
func GetSystemLatestInventoryDiff ¶
GetSystemLatestInventoryDiff handles GET /api/systems/:id/inventory/diffs/latest - retrieves latest diffs batch
func GetSystems ¶
GetSystems handles GET /api/systems - retrieves all systems with pagination
func GetSystemsTotals ¶
GetSystemsTotals returns the total count of systems and their liveness status based on heartbeat data Respects RBAC hierarchy - users only see totals for systems they can access
func GetSystemsTrend ¶
GetSystemsTrend returns trend data for systems over a specified period
func GetThirdPartyApplications ¶
GetThirdPartyApplications handles GET /api/third-party-applications Returns third-party applications filtered by user access permissions
func GetUserFilters ¶
GetUserFilters handles GET /api/filters/users - aggregated filters endpoint Returns roles and organizations in a single response. Single auth check, parallel data fetching.
func GetUserPermissions ¶
GetUserPermissions returns user permissions and role information
func GetUserProfile ¶
GetUserProfile returns complete user profile with business context
func GetUsersImportTemplate ¶
GetUsersImportTemplate handles GET /api/users/import/template
func GetUsersTotals ¶
GetUsersTotals returns the total count of user accounts accessible to the user
func GetUsersTrend ¶
GetUsersTrend returns trend data for users over a specified period
func HasOrgRolePermission ¶
HasOrgRolePermission checks if userOrgRole has permission to access requiredOrgRole Following the business hierarchy: Owner > Distributor > Reseller > Customer
func HasPermission ¶
HasPermission checks if a permission exists in either user permissions or org permissions arrays
func ImpersonateUserWithConsent ¶
ImpersonateUserWithConsent allows owner users to impersonate another user (only if consent is active) POST /api/impersonate
func Logout ¶
Logout invalidates the current JWT token by adding it to the blacklist POST /api/auth/logout
func ReactivateCustomer ¶
ReactivateCustomer handles PATCH /api/customers/:id/reactivate - reactivates a customer and its cascade-suspended users
func ReactivateDistributor ¶
ReactivateDistributor handles PATCH /api/distributors/:id/reactivate - reactivates a distributor and its cascade-suspended users
func ReactivateReseller ¶
ReactivateReseller handles PATCH /api/resellers/:id/reactivate - reactivates a reseller and its cascade-suspended users
func ReactivateSystem ¶
ReactivateSystem handles PATCH /api/systems/:id/reactivate - reactivates a suspended system
func ReactivateUser ¶
ReactivateUser handles PATCH /api/users/:id/reactivate - reactivates a suspended user
func RefreshToken ¶
RefreshToken refreshes access token using refresh token POST /auth/refresh
func RegenerateSystemSecret ¶
RegenerateSystemSecret handles POST /api/systems/:id/regenerate-secret - regenerates system secret
func RegisterSystem ¶
RegisterSystem handles POST /api/systems/register - registers a system using system_secret
func ResetUserPassword ¶
ResetUserPassword handles PATCH /api/users/:id/password - resets user password
func RestoreCustomer ¶
RestoreCustomer handles PATCH /api/customers/:id/restore - restores a soft-deleted customer
func RestoreDistributor ¶
RestoreDistributor handles PATCH /api/distributors/:id/restore - restores a soft-deleted distributor
func RestoreReseller ¶
RestoreReseller handles PATCH /api/resellers/:id/restore - restores a soft-deleted reseller
func RestoreSystem ¶
RestoreSystem handles PATCH /api/systems/:id/restore - restores a soft-deleted system
func RestoreUser ¶
RestoreUser handles PATCH /api/users/:id/restore - restores a soft-deleted user
func SuspendCustomer ¶
SuspendCustomer handles PATCH /api/customers/:id/suspend - suspends a customer and all its users
func SuspendDistributor ¶
SuspendDistributor handles PATCH /api/distributors/:id/suspend - suspends a distributor and all its users
func SuspendReseller ¶
SuspendReseller handles PATCH /api/resellers/:id/suspend - suspends a reseller and all its users
func SuspendSystem ¶
SuspendSystem handles PATCH /api/systems/:id/suspend - suspends a system
func SuspendUser ¶
SuspendUser handles PATCH /api/users/:id/suspend - suspends a user
func UnassignApplicationOrganization ¶
UnassignApplicationOrganization handles PATCH /api/applications/:id/unassign - removes organization
func UpdateApplication ¶
UpdateApplication handles PUT /api/applications/:id - updates an application
func UpdateCustomer ¶
UpdateCustomer handles PUT /api/customers/:id - updates a customer locally and syncs to Logto
func UpdateDistributor ¶
UpdateDistributor handles PUT /api/distributors/:id - updates a distributor locally and syncs to Logto
func UpdateReseller ¶
UpdateReseller handles PUT /api/resellers/:id - updates a reseller locally and syncs to Logto
func UpdateSystem ¶
UpdateSystem handles PUT /api/systems/:id - updates an existing system
func UpdateSystemAlertSilence ¶
UpdateSystemAlertSilence handles PUT /api/systems/:id/alerts/silences/:silence_id Updates the end time and/or comment of an existing silence. Preserves the original matchers and start time; only end time and comment change.
func UpdateUser ¶
UpdateUser handles PUT /api/users/:id - updates a user account locally and syncs to Logto
func UploadMyAvatar ¶
UploadMyAvatar handles avatar upload for the current user. PUT /api/me/avatar
func UploadRebrandingAssets ¶
UploadRebrandingAssets handles multipart upload of rebranding assets for an org+product
func UploadUserAvatar ¶
UploadUserAvatar handles avatar upload for another user (admin). PUT /api/users/:id/avatar
func ValidateCustomersImport ¶
ValidateCustomersImport handles POST /api/customers/import/validate
func ValidateDistributorsImport ¶
ValidateDistributorsImport handles POST /api/distributors/import/validate
func ValidateResellersImport ¶
ValidateResellersImport handles POST /api/resellers/import/validate
func ValidateUsersImport ¶
ValidateUsersImport handles POST /api/users/import/validate
Types ¶
type BackupListResponse ¶
type BackupListResponse struct {
Backups []BackupMetadata `json:"backups"`
QuotaUsedBytes int64 `json:"quota_used_bytes"`
SlotsUsed int `json:"slots_used"`
}
BackupListResponse wraps the list of backups with aggregate usage counters (useful for rendering quota/slot indicators in the UI).
type BackupMetadata ¶
type BackupMetadata struct {
ID string `json:"id"`
Filename string `json:"filename"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
MimeType string `json:"mimetype"`
UploadedAt time.Time `json:"uploaded_at"`
}
BackupMetadata is the JSON payload returned in list responses for a single backup object. The uploader IP is intentionally not exposed: on traffic that transits the translation proxy the stored value is the proxy's IP (not the appliance's), and where it is accurate it would still be a reconnaissance aid for any admin above the customer tier.
type ImpersonateRequest ¶
type ImpersonateRequest struct {
UserID string `json:"user_id" binding:"required"`
}
ImpersonateRequest represents the request body for user impersonation
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
RefreshToken string `json:"refresh_token" binding:"required"`
}
RefreshTokenRequest represents the request body for token refresh
type TokenExchangeRequest ¶
type TokenExchangeRequest struct {
AccessToken string `json:"access_token" binding:"required"`
}
TokenExchangeRequest represents the request body for token exchange
Source Files
¶
- alerting.go
- applications.go
- applications_init.go
- auth.go
- avatar.go
- backups.go
- customers.go
- customers_export.go
- customers_import.go
- distributors.go
- distributors_export.go
- distributors_import.go
- impersonate.go
- import_helpers.go
- inventory.go
- organizations.go
- rebranding.go
- resellers.go
- resellers_export.go
- resellers_import.go
- roles.go
- systems.go
- systems_export.go
- systems_filters.go
- third_party_applications.go
- totals.go
- user.go
- users.go
- users_export.go
- users_filters.go
- users_import.go
- validation.go