registry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocsBaseURL = "https://littleclusters.com"
)

Variables

This section is empty.

Functions

func GetAllChallenges

func GetAllChallenges() map[string]*Challenge

GetAllChallenges returns all registered challenges.

func RegisterChallenge

func RegisterChallenge(key string, challenge *Challenge)

RegisterChallenge registers a challenge in the global registry.

Types

type Challenge

type Challenge struct {
	Key        string
	Name       string
	Summary    string
	Stages     map[string]*Stage
	StageOrder []string
}

Challenge represents a coding challenge.

func GetChallenge

func GetChallenge(key string) (*Challenge, error)

GetChallenge retrieves a registered challenge by key.

func (*Challenge) AddStage

func (c *Challenge) AddStage(key, name string, fn StageFunc)

AddStage adds a new stage to the challenge.

func (*Challenge) GetStage

func (c *Challenge) GetStage(key string) (*Stage, error)

GetStage retrieves a stage by key.

func (*Challenge) Len

func (c *Challenge) Len() int

Len returns the number of stages in the challenge.

func (*Challenge) README

func (c *Challenge) README() string

README generates the README content for the challenge.

func (*Challenge) StageIndex

func (c *Challenge) StageIndex(key string) int

StageIndex returns the index of a stage in the order, or -1 if not found.

type Stage

type Stage struct {
	Name string
	Fn   StageFunc
}

Stage represents a single stage within a challenge.

type StageFunc

type StageFunc func() *attest.Suite

StageFunc is a function that returns a test suite for a stage.

Jump to

Keyboard shortcuts

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