Help us shape the future of Go! Take the 2026 Go Developer Survey

pbutils

package
v1.321.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindOrganizationByNamespace

func FindOrganizationByNamespace(app core.App, namespace string) (*core.Record, error)

FindOrganizationByNamespace returns the organization whose canonified name is namespace, ignoring surrounding spaces. A missing or blank namespace returns an error wrapping sql.ErrNoRows.

func GetOrganizationCanonifiedName

func GetOrganizationCanonifiedName(app core.App, orgID string) (string, error)

func GetUserOrganization

func GetUserOrganization(app core.App, userID string) (*core.Record, error)

func GetUserOrganizationCanonifiedName

func GetUserOrganizationCanonifiedName(app core.App, userID string) (string, error)

func GetUserOrganizationID

func GetUserOrganizationID(app core.App, userID string) (string, error)

func LoadHiddenRequestFields

func LoadHiddenRequestFields(
	e *core.RecordRequestEvent,
	fieldNames ...string,
) (map[string]any, error)

LoadHiddenRequestFields loads the submitted values of the given hidden fields into the request record and returns them, keyed by field name.

PocketBase drops hidden fields from non-superuser create and update requests. Bind it to OnRecordCreateRequest or OnRecordUpdateRequest: those hooks run after the collection create or update rule has authorized the write, so the caller may set the fields it was already allowed to write. Superuser requests keep their hidden fields and return nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL