Internal

internal/app/specsource

Package specsource loads exact Markdown source for agent-facing commands.

import "github.com/nilstate/scafld/v2/internal/app/specsource"

Package specsource loads exact Markdown source for agent-facing commands.

Variables

ErrUnavailable is returned when a spec store cannot provide source Markdown.

Source: internal/app/specsource/specsource.go:14

var ErrUnavailable = errors.New("spec source markdown unavailable")

Functions

func Load(ctx context.Context, store any, taskID string) (spec.Source, error)

Source: internal/app/specsource/specsource.go:23

Load returns the exact Markdown source for taskID.

Types

type Loader

Source: internal/app/specsource/specsource.go:18

Loader is implemented by stores that can return the parsed spec and its exact Markdown source in one operation.

type Loader interface {
	LoadSource(context.Context, string) (spec.Source, error)
}
Methods
  • LoadSource func(context.Context, string) (spec.Source, error)