...

Package validate

import "cuelang.org/go/internal/core/validate"
Overview
Index

Overview ▾

Package validate collects errors from an evaluated Vertex.

func Validate

func Validate(ctx *adt.OpContext, v *adt.Vertex, cfg *Config) *adt.Bottom

Validate checks that a value has certain properties. The value must have been evaluated.

type Config

type Config struct {
    // Concrete, if true, requires that all values be concrete.
    Concrete bool

    // Final, if true, checks that there are no required fields left.
    Final bool

    // DisallowCycles indicates that there may not be cycles.
    DisallowCycles bool

    // AllErrors continues descending into a Vertex, even if errors are found.
    AllErrors bool
}