Documentation
¶
Overview ¶
Package playground implements the interactive `ofga` TUI: a full-screen, Crush-style shell for exploring a store — picking models, browsing tuples, running live checks, and visualizing the authorization model as a graph. The model pane offers two views, toggled with `v`: the node-link diagram (types and relations) and the weighted graph (the fully-expanded resolution graph with per-terminal-type weights, in the style of model-visualizer). It is launched by the bare `ofga` command (there is no named subcommand).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunSeeded ¶ added in v0.266.0
RunSeeded launches the playground against an injected, already-built client (rather than one resolved from config), with any test results preloaded. When results are present it opens on the Test Results section; otherwise it opens on the default section. It writes config only when the user explicitly presses ctrl+g: that sets a global display preference rather than persisting anything about the ephemeral store/model this run was seeded with.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the task-pilot-style playground model.
type SeedOptions ¶ added in v0.266.0
type SeedOptions struct {
Client *openfga.Client
StoreID string
ModelID string
Results []modeltest.TestResult // may be empty (pure explore)
Endpoint string // for a boot notice
Workspace *modeltest.Workspace // parsed workspace behind this seed, for the workbench
}
SeedOptions configures RunSeeded: an SDK client already pointed at an ephemeral endpoint (e.g. `model test --playground`), the seeded store/model ids, optional test results to open on, and the endpoint string for a boot notice.