Documentation
¶
Overview ¶
Package sdl implements the transport-independent `akt sdl` command group: scaffold listing, SDL generation, and offline validation. Everything runs locally — no context, keyring, or RPC endpoint is required, so the group declares no capability requirements.
The scaffold shapes are ported from console-axi's sdl/templates (registry.ts, common.ts, web.ts, gpu.ts, multi-service.ts, ip-lease.ts).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Commands ¶
Commands returns the `akt sdl` command group. The group is transport- independent: scaffolding and validation run entirely locally, so no context, keyring, or RPC endpoint is required and no capability annotations are declared.
func ScaffoldNames ¶
func ScaffoldNames() []string
ScaffoldNames returns the registry names in order.
Types ¶
type Options ¶
type Options struct {
Name string
Image string
Port *int
As *int
CPU string
Memory string
Storage string
Count *int
Price *int // max price per block, in uact
Env []string
GPU *int
GPUModel string
}
Options are the generation parameters for `akt sdl init`. These are not positional-argument twins: every field is an optional knob with a per-scaffold default, so `akt sdl init <scaffold>` with no flags always produces a deployable SDL. Pointer fields distinguish "flag not set" from an explicit zero.
type Result ¶
Result is the outcome of validating one SDL document.
func Validate ¶
Validate parses an SDL document with pkg.akt.dev/go/sdl — the same parser and schema/relational validation used by `akt deploy` and the chain tx commands — then applies the local lint rules ported from console-axi (see lint.go). Parse failures and unpinned images are errors; on-chain pricing denoms are warnings. It never panics and collects every issue it can find.
type Scaffold ¶
type Scaffold struct {
Name string
Description string
// Params lists the flags that meaningfully affect this scaffold,
// shown by `akt sdl scaffolds`.
Params []string
// Build assembles the SDL document as a yaml.Node tree so that field
// order is stable and follows SDL conventions (version, services,
// profiles, deployment).
Build func(o Options) *yaml.Node
}
Scaffold is one built-in SDL shape `akt sdl init` can generate.