registerSettingsHooks (core/settings_model.go)

pocketbase · core/settings_model.go · go · MIT
email

Provides a Settings model with hooks to auto‑reload app settings and manage rate limits, SMTP, backups, and other config options.

// Source: https://github.com/pocketbase/pocketbase | License: MIT | Copyright 2022 - present, Gani Georgiev
// Provided via justclaw.it.com; keep this notice with the code.
package core

import (
	"context"
	"encoding/json/v2"
	"errors"
	"fmt"
	"os"
	"regexp"
	"slices"
	"strconv"
	"strings"
	"sync"
	"time"

	validation "github.com/pocketbase/ozzo-validation/v4"
	"github.com/pocketbase/ozzo-validation/v4/is"
	"github.com/pocketbase/pocketbase/core/validators"
	"github.com/pocketbase/pocketbase/tools/cron"
	"github.com/pocketbase/pocketbase/tools/hook"
	"github.com/pocketbase/pocketbase/tools/mailer"
	"github.com/pocketbase/pocketbase/tools/security"
	"github.com/pocketbase/pocketbase/tools/types"
)

const (
	paramsTable = "_params"

	paramsKeySettings = "settings"

	systemHookIdSettings = 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key