Documentation
¶
Index ¶
- Constants
- Variables
- func FrontendBaseURL() string
- func RegisterCurrencyRoutes(api *gin.RouterGroup, h *APIHandler)
- func RegisterCustomCurrencyRoutes(api *gin.RouterGroup, h *CustomCurrencyHandler)
- func RegisterFlightUtilRoutes(api *gin.RouterGroup, h *APIHandler)
- func RegisterOIDCRoutes(rg *gin.RouterGroup, h *APIHandler)
- func StartImportSessionReaper(ctx context.Context, interval time.Duration)
- type APIHandler
- func (h *APIHandler) AttachCrewMembers(ctx context.Context, flights []*models.Flight)
- func (h *APIHandler) ChangePassword(c *gin.Context)
- func (h *APIHandler) CleanupTokens(c *gin.Context)
- func (h *APIHandler) CleanupUnverifiedAccounts(c *gin.Context)
- func (h *APIHandler) CompletePublicSignature(c *gin.Context, token generated.SignatureToken)
- func (h *APIHandler) ConfirmImport(c *gin.Context)
- func (h *APIHandler) CreateAircraft(c *gin.Context)
- func (h *APIHandler) CreateAnnouncement(c *gin.Context)
- func (h *APIHandler) CreateBackupDestination(c *gin.Context)
- func (h *APIHandler) CreateClassRating(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) CreateContact(c *gin.Context)
- func (h *APIHandler) CreateCredential(c *gin.Context)
- func (h *APIHandler) CreateFlight(c *gin.Context)
- func (h *APIHandler) CreateLicense(c *gin.Context)
- func (h *APIHandler) CreateSignatureRequest(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) DeleteAircraft(c *gin.Context, aircraftId generated.AircraftId)
- func (h *APIHandler) DeleteAllFlights(c *gin.Context)
- func (h *APIHandler) DeleteAllUserData(c *gin.Context)
- func (h *APIHandler) DeleteAnnouncement(c *gin.Context, announcementId openapi_types.UUID)
- func (h *APIHandler) DeleteBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
- func (h *APIHandler) DeleteClassRating(c *gin.Context, licenseId generated.LicenseId, ratingId openapi_types.UUID)
- func (h *APIHandler) DeleteContact(c *gin.Context, contactId openapi_types.UUID)
- func (h *APIHandler) DeleteCredential(c *gin.Context, credentialId generated.CredentialId)
- func (h *APIHandler) DeleteCredentialFile(c *gin.Context, credentialId generated.CredentialId, ...)
- func (h *APIHandler) DeleteCurrentUser(c *gin.Context)
- func (h *APIHandler) DeleteEmailSuppression(c *gin.Context, email openapi_types.Email)
- func (h *APIHandler) DeleteFlight(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) DeleteLicense(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) DeleteLicenseFile(c *gin.Context, licenseId generated.LicenseId, fileId generated.DocumentFileId)
- func (h *APIHandler) DeleteMyBaseline(c *gin.Context)
- func (h *APIHandler) DeleteUser(c *gin.Context, userId openapi_types.UUID)
- func (h *APIHandler) DeleteWebauthnCredential(c *gin.Context, credentialId openapi_types.UUID)
- func (h *APIHandler) Disable2FA(c *gin.Context)
- func (h *APIHandler) DisableUser(c *gin.Context, userId openapi_types.UUID)
- func (h *APIHandler) DiscardCurrentFlightSession(c *gin.Context)
- func (h *APIHandler) EnableUser(c *gin.Context, userId openapi_types.UUID)
- func (h *APIHandler) ExchangeOidcCode(c *gin.Context)
- func (h *APIHandler) ExportContactsVCard(c *gin.Context)
- func (h *APIHandler) ExportDataJSON(c *gin.Context)
- func (h *APIHandler) ExportFlightsCSV(c *gin.Context, params generated.ExportFlightsCSVParams)
- func (h *APIHandler) ExportFlightsPDF(c *gin.Context, params generated.ExportFlightsPDFParams)
- func (h *APIHandler) GetAdminConfig(c *gin.Context)
- func (h *APIHandler) GetAdminStats(c *gin.Context)
- func (h *APIHandler) GetAircraft(c *gin.Context, aircraftId generated.AircraftId)
- func (h *APIHandler) GetAircraftStats(c *gin.Context)
- func (h *APIHandler) GetAirport(c *gin.Context, icaoCode string)
- func (h *APIHandler) GetAirportStats(c *gin.Context)
- func (h *APIHandler) GetAllCurrencyStatus(c *gin.Context)
- func (h *APIHandler) GetAnnouncements(c *gin.Context)
- func (h *APIHandler) GetAuthProviders(c *gin.Context)
- func (h *APIHandler) GetBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
- func (h *APIHandler) GetBackupRun(c *gin.Context, runID openapi_types.UUID)
- func (h *APIHandler) GetContact(c *gin.Context, contactId openapi_types.UUID)
- func (h *APIHandler) GetCredential(c *gin.Context, credentialId generated.CredentialId)
- func (h *APIHandler) GetCredentialFile(c *gin.Context, credentialId generated.CredentialId, ...)
- func (h *APIHandler) GetCurrentFlightSession(c *gin.Context)
- func (h *APIHandler) GetCurrentUser(c *gin.Context)
- func (h *APIHandler) GetFeatures(c *gin.Context)
- func (h *APIHandler) GetFlight(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) GetFlightAnalytics(c *gin.Context, params generated.GetFlightAnalyticsParams)
- func (h *APIHandler) GetFlightRoutes(c *gin.Context)
- func (h *APIHandler) GetFlightSignature(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
- func (h *APIHandler) GetFlightSignatureImage(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
- func (h *APIHandler) GetFlightTrends(c *gin.Context, params generated.GetFlightTrendsParams)
- func (h *APIHandler) GetImport(c *gin.Context, importId generated.ImportId)
- func (h *APIHandler) GetLicense(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) GetLicenseCurrency(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) GetLicenseFile(c *gin.Context, licenseId generated.LicenseId, fileId generated.DocumentFileId)
- func (h *APIHandler) GetLicenseStatistics(c *gin.Context, licenseId generated.LicenseId, ...)
- func (h *APIHandler) GetMyBaseline(c *gin.Context)
- func (h *APIHandler) GetMyStatistics(c *gin.Context, params generated.GetMyStatisticsParams)
- func (h *APIHandler) GetNotificationHistory(c *gin.Context, params generated.GetNotificationHistoryParams)
- func (h *APIHandler) GetNotificationPreferences(c *gin.Context)
- func (h *APIHandler) GetPublicSignatureInfo(c *gin.Context, token generated.SignatureToken)
- func (h *APIHandler) GetStatsByClass(c *gin.Context, params generated.GetStatsByClassParams)
- func (h *APIHandler) ImportDataJSON(c *gin.Context)
- func (h *APIHandler) ListAdminAuditLog(c *gin.Context, params generated.ListAdminAuditLogParams)
- func (h *APIHandler) ListAdminUsers(c *gin.Context, params generated.ListAdminUsersParams)
- func (h *APIHandler) ListAircraft(c *gin.Context, params generated.ListAircraftParams)
- func (h *APIHandler) ListBackupDestinations(c *gin.Context)
- func (h *APIHandler) ListBackupProviders(c *gin.Context)
- func (h *APIHandler) ListBackupRuns(c *gin.Context, destinationID generated.BackupDestinationId, ...)
- func (h *APIHandler) ListClassRatings(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) ListContacts(c *gin.Context, params generated.ListContactsParams)
- func (h *APIHandler) ListCredentialFiles(c *gin.Context, credentialId generated.CredentialId)
- func (h *APIHandler) ListCredentials(c *gin.Context, params generated.ListCredentialsParams)
- func (h *APIHandler) ListDeletions(c *gin.Context, params generated.ListDeletionsParams)
- func (h *APIHandler) ListEmailDeliveries(c *gin.Context, params generated.ListEmailDeliveriesParams)
- func (h *APIHandler) ListEmailSuppressions(c *gin.Context, params generated.ListEmailSuppressionsParams)
- func (h *APIHandler) ListFlightSignatures(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) ListFlights(c *gin.Context, params generated.ListFlightsParams)
- func (h *APIHandler) ListImports(c *gin.Context, params generated.ListImportsParams)
- func (h *APIHandler) ListLicenseFiles(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) ListLicenses(c *gin.Context, params generated.ListLicensesParams)
- func (h *APIHandler) ListWebauthnCredentials(c *gin.Context)
- func (h *APIHandler) Login2FA(c *gin.Context)
- func (h *APIHandler) LoginUser(c *gin.Context)
- func (h *APIHandler) LogoutUser(c *gin.Context)
- func (h *APIHandler) OIDCAuthorize(c *gin.Context)
- func (h *APIHandler) OIDCCallback(c *gin.Context)
- func (h *APIHandler) OIDCEnabled() bool
- func (h *APIHandler) PreviewImport(c *gin.Context)
- func (h *APIHandler) PutMyBaseline(c *gin.Context)
- func (h *APIHandler) RecalculateFlights(c *gin.Context)
- func (h *APIHandler) RecordFlightSessionEvent(c *gin.Context)
- func (h *APIHandler) RefreshToken(c *gin.Context)
- func (h *APIHandler) RegisterUser(c *gin.Context)
- func (h *APIHandler) RequestPasswordReset(c *gin.Context)
- func (h *APIHandler) ResendSignatureRequest(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
- func (h *APIHandler) ResendVerificationEmail(c *gin.Context)
- func (h *APIHandler) ResetPassword(c *gin.Context)
- func (h *APIHandler) ResetUser2fa(c *gin.Context, userId openapi_types.UUID)
- func (h *APIHandler) RevokeSignatureRequest(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
- func (h *APIHandler) RunBackupNow(c *gin.Context, destinationID generated.BackupDestinationId)
- func (h *APIHandler) SearchAirports(c *gin.Context, params generated.SearchAirportsParams)
- func (h *APIHandler) SearchContacts(c *gin.Context, params generated.SearchContactsParams)
- func (h *APIHandler) SetAdminRepository(repo repository.AdminRepository)
- func (h *APIHandler) SetAnnouncementRepository(repo repository.AnnouncementRepository)
- func (h *APIHandler) SetBackupService(s *cloudbackup.Service)
- func (h *APIHandler) SetCORSOrigins(origins []string)
- func (h *APIHandler) SetDeletionService(s *service.DeletionService)
- func (h *APIHandler) SetDocumentFileService(s *service.DocumentFileService)
- func (h *APIHandler) SetEmailDeliveryService(s *service.EmailDeliveryService)
- func (h *APIHandler) SetEmailSender(sender *email.Sender)
- func (h *APIHandler) SetFlightImportRepository(repo repository.FlightImportRepository)
- func (h *APIHandler) SetFlightSessionService(s *service.FlightSessionService)
- func (h *APIHandler) SetFlightSignatureService(s *service.FlightSignatureService)
- func (h *APIHandler) SetOIDCService(s *service.OIDCService)
- func (h *APIHandler) SetReportsRepository(repo repository.ReportsRepository)
- func (h *APIHandler) SetStartedAt(t time.Time)
- func (h *APIHandler) SetUnverifiedAccountService(s *service.UnverifiedAccountService)
- func (h *APIHandler) SetUserContentRepository(repo repository.UserContentRepository)
- func (h *APIHandler) Setup2FA(c *gin.Context)
- func (h *APIHandler) SignFlightLive(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) SmtpTest(c *gin.Context)
- func (h *APIHandler) TestBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
- func (h *APIHandler) TriggerNotifications(c *gin.Context)
- func (h *APIHandler) UnlockUser(c *gin.Context, userId openapi_types.UUID)
- func (h *APIHandler) UpdateAircraft(c *gin.Context, aircraftId generated.AircraftId)
- func (h *APIHandler) UpdateBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
- func (h *APIHandler) UpdateClassRating(c *gin.Context, licenseId generated.LicenseId, ratingId openapi_types.UUID)
- func (h *APIHandler) UpdateContact(c *gin.Context, contactId openapi_types.UUID)
- func (h *APIHandler) UpdateCredential(c *gin.Context, credentialId generated.CredentialId)
- func (h *APIHandler) UpdateCurrentUser(c *gin.Context)
- func (h *APIHandler) UpdateFlight(c *gin.Context, flightId generated.FlightId)
- func (h *APIHandler) UpdateLicense(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) UpdateNotificationPreferences(c *gin.Context)
- func (h *APIHandler) UploadCredentialFile(c *gin.Context, credentialId generated.CredentialId)
- func (h *APIHandler) UploadImportFile(c *gin.Context)
- func (h *APIHandler) UploadLicenseFile(c *gin.Context, licenseId generated.LicenseId)
- func (h *APIHandler) Verify2FA(c *gin.Context)
- func (h *APIHandler) VerifyEmail(c *gin.Context)
- func (h *APIHandler) VoidFlightSignature(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
- func (h *APIHandler) WebauthnLoginOptions(c *gin.Context)
- func (h *APIHandler) WebauthnLoginVerify(c *gin.Context)
- func (h *APIHandler) WebauthnRegisterOptions(c *gin.Context)
- func (h *APIHandler) WebauthnRegisterVerify(c *gin.Context)
- type AircraftBreakdown
- type CustomCurrencyHandler
- func (h *CustomCurrencyHandler) Create(c *gin.Context)
- func (h *CustomCurrencyHandler) Delete(c *gin.Context)
- func (h *CustomCurrencyHandler) DisableShare(c *gin.Context)
- func (h *CustomCurrencyHandler) EnableShare(c *gin.Context)
- func (h *CustomCurrencyHandler) Get(c *gin.Context)
- func (h *CustomCurrencyHandler) GetShared(c *gin.Context)
- func (h *CustomCurrencyHandler) Import(c *gin.Context)
- func (h *CustomCurrencyHandler) List(c *gin.Context)
- func (h *CustomCurrencyHandler) Preview(c *gin.Context)
- func (h *CustomCurrencyHandler) SetEnabled(c *gin.Context)
- func (h *CustomCurrencyHandler) SetNotify(c *gin.Context)
- func (h *CustomCurrencyHandler) Update(c *gin.Context)
- type MonthlyTrend
- type TrendsResponse
Constants ¶
const HeaderCrewEntriesRenamed = "X-Crew-Entries-Renamed"
HeaderCrewEntriesRenamed reports how many flight crew entries a contact rename rewrote. Must stay listed in the CORS ExposeHeaders in cmd/api/main.go.
Variables ¶
var ( // AuthLoginAttemptsTotal counts login attempts by result. AuthLoginAttemptsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "auth_login_attempts_total", Help: "Total number of login attempts.", }, []string{"result"}, ) // AuthTokenRefreshTotal counts token refresh attempts by result. AuthTokenRefreshTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "auth_token_refresh_total", Help: "Total number of token refresh attempts.", }, []string{"result"}, ) // Auth2FAAttemptsTotal counts 2FA verification attempts by result. Auth2FAAttemptsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "auth_2fa_attempts_total", Help: "Total number of 2FA verification attempts.", }, []string{"result"}, ) // OIDCLoginAttemptsTotal counts steps of the OIDC login flow by result. // Zero on deployments that do not use OIDC. OIDCLoginAttemptsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "auth_oidc_login_attempts_total", Help: "Total number of OIDC login flow steps by result.", }, []string{"result"}, ) )
Functions ¶
func FrontendBaseURL ¶ added in v1.3.2
func FrontendBaseURL() string
FrontendBaseURL resolves the canonical frontend origin used to build links embedded in outbound emails: FRONTEND_URL, then the first comma-separated CORS_ORIGIN entry, then localhost.
func RegisterCurrencyRoutes ¶
func RegisterCurrencyRoutes(api *gin.RouterGroup, h *APIHandler)
RegisterCurrencyRoutes registers the currency status endpoint
func RegisterCustomCurrencyRoutes ¶ added in v1.3.1
func RegisterCustomCurrencyRoutes(api *gin.RouterGroup, h *CustomCurrencyHandler)
RegisterCustomCurrencyRoutes wires the custom currency routes onto the group.
func RegisterFlightUtilRoutes ¶
func RegisterFlightUtilRoutes(api *gin.RouterGroup, h *APIHandler)
RegisterFlightUtilRoutes registers utility routes for flights
func RegisterOIDCRoutes ¶ added in v1.3.2
func RegisterOIDCRoutes(rg *gin.RouterGroup, h *APIHandler)
RegisterOIDCRoutes registers the two browser-facing OIDC endpoints, wired manually; the JSON endpoints of the flow (/auth/providers and /auth/oidc/exchange) come from the OpenAPI spec.
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
APIHandler implements the generated.ServerInterface from OpenAPI spec
func NewAPIHandler ¶
func NewAPIHandler( authService *service.AuthService, licenseService *service.LicenseService, flightService *service.FlightService, credentialService *service.CredentialService, aircraftService *service.AircraftService, notificationService *service.NotificationService, twoFactorService *service.TwoFactorService, contactService *service.ContactService, classRatingService *service.ClassRatingService, currencyService *currency.Service, webauthnService *service.WebAuthnService, jwtManager *jwt.Manager, flightCrewRepo repository.FlightCrewRepository, adminEmail string, ) *APIHandler
NewAPIHandler creates a new unified API handler that implements the OpenAPI ServerInterface
func (*APIHandler) AttachCrewMembers ¶ added in v1.2.4
func (h *APIHandler) AttachCrewMembers(ctx context.Context, flights []*models.Flight)
AttachCrewMembers is the exported wrapper used by the cloud-backup JSON builder so it can reuse the same crew enrichment pathway as the HTTP export handler.
func (*APIHandler) ChangePassword ¶
func (h *APIHandler) ChangePassword(c *gin.Context)
ChangePassword implements POST /auth/change-password (POST /auth/change-password)
func (*APIHandler) CleanupTokens ¶
func (h *APIHandler) CleanupTokens(c *gin.Context)
CleanupTokens implements POST /admin/maintenance/cleanup-tokens
func (*APIHandler) CleanupUnverifiedAccounts ¶ added in v1.3.2
func (h *APIHandler) CleanupUnverifiedAccounts(c *gin.Context)
CleanupUnverifiedAccounts implements POST /admin/maintenance/cleanup-unverified
func (*APIHandler) CompletePublicSignature ¶ added in v1.2.9
func (h *APIHandler) CompletePublicSignature(c *gin.Context, token generated.SignatureToken)
CompletePublicSignature implements POST /sign/{token}
func (*APIHandler) ConfirmImport ¶
func (h *APIHandler) ConfirmImport(c *gin.Context)
ConfirmImport implements POST /imports/confirm
func (*APIHandler) CreateAircraft ¶
func (h *APIHandler) CreateAircraft(c *gin.Context)
CreateAircraft implements POST /aircraft (POST /aircraft)
func (*APIHandler) CreateAnnouncement ¶
func (h *APIHandler) CreateAnnouncement(c *gin.Context)
CreateAnnouncement implements POST /admin/announcements
func (*APIHandler) CreateBackupDestination ¶ added in v1.2.4
func (h *APIHandler) CreateBackupDestination(c *gin.Context)
CreateBackupDestination wires up a new destination for the current user.
func (*APIHandler) CreateClassRating ¶
func (h *APIHandler) CreateClassRating(c *gin.Context, licenseId generated.LicenseId)
func (*APIHandler) CreateContact ¶
func (h *APIHandler) CreateContact(c *gin.Context)
CreateContact handles POST /contacts
func (*APIHandler) CreateCredential ¶
func (h *APIHandler) CreateCredential(c *gin.Context)
CreateCredential implements POST /credentials
func (*APIHandler) CreateFlight ¶
func (h *APIHandler) CreateFlight(c *gin.Context)
CreateFlight implements POST /flights (POST /flights)
func (*APIHandler) CreateLicense ¶
func (h *APIHandler) CreateLicense(c *gin.Context)
CreateLicense implements POST /licenses (POST /licenses)
func (*APIHandler) CreateSignatureRequest ¶ added in v1.2.9
func (h *APIHandler) CreateSignatureRequest(c *gin.Context, flightId generated.FlightId)
CreateSignatureRequest implements POST /flights/{flightId}/signatures
func (*APIHandler) DeleteAircraft ¶
func (h *APIHandler) DeleteAircraft(c *gin.Context, aircraftId generated.AircraftId)
DeleteAircraft implements DELETE /aircraft/{aircraftId} (DELETE /aircraft/{aircraftId})
func (*APIHandler) DeleteAllFlights ¶
func (h *APIHandler) DeleteAllFlights(c *gin.Context)
DeleteAllFlights implements DELETE /flights/delete-all
func (*APIHandler) DeleteAllUserData ¶
func (h *APIHandler) DeleteAllUserData(c *gin.Context)
DeleteAllUserData implements DELETE /users/me/data
func (*APIHandler) DeleteAnnouncement ¶
func (h *APIHandler) DeleteAnnouncement(c *gin.Context, announcementId openapi_types.UUID)
DeleteAnnouncement implements DELETE /admin/announcements/{announcementId}
func (*APIHandler) DeleteBackupDestination ¶ added in v1.2.4
func (h *APIHandler) DeleteBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
DeleteBackupDestination removes a destination.
func (*APIHandler) DeleteClassRating ¶
func (h *APIHandler) DeleteClassRating(c *gin.Context, licenseId generated.LicenseId, ratingId openapi_types.UUID)
func (*APIHandler) DeleteContact ¶
func (h *APIHandler) DeleteContact(c *gin.Context, contactId openapi_types.UUID)
DeleteContact handles DELETE /contacts/{contactId}
func (*APIHandler) DeleteCredential ¶
func (h *APIHandler) DeleteCredential(c *gin.Context, credentialId generated.CredentialId)
DeleteCredential implements DELETE /credentials/{credentialId}
func (*APIHandler) DeleteCredentialFile ¶ added in v1.3.2
func (h *APIHandler) DeleteCredentialFile(c *gin.Context, credentialId generated.CredentialId, fileId generated.DocumentFileId)
DeleteCredentialFile implements DELETE /credentials/{credentialId}/files/{fileId}
func (*APIHandler) DeleteCurrentUser ¶
func (h *APIHandler) DeleteCurrentUser(c *gin.Context)
DeleteCurrentUser implements DELETE /users/me (DELETE /users/me)
func (*APIHandler) DeleteEmailSuppression ¶ added in v1.3.2
func (h *APIHandler) DeleteEmailSuppression(c *gin.Context, email openapi_types.Email)
DeleteEmailSuppression implements DELETE /admin/email/suppressions/{email}
func (*APIHandler) DeleteFlight ¶
func (h *APIHandler) DeleteFlight(c *gin.Context, flightId generated.FlightId)
DeleteFlight implements DELETE /flights/{flightId} (DELETE /flights/{flightId})
func (*APIHandler) DeleteLicense ¶
func (h *APIHandler) DeleteLicense(c *gin.Context, licenseId generated.LicenseId)
DeleteLicense implements DELETE /licenses/{licenseId} (DELETE /licenses/{licenseId})
func (*APIHandler) DeleteLicenseFile ¶ added in v1.3.2
func (h *APIHandler) DeleteLicenseFile(c *gin.Context, licenseId generated.LicenseId, fileId generated.DocumentFileId)
DeleteLicenseFile implements DELETE /licenses/{licenseId}/files/{fileId}
func (*APIHandler) DeleteMyBaseline ¶ added in v1.2.3
func (h *APIHandler) DeleteMyBaseline(c *gin.Context)
DeleteMyBaseline implements DELETE /users/me/baseline.
func (*APIHandler) DeleteUser ¶ added in v1.2.3
func (h *APIHandler) DeleteUser(c *gin.Context, userId openapi_types.UUID)
DeleteUser implements DELETE /admin/users/{userId} Permanently deletes a user and all of their content via FK ON DELETE CASCADE.
func (*APIHandler) DeleteWebauthnCredential ¶ added in v1.2.0
func (h *APIHandler) DeleteWebauthnCredential(c *gin.Context, credentialId openapi_types.UUID)
DeleteWebauthnCredential implements DELETE /auth/webauthn/credentials/{credentialId}
func (*APIHandler) Disable2FA ¶
func (h *APIHandler) Disable2FA(c *gin.Context)
Disable2FA implements POST /auth/2fa/disable
func (*APIHandler) DisableUser ¶
func (h *APIHandler) DisableUser(c *gin.Context, userId openapi_types.UUID)
DisableUser implements POST /admin/users/{userId}/disable
func (*APIHandler) DiscardCurrentFlightSession ¶ added in v1.2.8
func (h *APIHandler) DiscardCurrentFlightSession(c *gin.Context)
DiscardCurrentFlightSession implements DELETE /flight-sessions/current (DELETE /flight-sessions/current)
func (*APIHandler) EnableUser ¶
func (h *APIHandler) EnableUser(c *gin.Context, userId openapi_types.UUID)
EnableUser implements POST /admin/users/{userId}/enable
func (*APIHandler) ExchangeOidcCode ¶ added in v1.3.2
func (h *APIHandler) ExchangeOidcCode(c *gin.Context)
ExchangeOidcCode implements POST /auth/oidc/exchange
func (*APIHandler) ExportContactsVCard ¶ added in v1.3.3
func (h *APIHandler) ExportContactsVCard(c *gin.Context)
ExportContactsVCard handles GET /exports/vcard
func (*APIHandler) ExportDataJSON ¶
func (h *APIHandler) ExportDataJSON(c *gin.Context)
ExportDataJSON implements GET /exports/json
func (*APIHandler) ExportFlightsCSV ¶
func (h *APIHandler) ExportFlightsCSV(c *gin.Context, params generated.ExportFlightsCSVParams)
ExportFlightsCSV implements GET /exports/csv
func (*APIHandler) ExportFlightsPDF ¶
func (h *APIHandler) ExportFlightsPDF(c *gin.Context, params generated.ExportFlightsPDFParams)
ExportFlightsPDF implements GET /exports/pdf
func (*APIHandler) GetAdminConfig ¶
func (h *APIHandler) GetAdminConfig(c *gin.Context)
GetAdminConfig implements GET /admin/config
func (*APIHandler) GetAdminStats ¶
func (h *APIHandler) GetAdminStats(c *gin.Context)
GetAdminStats implements GET /admin/stats
func (*APIHandler) GetAircraft ¶
func (h *APIHandler) GetAircraft(c *gin.Context, aircraftId generated.AircraftId)
GetAircraft implements GET /aircraft/{aircraftId} (GET /aircraft/{aircraftId})
func (*APIHandler) GetAircraftStats ¶ added in v1.3.1
func (h *APIHandler) GetAircraftStats(c *gin.Context)
GetAircraftStats implements GET /aircraft/stats (GET /aircraft/stats)
func (*APIHandler) GetAirport ¶
func (h *APIHandler) GetAirport(c *gin.Context, icaoCode string)
GetAirport implements GET /airports/{icaoCode}
func (*APIHandler) GetAirportStats ¶
func (h *APIHandler) GetAirportStats(c *gin.Context)
GetAirportStats implements GET /reports/airport-stats
func (*APIHandler) GetAllCurrencyStatus ¶
func (h *APIHandler) GetAllCurrencyStatus(c *gin.Context)
GetAllCurrencyStatus returns currency status for all class ratings across all licenses
func (*APIHandler) GetAnnouncements ¶
func (h *APIHandler) GetAnnouncements(c *gin.Context)
GetAnnouncements implements GET /announcements Returns active system announcements + auto-generated user hints
func (*APIHandler) GetAuthProviders ¶ added in v1.3.2
func (h *APIHandler) GetAuthProviders(c *gin.Context)
GetAuthProviders implements GET /auth/providers. Unauthenticated; exposes only which sign-in methods exist.
func (*APIHandler) GetBackupDestination ¶ added in v1.2.4
func (h *APIHandler) GetBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
GetBackupDestination returns one destination by ID.
func (*APIHandler) GetBackupRun ¶ added in v1.2.4
func (h *APIHandler) GetBackupRun(c *gin.Context, runID openapi_types.UUID)
GetBackupRun returns a single run scoped to the calling user.
func (*APIHandler) GetContact ¶
func (h *APIHandler) GetContact(c *gin.Context, contactId openapi_types.UUID)
GetContact handles GET /contacts/{contactId}
func (*APIHandler) GetCredential ¶
func (h *APIHandler) GetCredential(c *gin.Context, credentialId generated.CredentialId)
GetCredential implements GET /credentials/{credentialId}
func (*APIHandler) GetCredentialFile ¶ added in v1.3.2
func (h *APIHandler) GetCredentialFile(c *gin.Context, credentialId generated.CredentialId, fileId generated.DocumentFileId)
GetCredentialFile implements GET /credentials/{credentialId}/files/{fileId}
func (*APIHandler) GetCurrentFlightSession ¶ added in v1.2.8
func (h *APIHandler) GetCurrentFlightSession(c *gin.Context)
GetCurrentFlightSession implements GET /flight-sessions/current (GET /flight-sessions/current)
func (*APIHandler) GetCurrentUser ¶
func (h *APIHandler) GetCurrentUser(c *gin.Context)
GetCurrentUser implements GET /users/me (GET /users/me)
func (*APIHandler) GetFeatures ¶ added in v1.3.2
func (h *APIHandler) GetFeatures(c *gin.Context)
GetFeatures implements GET /features — the capability probe a client uses to decide whether to render the image UI at all.
func (*APIHandler) GetFlight ¶
func (h *APIHandler) GetFlight(c *gin.Context, flightId generated.FlightId)
GetFlight implements GET /flights/{flightId} (GET /flights/{flightId})
func (*APIHandler) GetFlightAnalytics ¶ added in v1.3.1
func (h *APIHandler) GetFlightAnalytics(c *gin.Context, params generated.GetFlightAnalyticsParams)
GetFlightAnalytics implements GET /reports/analytics
func (*APIHandler) GetFlightRoutes ¶
func (h *APIHandler) GetFlightRoutes(c *gin.Context)
GetFlightRoutes implements GET /reports/routes
func (*APIHandler) GetFlightSignature ¶ added in v1.2.9
func (h *APIHandler) GetFlightSignature(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
GetFlightSignature implements GET /flights/{flightId}/signatures/{signatureId}
func (*APIHandler) GetFlightSignatureImage ¶ added in v1.2.9
func (h *APIHandler) GetFlightSignatureImage(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
GetFlightSignatureImage implements GET /flights/{flightId}/signatures/{signatureId}/image
func (*APIHandler) GetFlightTrends ¶
func (h *APIHandler) GetFlightTrends(c *gin.Context, params generated.GetFlightTrendsParams)
GetFlightTrends implements GET /reports/trends
func (*APIHandler) GetImport ¶
func (h *APIHandler) GetImport(c *gin.Context, importId generated.ImportId)
GetImport implements GET /imports/{importId}
func (*APIHandler) GetLicense ¶
func (h *APIHandler) GetLicense(c *gin.Context, licenseId generated.LicenseId)
GetLicense implements GET /licenses/{licenseId} (GET /licenses/{licenseId})
func (*APIHandler) GetLicenseCurrency ¶
func (h *APIHandler) GetLicenseCurrency(c *gin.Context, licenseId generated.LicenseId)
GetLicenseCurrency implements GET /licenses/{licenseId}/currency (GET /licenses/{licenseId}/currency)
func (*APIHandler) GetLicenseFile ¶ added in v1.3.2
func (h *APIHandler) GetLicenseFile(c *gin.Context, licenseId generated.LicenseId, fileId generated.DocumentFileId)
GetLicenseFile implements GET /licenses/{licenseId}/files/{fileId}
func (*APIHandler) GetLicenseStatistics ¶
func (h *APIHandler) GetLicenseStatistics(c *gin.Context, licenseId generated.LicenseId, params generated.GetLicenseStatisticsParams)
GetLicenseStatistics implements GET /licenses/{licenseId}/statistics (GET /licenses/{licenseId}/statistics)
func (*APIHandler) GetMyBaseline ¶ added in v1.2.3
func (h *APIHandler) GetMyBaseline(c *gin.Context)
GetMyBaseline implements GET /users/me/baseline.
func (*APIHandler) GetMyStatistics ¶
func (h *APIHandler) GetMyStatistics(c *gin.Context, params generated.GetMyStatisticsParams)
GetMyStatistics implements GET /users/me/statistics
func (*APIHandler) GetNotificationHistory ¶
func (h *APIHandler) GetNotificationHistory(c *gin.Context, params generated.GetNotificationHistoryParams)
GetNotificationHistory implements GET /users/me/notifications/history
func (*APIHandler) GetNotificationPreferences ¶
func (h *APIHandler) GetNotificationPreferences(c *gin.Context)
GetNotificationPreferences implements GET /users/me/notifications
func (*APIHandler) GetPublicSignatureInfo ¶ added in v1.2.9
func (h *APIHandler) GetPublicSignatureInfo(c *gin.Context, token generated.SignatureToken)
GetPublicSignatureInfo implements GET /sign/{token}
func (*APIHandler) GetStatsByClass ¶
func (h *APIHandler) GetStatsByClass(c *gin.Context, params generated.GetStatsByClassParams)
GetStatsByClass implements GET /reports/stats-by-class
func (*APIHandler) ImportDataJSON ¶ added in v1.2.3
func (h *APIHandler) ImportDataJSON(c *gin.Context)
ImportDataJSON implements POST /imports/json. It restores a NinerLog JSON backup (as produced by GET /exports/json) into the authenticated user's account. All entity IDs are regenerated so a backup can be restored into any installation, including the one it was exported from. The operation is additive: existing user data is never touched, and aircraft whose registration already exists for the user are skipped (their existing IDs are referenced by imported flights via aircraftReg, no remapping needed).
func (*APIHandler) ListAdminAuditLog ¶
func (h *APIHandler) ListAdminAuditLog(c *gin.Context, params generated.ListAdminAuditLogParams)
ListAdminAuditLog implements GET /admin/audit-log
func (*APIHandler) ListAdminUsers ¶
func (h *APIHandler) ListAdminUsers(c *gin.Context, params generated.ListAdminUsersParams)
ListAdminUsers implements GET /admin/users
func (*APIHandler) ListAircraft ¶
func (h *APIHandler) ListAircraft(c *gin.Context, params generated.ListAircraftParams)
ListAircraft implements GET /aircraft (GET /aircraft)
func (*APIHandler) ListBackupDestinations ¶ added in v1.2.4
func (h *APIHandler) ListBackupDestinations(c *gin.Context)
ListBackupDestinations returns the user's configured destinations.
func (*APIHandler) ListBackupProviders ¶ added in v1.2.4
func (h *APIHandler) ListBackupProviders(c *gin.Context)
ListBackupProviders returns the static catalog of registered providers.
func (*APIHandler) ListBackupRuns ¶ added in v1.2.4
func (h *APIHandler) ListBackupRuns(c *gin.Context, destinationID generated.BackupDestinationId, params generated.ListBackupRunsParams)
ListBackupRuns returns paginated audit log entries.
func (*APIHandler) ListClassRatings ¶
func (h *APIHandler) ListClassRatings(c *gin.Context, licenseId generated.LicenseId)
func (*APIHandler) ListContacts ¶
func (h *APIHandler) ListContacts(c *gin.Context, params generated.ListContactsParams)
ListContacts handles GET /contacts
func (*APIHandler) ListCredentialFiles ¶ added in v1.3.2
func (h *APIHandler) ListCredentialFiles(c *gin.Context, credentialId generated.CredentialId)
ListCredentialFiles implements GET /credentials/{credentialId}/files
func (*APIHandler) ListCredentials ¶
func (h *APIHandler) ListCredentials(c *gin.Context, params generated.ListCredentialsParams)
ListCredentials implements GET /credentials
func (*APIHandler) ListDeletions ¶ added in v1.3.2
func (h *APIHandler) ListDeletions(c *gin.Context, params generated.ListDeletionsParams)
ListDeletions implements GET /sync/deletions
func (*APIHandler) ListEmailDeliveries ¶ added in v1.3.2
func (h *APIHandler) ListEmailDeliveries(c *gin.Context, params generated.ListEmailDeliveriesParams)
ListEmailDeliveries implements GET /admin/email/deliveries
func (*APIHandler) ListEmailSuppressions ¶ added in v1.3.2
func (h *APIHandler) ListEmailSuppressions(c *gin.Context, params generated.ListEmailSuppressionsParams)
ListEmailSuppressions implements GET /admin/email/suppressions
func (*APIHandler) ListFlightSignatures ¶ added in v1.2.9
func (h *APIHandler) ListFlightSignatures(c *gin.Context, flightId generated.FlightId)
ListFlightSignatures implements GET /flights/{flightId}/signatures
func (*APIHandler) ListFlights ¶
func (h *APIHandler) ListFlights(c *gin.Context, params generated.ListFlightsParams)
ListFlights implements GET /flights (GET /flights)
func (*APIHandler) ListImports ¶
func (h *APIHandler) ListImports(c *gin.Context, params generated.ListImportsParams)
ListImports implements GET /imports
func (*APIHandler) ListLicenseFiles ¶ added in v1.3.2
func (h *APIHandler) ListLicenseFiles(c *gin.Context, licenseId generated.LicenseId)
ListLicenseFiles implements GET /licenses/{licenseId}/files
func (*APIHandler) ListLicenses ¶
func (h *APIHandler) ListLicenses(c *gin.Context, params generated.ListLicensesParams)
ListLicenses implements GET /licenses (GET /licenses)
func (*APIHandler) ListWebauthnCredentials ¶ added in v1.2.0
func (h *APIHandler) ListWebauthnCredentials(c *gin.Context)
ListWebauthnCredentials implements GET /auth/webauthn/credentials
func (*APIHandler) Login2FA ¶
func (h *APIHandler) Login2FA(c *gin.Context)
Login2FA implements POST /auth/2fa/login
func (*APIHandler) LoginUser ¶
func (h *APIHandler) LoginUser(c *gin.Context)
LoginUser implements POST /auth/login (POST /auth/login)
func (*APIHandler) LogoutUser ¶ added in v1.3.1
func (h *APIHandler) LogoutUser(c *gin.Context)
LogoutUser implements POST /auth/logout. It revokes the presented refresh token server-side and always answers 204; revocation is idempotent.
func (*APIHandler) OIDCAuthorize ¶ added in v1.3.2
func (h *APIHandler) OIDCAuthorize(c *gin.Context)
OIDCAuthorize implements GET /auth/oidc/authorize.
Starts a login: mints the state, nonce and PKCE verifier, plants the browser-binding cookie, and redirects to the provider.
func (*APIHandler) OIDCCallback ¶ added in v1.3.2
func (h *APIHandler) OIDCCallback(c *gin.Context)
OIDCCallback implements GET /auth/oidc/callback.
The provider sends the browser here. Every failure ends in a redirect back to the frontend carrying a short error code, not a JSON error page.
func (*APIHandler) OIDCEnabled ¶ added in v1.3.2
func (h *APIHandler) OIDCEnabled() bool
OIDCEnabled reports whether the server runs in OIDC mode.
func (*APIHandler) PreviewImport ¶
func (h *APIHandler) PreviewImport(c *gin.Context)
PreviewImport implements POST /imports/preview
func (*APIHandler) PutMyBaseline ¶ added in v1.2.3
func (h *APIHandler) PutMyBaseline(c *gin.Context)
PutMyBaseline implements PUT /users/me/baseline.
func (*APIHandler) RecalculateFlights ¶
func (h *APIHandler) RecalculateFlights(c *gin.Context)
RecalculateFlights recalculates all auto-computed fields for every flight
func (*APIHandler) RecordFlightSessionEvent ¶ added in v1.2.8
func (h *APIHandler) RecordFlightSessionEvent(c *gin.Context)
RecordFlightSessionEvent implements POST /flight-sessions/current/events (POST /flight-sessions/current/events)
func (*APIHandler) RefreshToken ¶
func (h *APIHandler) RefreshToken(c *gin.Context)
RefreshToken implements POST /auth/refresh (POST /auth/refresh)
func (*APIHandler) RegisterUser ¶
func (h *APIHandler) RegisterUser(c *gin.Context)
RegisterUser implements POST /auth/register (POST /auth/register)
func (*APIHandler) RequestPasswordReset ¶ added in v1.1.0
func (h *APIHandler) RequestPasswordReset(c *gin.Context)
RequestPasswordReset implements POST /auth/password-reset-request (POST /auth/password-reset-request)
func (*APIHandler) ResendSignatureRequest ¶ added in v1.2.9
func (h *APIHandler) ResendSignatureRequest(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
ResendSignatureRequest implements POST /flights/{flightId}/signatures/{signatureId}/resend
func (*APIHandler) ResendVerificationEmail ¶ added in v1.2.5
func (h *APIHandler) ResendVerificationEmail(c *gin.Context)
ResendVerificationEmail implements POST /auth/verify-email/resend (POST /auth/verify-email/resend)
func (*APIHandler) ResetPassword ¶ added in v1.1.0
func (h *APIHandler) ResetPassword(c *gin.Context)
ResetPassword implements POST /auth/password-reset (POST /auth/password-reset)
A reset does not disable 2FA: an account with 2FA enabled must supply a TOTP or recovery code alongside the reset token. Either way the owner is told by mail that their password changed.
func (*APIHandler) ResetUser2fa ¶
func (h *APIHandler) ResetUser2fa(c *gin.Context, userId openapi_types.UUID)
ResetUser2fa implements POST /admin/users/{userId}/reset-2fa
func (*APIHandler) RevokeSignatureRequest ¶ added in v1.2.9
func (h *APIHandler) RevokeSignatureRequest(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
RevokeSignatureRequest implements POST /flights/{flightId}/signatures/{signatureId}/revoke
func (*APIHandler) RunBackupNow ¶ added in v1.2.4
func (h *APIHandler) RunBackupNow(c *gin.Context, destinationID generated.BackupDestinationId)
RunBackupNow starts a synchronous backup run.
func (*APIHandler) SearchAirports ¶
func (h *APIHandler) SearchAirports(c *gin.Context, params generated.SearchAirportsParams)
SearchAirports implements GET /airports/search
func (*APIHandler) SearchContacts ¶
func (h *APIHandler) SearchContacts(c *gin.Context, params generated.SearchContactsParams)
SearchContacts handles GET /contacts/search
func (*APIHandler) SetAdminRepository ¶ added in v1.3.4
func (h *APIHandler) SetAdminRepository(repo repository.AdminRepository)
SetAdminRepository stores the repository behind the admin console (stats, audit log, user listing, maintenance sweeps).
func (*APIHandler) SetAnnouncementRepository ¶ added in v1.3.4
func (h *APIHandler) SetAnnouncementRepository(repo repository.AnnouncementRepository)
SetAnnouncementRepository stores the system announcement repository.
func (*APIHandler) SetBackupService ¶ added in v1.2.4
func (h *APIHandler) SetBackupService(s *cloudbackup.Service)
SetBackupService stores the cloud backup service (optional — only set when BACKUP_CREDENTIALS_KEY is configured at startup).
func (*APIHandler) SetCORSOrigins ¶
func (h *APIHandler) SetCORSOrigins(origins []string)
SetCORSOrigins stores the configured CORS origins for the config endpoint
func (*APIHandler) SetDeletionService ¶ added in v1.3.2
func (h *APIHandler) SetDeletionService(s *service.DeletionService)
SetDeletionService stores the tombstone feed service.
func (*APIHandler) SetDocumentFileService ¶ added in v1.3.2
func (h *APIHandler) SetDocumentFileService(s *service.DocumentFileService)
SetDocumentFileService wires up the licence/credential image subsystem.
func (*APIHandler) SetEmailDeliveryService ¶ added in v1.3.2
func (h *APIHandler) SetEmailDeliveryService(s *service.EmailDeliveryService)
SetEmailDeliveryService stores the email delivery log service.
func (*APIHandler) SetEmailSender ¶
func (h *APIHandler) SetEmailSender(sender *email.Sender)
SetEmailSender stores the email sender for admin SMTP test
func (*APIHandler) SetFlightImportRepository ¶ added in v1.3.4
func (h *APIHandler) SetFlightImportRepository(repo repository.FlightImportRepository)
SetFlightImportRepository stores the import-history repository.
func (*APIHandler) SetFlightSessionService ¶ added in v1.2.8
func (h *APIHandler) SetFlightSessionService(s *service.FlightSessionService)
SetFlightSessionService stores the tap-to-log flight session service
func (*APIHandler) SetFlightSignatureService ¶ added in v1.2.9
func (h *APIHandler) SetFlightSignatureService(s *service.FlightSignatureService)
SetFlightSignatureService stores the instructor sign-off service
func (*APIHandler) SetOIDCService ¶ added in v1.3.2
func (h *APIHandler) SetOIDCService(s *service.OIDCService)
SetOIDCService stores the OIDC service (optional — only set when OIDC_ISSUER is configured). A non-nil service also disables every local credential endpoint; see requireLocalAuth.
func (*APIHandler) SetReportsRepository ¶ added in v1.3.4
func (h *APIHandler) SetReportsRepository(repo repository.ReportsRepository)
SetReportsRepository stores the reports/analytics read repository.
func (*APIHandler) SetStartedAt ¶
func (h *APIHandler) SetStartedAt(t time.Time)
SetStartedAt records the server start time for uptime calculation
func (*APIHandler) SetUnverifiedAccountService ¶ added in v1.3.2
func (h *APIHandler) SetUnverifiedAccountService(s *service.UnverifiedAccountService)
SetUnverifiedAccountService stores the unverified-account reaper, so an administrator can run a sweep on demand.
func (*APIHandler) SetUserContentRepository ¶ added in v1.3.4
func (h *APIHandler) SetUserContentRepository(repo repository.UserContentRepository)
SetUserContentRepository stores the account-content wipe repository.
func (*APIHandler) Setup2FA ¶
func (h *APIHandler) Setup2FA(c *gin.Context)
Setup2FA implements POST /auth/2fa/setup
func (*APIHandler) SignFlightLive ¶ added in v1.2.9
func (h *APIHandler) SignFlightLive(c *gin.Context, flightId generated.FlightId)
SignFlightLive implements POST /flights/{flightId}/signatures/live
func (*APIHandler) SmtpTest ¶
func (h *APIHandler) SmtpTest(c *gin.Context)
SmtpTest implements POST /admin/maintenance/smtp-test
func (*APIHandler) TestBackupDestination ¶ added in v1.2.4
func (h *APIHandler) TestBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
TestBackupDestination re-runs the provider validation.
func (*APIHandler) TriggerNotifications ¶
func (h *APIHandler) TriggerNotifications(c *gin.Context)
TriggerNotifications implements POST /admin/maintenance/trigger-notifications
func (*APIHandler) UnlockUser ¶
func (h *APIHandler) UnlockUser(c *gin.Context, userId openapi_types.UUID)
UnlockUser implements POST /admin/users/{userId}/unlock
func (*APIHandler) UpdateAircraft ¶
func (h *APIHandler) UpdateAircraft(c *gin.Context, aircraftId generated.AircraftId)
UpdateAircraft implements PATCH /aircraft/{aircraftId} (PATCH /aircraft/{aircraftId})
func (*APIHandler) UpdateBackupDestination ¶ added in v1.2.4
func (h *APIHandler) UpdateBackupDestination(c *gin.Context, destinationID generated.BackupDestinationId)
UpdateBackupDestination applies a partial update.
func (*APIHandler) UpdateClassRating ¶
func (h *APIHandler) UpdateClassRating(c *gin.Context, licenseId generated.LicenseId, ratingId openapi_types.UUID)
func (*APIHandler) UpdateContact ¶
func (h *APIHandler) UpdateContact(c *gin.Context, contactId openapi_types.UUID)
UpdateContact handles PUT /contacts/{contactId}
func (*APIHandler) UpdateCredential ¶
func (h *APIHandler) UpdateCredential(c *gin.Context, credentialId generated.CredentialId)
UpdateCredential implements PATCH /credentials/{credentialId}
func (*APIHandler) UpdateCurrentUser ¶
func (h *APIHandler) UpdateCurrentUser(c *gin.Context)
UpdateCurrentUser implements PATCH /users/me (PATCH /users/me)
func (*APIHandler) UpdateFlight ¶
func (h *APIHandler) UpdateFlight(c *gin.Context, flightId generated.FlightId)
UpdateFlight implements PUT /flights/{flightId} (PUT /flights/{flightId})
func (*APIHandler) UpdateLicense ¶
func (h *APIHandler) UpdateLicense(c *gin.Context, licenseId generated.LicenseId)
UpdateLicense implements PATCH /licenses/{licenseId} (PATCH /licenses/{licenseId})
func (*APIHandler) UpdateNotificationPreferences ¶
func (h *APIHandler) UpdateNotificationPreferences(c *gin.Context)
UpdateNotificationPreferences implements PATCH /users/me/notifications
func (*APIHandler) UploadCredentialFile ¶ added in v1.3.2
func (h *APIHandler) UploadCredentialFile(c *gin.Context, credentialId generated.CredentialId)
UploadCredentialFile implements POST /credentials/{credentialId}/files
func (*APIHandler) UploadImportFile ¶
func (h *APIHandler) UploadImportFile(c *gin.Context)
UploadImportFile implements POST /imports/upload
func (*APIHandler) UploadLicenseFile ¶ added in v1.3.2
func (h *APIHandler) UploadLicenseFile(c *gin.Context, licenseId generated.LicenseId)
UploadLicenseFile implements POST /licenses/{licenseId}/files
func (*APIHandler) Verify2FA ¶
func (h *APIHandler) Verify2FA(c *gin.Context)
Verify2FA implements POST /auth/2fa/verify
func (*APIHandler) VerifyEmail ¶ added in v1.2.5
func (h *APIHandler) VerifyEmail(c *gin.Context)
VerifyEmail implements POST /auth/verify-email (POST /auth/verify-email)
func (*APIHandler) VoidFlightSignature ¶ added in v1.2.9
func (h *APIHandler) VoidFlightSignature(c *gin.Context, flightId generated.FlightId, signatureId generated.SignatureId)
VoidFlightSignature implements POST /flights/{flightId}/signatures/{signatureId}/void
func (*APIHandler) WebauthnLoginOptions ¶ added in v1.2.0
func (h *APIHandler) WebauthnLoginOptions(c *gin.Context)
WebauthnLoginOptions implements POST /auth/webauthn/login/options
func (*APIHandler) WebauthnLoginVerify ¶ added in v1.2.0
func (h *APIHandler) WebauthnLoginVerify(c *gin.Context)
WebauthnLoginVerify implements POST /auth/webauthn/login/verify
func (*APIHandler) WebauthnRegisterOptions ¶ added in v1.2.0
func (h *APIHandler) WebauthnRegisterOptions(c *gin.Context)
WebauthnRegisterOptions implements POST /auth/webauthn/register/options
func (*APIHandler) WebauthnRegisterVerify ¶ added in v1.2.0
func (h *APIHandler) WebauthnRegisterVerify(c *gin.Context)
WebauthnRegisterVerify implements POST /auth/webauthn/register/verify
type AircraftBreakdown ¶
type AircraftBreakdown struct {
AircraftType string `json:"aircraftType"`
TotalFlights int `json:"totalFlights"`
TotalMinutes int `json:"totalMinutes"`
}
AircraftBreakdown represents flight statistics per aircraft type
type CustomCurrencyHandler ¶ added in v1.3.1
type CustomCurrencyHandler struct {
// contains filtered or unexported fields
}
CustomCurrencyHandler serves the user-authored currency rule endpoints. It is self-contained (its own service + auth) and registered on the authenticated /api group, so every route already has a validated userID in context.
func NewCustomCurrencyHandler ¶ added in v1.3.1
func NewCustomCurrencyHandler(service *currency.CustomService) *CustomCurrencyHandler
NewCustomCurrencyHandler creates the handler.
func (*CustomCurrencyHandler) Create ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Create(c *gin.Context)
Create handles POST /custom-currency.
func (*CustomCurrencyHandler) Delete ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Delete(c *gin.Context)
Delete handles DELETE /custom-currency/:id.
func (*CustomCurrencyHandler) DisableShare ¶ added in v1.3.1
func (h *CustomCurrencyHandler) DisableShare(c *gin.Context)
DisableShare handles DELETE /custom-currency/:id/share.
func (*CustomCurrencyHandler) EnableShare ¶ added in v1.3.1
func (h *CustomCurrencyHandler) EnableShare(c *gin.Context)
EnableShare handles POST /custom-currency/:id/share.
func (*CustomCurrencyHandler) Get ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Get(c *gin.Context)
Get handles GET /custom-currency/:id.
func (*CustomCurrencyHandler) GetShared ¶ added in v1.3.1
func (h *CustomCurrencyHandler) GetShared(c *gin.Context)
GetShared handles GET /custom-currency/shared/:token — a read-only preview.
func (*CustomCurrencyHandler) Import ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Import(c *gin.Context)
Import handles POST /custom-currency/shared/:token/import.
func (*CustomCurrencyHandler) List ¶ added in v1.3.1
func (h *CustomCurrencyHandler) List(c *gin.Context)
List handles GET /custom-currency.
func (*CustomCurrencyHandler) Preview ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Preview(c *gin.Context)
Preview handles POST /custom-currency/preview.
func (*CustomCurrencyHandler) SetEnabled ¶ added in v1.3.1
func (h *CustomCurrencyHandler) SetEnabled(c *gin.Context)
SetEnabled handles PUT /custom-currency/:id/enabled — pause or resume a rule.
func (*CustomCurrencyHandler) SetNotify ¶ added in v1.3.1
func (h *CustomCurrencyHandler) SetNotify(c *gin.Context)
SetNotify handles PUT /custom-currency/:id/notify — opt a rule in/out of expiry notifications.
func (*CustomCurrencyHandler) Update ¶ added in v1.3.1
func (h *CustomCurrencyHandler) Update(c *gin.Context)
Update handles PUT /custom-currency/:id.
type MonthlyTrend ¶
type MonthlyTrend struct {
Month string `json:"month"`
TotalFlights int `json:"totalFlights"`
TotalMinutes int `json:"totalMinutes"`
PICMinutes int `json:"picMinutes"`
DualMinutes int `json:"dualMinutes"`
NightMinutes int `json:"nightMinutes"`
IFRMinutes int `json:"ifrMinutes"`
LandingsDay int `json:"landingsDay"`
LandingsNight int `json:"landingsNight"`
}
MonthlyTrend represents flight statistics for a single month
type TrendsResponse ¶
type TrendsResponse struct {
Monthly []MonthlyTrend `json:"monthly"`
ByAircraftType []AircraftBreakdown `json:"byAircraftType"`
}
TrendsResponse contains all reporting data
Source Files
¶
- admin.go
- admin_dashboard.go
- admin_email.go
- admin_users.go
- aircraft.go
- announcements.go
- api_handler.go
- auth.go
- auth_metrics.go
- backup.go
- baseline.go
- bulk_delete.go
- class_rating.go
- contact.go
- credential.go
- currency.go
- custom_currency.go
- document_file.go
- export.go
- export_crew.go
- export_pdf.go
- export_pdf_baseline.go
- export_pdf_easa.go
- export_pdf_faa.go
- export_vcard.go
- flight.go
- flight_session.go
- flight_util.go
- import.go
- import_json.go
- license.go
- maps.go
- notification.go
- nullable.go
- oidc.go
- public_signing.go
- reports.go
- reports_analytics.go
- signature.go
- sync.go
- twofactor.go
- updated_since.go
- urls.go
- user.go
- webauthn.go