Documentation
¶
Index ¶
- func LoadAuthContext(app core.App) func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
- func OnAuthFailed(app App) func(*core.RecordAuthRequestEvent) error
- func OnAuthRequest(app App) func(*core.RecordAuthRequestEvent) error
- func OnAuthWithPasswordRequest(app App) func(*core.RecordAuthWithPasswordRequestEvent) error
- func OnUserCreate(app App) func(*core.RecordEvent) error
- func OnUserUpdate(app App) func(*core.RecordEvent) error
- func RegisterAgentHooks(app core.App)
- func RegisterInvestigationHooks(app core.App)
- func RegisterPackageExceptionHooks(app core.App)
- func RegisterPatchHooks(app core.App)
- func RegisterProxmoxHooks(app core.App)
- func RequireAuth() func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
- func RequireAuthCollection(collectionName string) func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
- type App
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAuthContext ¶
func LoadAuthContext(app core.App) func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
LoadAuthContext returns a middleware that loads the auth record from the Authorization header
func OnAuthFailed ¶
func OnAuthFailed(app App) func(*core.RecordAuthRequestEvent) error
OnAuthFailed tracks failed auth attempts and locks account after 5 failures
func OnAuthRequest ¶
func OnAuthRequest(app App) func(*core.RecordAuthRequestEvent) error
OnAuthRequest checks account lockout before allowing auth
func OnAuthWithPasswordRequest ¶
func OnAuthWithPasswordRequest(app App) func(*core.RecordAuthWithPasswordRequestEvent) error
OnAuthWithPasswordRequest checks account lockout and tracks failures
func OnUserCreate ¶
func OnUserCreate(app App) func(*core.RecordEvent) error
OnUserCreate validates password when creating a new user
func OnUserUpdate ¶
func OnUserUpdate(app App) func(*core.RecordEvent) error
OnUserUpdate validates password and checks security constraints when updating user
func RegisterAgentHooks ¶
RegisterAgentHooks registers all agent-related functionality
func RegisterInvestigationHooks ¶
RegisterInvestigationHooks registers all investigation management endpoints
func RegisterPackageExceptionHooks ¶ added in v0.0.2
RegisterPackageExceptionHooks registers hooks for package_exceptions collection
func RegisterPatchHooks ¶
RegisterPatchHooks registers all patch management endpoints and hooks
func RegisterProxmoxHooks ¶ added in v0.0.2
RegisterProxmoxHooks registers the Proxmox related hooks and routes
func RequireAuth ¶
func RequireAuth() func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
RequireAuth returns a middleware that requires authentication
func RequireAuthCollection ¶ added in v0.0.2
func RequireAuthCollection(collectionName string) func(next func(*core.RequestEvent) error) func(*core.RequestEvent) error
RequireAuthCollection returns a middleware that requires authentication for a specific collection
Types ¶
type App ¶
type App interface {
FindCollectionByNameOrId(collectionNameOrId string) (*core.Collection, error)
FindRecordsByFilter(collection any, filter string, sort string, limit int, offset int, params ...dbx.Params) ([]*core.Record, error)
Save(record core.Model) error
}
App interface for PocketBase operations