rls

package
v1.0.1139 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Config    []Scope `json:"config,omitempty"`
	Component []Scope `json:"component,omitempty"`
	Playbook  []Scope `json:"playbook,omitempty"`
	Canary    []Scope `json:"canary,omitempty"`
	View      []Scope `json:"view,omitempty"`

	// Scopes contains the list of scope UUIDs the user has access to.
	// This is used for generated view tables only (for now).
	Scopes []string `json:"scopes,omitempty"`

	Disable bool `json:"disable_rls,omitempty"`
	// contains filtered or unexported fields
}

RLS Payload that's injected postgresl parameter `request.jwt.claims`

func (*Payload) EvalFingerprint

func (t *Payload) EvalFingerprint()

func (*Payload) Fingerprint

func (t *Payload) Fingerprint() string

func (Payload) JWTClaims added in v1.0.1074

func (t Payload) JWTClaims() map[string]any

Get the JWT claims that'll be passed on to PostgREST

func (Payload) SetGlobalPostgresSessionRLS added in v1.0.819

func (t Payload) SetGlobalPostgresSessionRLS(db *gorm.DB) error

Injects the payload as sessions parameter

func (Payload) SetPostgresSessionRLS added in v1.0.819

func (t Payload) SetPostgresSessionRLS(db *gorm.DB) error

Injects the payload as local parameter

type Scope added in v1.0.1052

type Scope struct {
	Tags   map[string]string `json:"tags,omitempty"`
	Agents []string          `json:"agents,omitempty"`
	Names  []string          `json:"names,omitempty"`
	ID     string            `json:"id,omitempty"`
}

func (Scope) Fingerprint added in v1.0.1052

func (s Scope) Fingerprint() string

func (Scope) IsEmpty added in v1.0.1052

func (s Scope) IsEmpty() bool

Jump to

Keyboard shortcuts

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