F+Foldkit Plus
HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Guard

Guides

foldkit-guard

  • Overview
  • Attaching guards to an Entity
  • Serving reads
  • Serving writes
  • Checking a server at startup
  • Who is asking
  • What the client may do
  • Who the client is: Me
  • When a rule refuses
  • Sync
  • Agents
  • Uploads
  • Lower level: asking the Policy yourself
  • Limits

How Guard works

  • Overview
  • Write your first guard set
  • How a request is decided in two steps
  • What safety bugs Guard prevents
  • Real scenarios you can model today
  • How Guard, Expressions, and Laws act like a constraint solver
  • Where the boundary sits: authority vs. validity, and limits

API

  • foldkit-guard
  • foldkit-guard/server
  • foldkit-guard/drizzle
  • foldkit-guard/agent
  • foldkit-guard/sync
  • foldkit-guard/media
  • foldkit-guard/check

Open source, MIT
Foldkit 0.170 · Effect 4

Guard / foldkit-guard

Explain

interface · packages/guard/src/attach.ts:54

interface Explain {
  readonly _tag: 'Explain'
  readonly reason: string
}

A refused write's sentence, for the application's own users.

Members

Explain._tag#

property · packages/guard/src/attach.ts:55

readonly _tag: 'Explain'

Explain.reason#

property · packages/guard/src/attach.ts:56

readonly reason: string
Previousfoldkit-guard

On this page

  • _tag
  • reason

Edit on GitHub ↗

This site is a Foldkit Plus application, rendered at build time with foldkit-ssr. Its source

FoldkitEffectGitHub

Menu

HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Guard

Guides

foldkit-guard
  • Overview
  • Attaching guards to an Entity
  • Serving reads
  • Serving writes
  • Checking a server at startup
  • Who is asking
  • What the client may do
  • Who the client is: Me
  • When a rule refuses
  • Sync
  • Agents
  • Uploads
  • Lower level: asking the Policy yourself
  • Limits
How Guard works
  • Overview
  • Write your first guard set
  • How a request is decided in two steps
  • What safety bugs Guard prevents
  • Real scenarios you can model today
  • How Guard, Expressions, and Laws act like a constraint solver
  • Where the boundary sits: authority vs. validity, and limits

API

  • foldkit-guard
  • foldkit-guard/server
  • foldkit-guard/drizzle
  • foldkit-guard/agent
  • foldkit-guard/sync
  • foldkit-guard/media
  • foldkit-guard/check

Open source, MIT
Foldkit 0.170 · Effect 4