document

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeAmbiguousName = "AMBIGUOUS_NAME"
	CodeNotFound      = "NOT_FOUND"
	CodeAmbiguousType = "AMBIGUOUS_TYPE"
)

Variables

This section is empty.

Functions

func ResolveField

func ResolveField(fields map[string]any, path string) (any, bool)

func SortedFieldKeys

func SortedFieldKeys(fields map[string]any) []string

Types

type Doc

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

func Build

func Build(blocks []parser.Block) *Doc

func (*Doc) FindBlocksByType

func (d *Doc) FindBlocksByType(typeName string) []parser.Block

func (*Doc) FindByFileID

func (d *Doc) FindByFileID(fileID int64) (parser.Block, bool)

func (*Doc) FindUniqueByName

func (d *Doc) FindUniqueByName(name string) (parser.Block, error)

func (*Doc) FindUniqueByType

func (d *Doc) FindUniqueByType(typeName string) (parser.Block, error)

type LookupError

type LookupError struct {
	Code  string
	Field string
	Value string
	Count int
}

func (*LookupError) Error

func (e *LookupError) Error() string

Jump to

Keyboard shortcuts

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