staticcmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildSiteCommand

type BuildSiteCommand struct {
	PageIDs        []uuid.UUID    `json:"page_ids,omitempty"`
	Locales        []string       `json:"locales,omitempty"`
	Force          bool           `json:"force,omitempty"`
	DryRun         bool           `json:"dry_run,omitempty"`
	AssetsOnly     bool           `json:"assets_only,omitempty"`
	ResultCallback ResultCallback `json:"-"`
}

BuildSiteCommand executes a generator build using the provided filters.

func (BuildSiteCommand) Type

func (BuildSiteCommand) Type() string

Type implements command.Message.

func (BuildSiteCommand) Validate

func (m BuildSiteCommand) Validate() error

Validate ensures locales are well-formed and page identifiers are valid UUIDs.

type BuildSiteHandler

type BuildSiteHandler struct {
	// contains filtered or unexported fields
}

BuildSiteHandler orchestrates generator builds using the shared command handler foundation.

func NewBuildSiteHandler

func NewBuildSiteHandler(service generator.Service, logger interfaces.Logger, gates FeatureGates, opts ...commands.HandlerOption[BuildSiteCommand]) *BuildSiteHandler

NewBuildSiteHandler constructs a handler wired to the provided generator service.

func (*BuildSiteHandler) Execute

func (h *BuildSiteHandler) Execute(ctx context.Context, msg BuildSiteCommand) error

Execute satisfies command.Commander[BuildSiteCommand].

type BuildSitemapCommand

type BuildSitemapCommand struct {
	ResultCallback ResultCallback `json:"-"`
}

BuildSitemapCommand regenerates sitemap artifacts without rebuilding pages.

func (BuildSitemapCommand) Type

func (BuildSitemapCommand) Type() string

Type implements command.Message.

func (BuildSitemapCommand) Validate

func (BuildSitemapCommand) Validate() error

Validate satisfies command.Message; the command carries no payload.

type BuildSitemapHandler

type BuildSitemapHandler struct {
	// contains filtered or unexported fields
}

BuildSitemapHandler regenerates sitemap artifacts via the generator service.

func NewBuildSitemapHandler

func NewBuildSitemapHandler(service generator.Service, logger interfaces.Logger, gates FeatureGates, opts ...commands.HandlerOption[BuildSitemapCommand]) *BuildSitemapHandler

NewBuildSitemapHandler constructs a handler that invokes generator sitemap builds.

func (*BuildSitemapHandler) Execute

Execute satisfies command.Commander[BuildSitemapCommand].

type CleanSiteCommand

type CleanSiteCommand struct{}

CleanSiteCommand clears generator artifacts from the configured storage backend.

func (CleanSiteCommand) Type

func (CleanSiteCommand) Type() string

Type implements command.Message.

func (CleanSiteCommand) Validate

func (CleanSiteCommand) Validate() error

Validate satisfies command.Message; there are no payload constraints.

type CleanSiteHandler

type CleanSiteHandler struct {
	// contains filtered or unexported fields
}

CleanSiteHandler clears generator artifacts.

func NewCleanSiteHandler

func NewCleanSiteHandler(service generator.Service, logger interfaces.Logger, gates FeatureGates, opts ...commands.HandlerOption[CleanSiteCommand]) *CleanSiteHandler

NewCleanSiteHandler constructs a handler that cleans generator output.

func (*CleanSiteHandler) Execute

func (h *CleanSiteHandler) Execute(ctx context.Context, msg CleanSiteCommand) error

Execute satisfies command.Commander[CleanSiteCommand].

type DiffSiteCommand

type DiffSiteCommand struct {
	PageIDs        []uuid.UUID    `json:"page_ids,omitempty"`
	Locales        []string       `json:"locales,omitempty"`
	Force          bool           `json:"force,omitempty"`
	ResultCallback ResultCallback `json:"-"`
}

DiffSiteCommand performs a dry-run build to surface differences without writing artifacts.

func (DiffSiteCommand) Type

func (DiffSiteCommand) Type() string

Type implements command.Message.

func (DiffSiteCommand) Validate

func (m DiffSiteCommand) Validate() error

Validate ensures locales and page identifiers are well-formed.

type DiffSiteHandler

type DiffSiteHandler struct {
	// contains filtered or unexported fields
}

DiffSiteHandler performs dry-run builds for diffing workflows.

func NewDiffSiteHandler

func NewDiffSiteHandler(service generator.Service, logger interfaces.Logger, gates FeatureGates, opts ...commands.HandlerOption[DiffSiteCommand]) *DiffSiteHandler

NewDiffSiteHandler constructs a handler that executes generator dry-runs.

func (*DiffSiteHandler) Execute

func (h *DiffSiteHandler) Execute(ctx context.Context, msg DiffSiteCommand) error

Execute satisfies command.Commander[DiffSiteCommand].

type FeatureGates

type FeatureGates struct {
	GeneratorEnabled func() bool
	SitemapEnabled   func() bool
}

FeatureGates exposes runtime switches used to guard handler execution.

type ResultCallback

type ResultCallback func(ResultEnvelope)

ResultCallback receives build results produced by generator operations. The callback is optional and is invoked synchronously from the handler when a BuildResult is available.

type ResultEnvelope

type ResultEnvelope struct {
	Result   *generator.BuildResult
	Metadata map[string]any
}

ResultEnvelope captures the outcome of a static command execution that generated a BuildResult.

Jump to

Keyboard shortcuts

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