Help us shape the future of Go! Take the 2026 Go Developer Survey

mind

package
v1.0.67-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mind validates the public mind-v1 input. Internal checkpoints and collaboration protocols remain owned by Solution, State and the mind model.

Index

Constants

View Source
const MaxNodeJSONBytes = 128 * 1024
View Source
const MaxSourceBytes = 2 * 1024 * 1024

Variables

This section is empty.

Functions

func ValidateCursor

func ValidateCursor(value string) error

func ValidateID

func ValidateID(value string) error

func ValidateName

func ValidateName(value string) error

Display names use Java String.length; OpenNodes page titles use code points.

func ValidateText

func ValidateText(value string) error

func ValidateVersion

func ValidateVersion(value string) error

Types

type Page

type Page struct {
	ID    string  `json:"id"`
	Title string  `json:"title"`
	Nodes []Topic `json:"nodes"`
}

type Source

type Source struct {
	SchemaVersion  string `json:"schemaVersion"`
	CatalogVersion string `json:"catalogVersion"`
	Pages          []Page `json:"pages"`
}

func ParseSource

func ParseSource(data []byte) (*Source, error)

type Topic

type Topic struct {
	ID       string `json:"id"`
	Type     string `json:"type"`
	Text     string `json:"text"`
	ParentID string `json:"parentId,omitempty"`
}

func ParseTopic

func ParseTopic(data []byte) (Topic, error)

Jump to

Keyboard shortcuts

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