Deprecated: This method may get removed in the near future. It is recommended to access the logs db instance from app.LogsDao().DB() or if you want more flexibility - app.LogsDao().ConcurrentDB() and app.LogsDao().NonconcurrentDB().
LogsDB returns the app logs database instance.
OnAdminAfterAuthRefreshRequest hook is triggered after each successful auth refresh API request (right after generating a new auth token).
OnAdminAfterAuthWithPasswordRequest hook is triggered after each successful Admin auth with password API request.
OnAdminAfterConfirmPasswordResetRequest hook is triggered after each successful confirm password reset API request.
OnAdminAfterCreateRequest hook is triggered after each successful API Admin create request.
OnAdminAfterDeleteRequest hook is triggered after each successful API Admin delete request.
OnAdminAfterRequestPasswordResetRequest hook is triggered after each successful request password reset API request.
OnAdminAfterUpdateRequest hook is triggered after each successful API Admin update request.
OnAdminAuthRequest hook is triggered on each successful API Admin authentication request (sign-in, token refresh, etc.).
Could be used to additionally validate or modify the authenticated admin data and token.
OnAdminBeforeAuthRefreshRequest hook is triggered before each Admin auth refresh API request (right before generating a new auth token).
Could be used to additionally validate the request data or implement completely different auth refresh behavior.
OnAdminBeforeAuthWithPasswordRequest hook is triggered before each Admin auth with password API request (after request data load and before password validation).
Could be used to implement for example a custom password validation or to locate a different Admin identity (by assigning [AdminAuthWithPasswordEvent.Admin]).
OnAdminBeforeConfirmPasswordResetRequest hook is triggered before each Admin confirm password reset API request (after request data load and before persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnAdminBeforeCreateRequest hook is triggered before each API Admin create request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnAdminBeforeDeleteRequest hook is triggered before each API Admin delete request (after model load and before actual deletion).
Could be used to additionally validate the request data or implement completely different delete behavior.
OnAdminBeforeRequestPasswordResetRequest hook is triggered before each Admin request password reset API request (after request data load and before sending the reset email).
Could be used to additionally validate the request data or implement completely different password reset behavior.
OnAdminBeforeUpdateRequest hook is triggered before each API Admin update request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnAdminViewRequest hook is triggered on each API Admin view request.
Could be used to validate or modify the response before returning it to the client.
OnAdminsListRequest hook is triggered on each API Admins list request.
Could be used to validate or modify the response before returning it to the client.
OnAfterApiError hook is triggered right after sending an error API response to the client. It could be used to log the final API error in external services.
OnAfterBootstrap hook is triggered after initializing the main application resources (eg. after db open and initial settings load).
OnBeforeApiError hook is triggered right before sending an error API response to the client, allowing you to further modify the error data or to return a completely different API response.
OnBeforeBootstrap hook is triggered before initializing the main application resources (eg. before db open and initial settings load).
OnBeforeServe hook is triggered before serving the internal router (echo), allowing you to adjust its options and attach new routes or middlewares.
OnCollectionAfterCreateRequest hook is triggered after each successful API Collection create request.
OnCollectionAfterDeleteRequest hook is triggered after each successful API Collection delete request.
OnCollectionAfterUpdateRequest hook is triggered after each successful API Collection update request.
OnCollectionBeforeCreateRequest hook is triggered before each API Collection create request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnCollectionBeforeDeleteRequest hook is triggered before each API Collection delete request (after model load and before actual deletion).
Could be used to additionally validate the request data or implement completely different delete behavior.
OnCollectionBeforeUpdateRequest hook is triggered before each API Collection update request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnCollectionViewRequest hook is triggered on each API Collection view request.
Could be used to validate or modify the response before returning it to the client.
OnCollectionsAfterImportRequest hook is triggered after each successful API collections import request.
OnCollectionsBeforeImportRequest hook is triggered before each API collections import request (after request data load and before the actual import).
Could be used to additionally validate the imported collections or to implement completely different import behavior.
OnCollectionsListRequest hook is triggered on each API Collections list request.
Could be used to validate or modify the response before returning it to the client.
OnFileAfterTokenRequest hook is triggered after each successful file token API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnFileBeforeTokenRequest hook is triggered before each file token API request.
If no token or model was submitted, e.Model and e.Token will be empty, allowing you to implement your own custom model file auth implementation.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnFileDownloadRequest hook is triggered before each API File download request.
Could be used to validate or modify the file response before returning it to the client.
Rest
...tags: string[]OnMailerAfterAdminResetPasswordSend hook is triggered after admin password reset email was successfully sent.
OnMailerAfterRecordChangeEmailSend hook is triggered after a verification email was successfully sent to an auth record.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnMailerAfterRecordResetPasswordSend hook is triggered after an auth record password reset email was successfully sent.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnMailerAfterRecordVerificationSend hook is triggered after a verification email was successfully sent to an auth record.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnMailerBeforeAdminResetPasswordSend hook is triggered right before sending a password reset email to an admin, allowing you to inspect and customize the email message that is being sent.
OnMailerBeforeRecordChangeEmailSend hook is triggered right before sending a confirmation new address email to an auth record, allowing you to inspect and customize the email message that is being sent.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnMailerBeforeRecordResetPasswordSend hook is triggered right before sending a password reset email to an auth record, allowing you to inspect and customize the email message that is being sent.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnMailerBeforeRecordVerificationSend hook is triggered right before sending a verification email to an auth record, allowing you to inspect and customize the email message that is being sent.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelAfterCreate hook is triggered after successfully inserting a new model in the DB.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelAfterDelete hook is triggered after successfully deleting an existing model from the DB.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelAfterUpdate hook is triggered after successfully updating existing model in the DB.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelBeforeCreate hook is triggered before inserting a new model in the DB, allowing you to modify or validate the stored data.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelBeforeDelete hook is triggered before deleting an existing model from the DB.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnModelBeforeUpdate hook is triggered before updating existing model in the DB, allowing you to modify or validate the stored data.
If the optional "tags" list (table names and/or the Collection id for Record models) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRealtimeAfterMessageSend hook is triggered right after sending an SSE message to a client.
OnRealtimeAfterSubscribeRequest hook is triggered after the client subscriptions were successfully changed.
OnRealtimeBeforeMessageSend hook is triggered right before sending an SSE message to a client.
Returning [hook.StopPropagation] will prevent sending the message. Returning any other non-nil error will close the realtime connection.
OnRealtimeBeforeSubscribeRequest hook is triggered before changing the client subscriptions, allowing you to further validate and modify the submitted change.
OnRealtimeConnectRequest hook is triggered right before establishing the SSE client connection.
OnRealtimeDisconnectRequest hook is triggered on disconnected/interrupted SSE client connection.
OnRecordAfterAuthRefreshRequest hook is triggered after each successful auth refresh API request (right after generating a new auth token).
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterAuthWithOAuth2Request hook is triggered after each successful Record OAuth2 API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterAuthWithPasswordRequest hook is triggered after each successful Record auth with password API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterConfirmEmailChangeRequest hook is triggered after each successful confirm email change API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterConfirmPasswordResetRequest hook is triggered after each successful confirm password reset API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterConfirmVerificationRequest hook is triggered after each successful confirm verification API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterCreateRequest hook is triggered after each successful API Record create request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterDeleteRequest hook is triggered after each successful API Record delete request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterRequestEmailChangeRequest hook is triggered after each successful request email change API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterRequestPasswordResetRequest hook is triggered after each successful request password reset API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterRequestVerificationRequest hook is triggered after each successful request verification API request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterUnlinkExternalAuthRequest hook is triggered after each successful API record external auth unlink request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAfterUpdateRequest hook is triggered after each successful API Record update request.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordAuthRequest hook is triggered on each successful API record authentication request (sign-in, token refresh, etc.).
Could be used to additionally validate or modify the authenticated record data and token.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeAuthRefreshRequest hook is triggered before each Record auth refresh API request (right before generating a new auth token).
Could be used to additionally validate the request data or implement completely different auth refresh behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeAuthWithOAuth2Request hook is triggered before each Record OAuth2 sign-in/sign-up API request (after token exchange and before external provider linking).
If the [RecordAuthWithOAuth2Event.Record] is not set, then the OAuth2 request will try to create a new auth Record.
To assign or link a different existing record model you can change the [RecordAuthWithOAuth2Event.Record] field.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeAuthWithPasswordRequest hook is triggered before each Record auth with password API request (after request data load and before password validation).
Could be used to implement for example a custom password validation or to locate a different Record model (by reassigning [RecordAuthWithPasswordEvent.Record]).
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeConfirmEmailChangeRequest hook is triggered before each Record confirm email change API request (after request data load and before persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeConfirmPasswordResetRequest hook is triggered before each Record confirm password reset API request (after request data load and before persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeConfirmVerificationRequest hook is triggered before each Record confirm verification API request (after request data load and before persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeCreateRequest hook is triggered before each API Record create request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeDeleteRequest hook is triggered before each API Record delete request (after model load and before actual deletion).
Could be used to additionally validate the request data or implement completely different delete behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeRequestEmailChangeRequest hook is triggered before each Record request email change API request (after request data load and before sending the email link to confirm the change).
Could be used to additionally validate the request data or implement completely different request email change behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeRequestPasswordResetRequest hook is triggered before each Record request password reset API request (after request data load and before sending the reset email).
Could be used to additionally validate the request data or implement completely different password reset behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeRequestVerificationRequest hook is triggered before each Record request verification API request (after request data load and before sending the verification email).
Could be used to additionally validate the loaded request data or implement completely different verification behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeUnlinkExternalAuthRequest hook is triggered before each API record external auth unlink request (after models load and before the actual relation deletion).
Could be used to additionally validate the request data or implement completely different delete behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordBeforeUpdateRequest hook is triggered before each API Record update request (after request data load and before model persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordListExternalAuthsRequest hook is triggered on each API record external auths list request.
Could be used to validate or modify the response before returning it to the client.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordViewRequest hook is triggered on each API Record view request.
Could be used to validate or modify the response before returning it to the client.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnRecordsListRequest hook is triggered on each API Records list request.
Could be used to validate or modify the response before returning it to the client.
If the optional "tags" list (Collection ids or names) is specified, then all event handlers registered via the created hook will be triggered and called only if their event data origin matches the tags.
Rest
...tags: string[]OnSettingsAfterUpdateRequest hook is triggered after each successful API Settings update request.
OnSettingsBeforeUpdateRequest hook is triggered before each API Settings update request (after request data load and before settings persistence).
Could be used to additionally validate the request data or implement completely different persistence behavior.
OnSettingsListRequest hook is triggered on each successful API Settings list request.
Could be used to validate or modify the response before returning it to the client.
OnTerminate hook is triggered when the app is in the process of being terminated (eg. on SIGTERM signal).
RestoreBackup restores the backup with the specified name and restarts the current running application process.
The safely perform the restore it is recommended to have free disk space for at least 2x the size of the restored pb_data backup.
Please refer to the godoc of the specific CoreApp implementation for details on the restore procedures.
NB! This feature is experimental and currently is expected to work only on UNIX based systems.
Generated using TypeDoc
App defines the main PocketBase app interface.