structs

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package struct defines utilities for struct types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxFields

func MaxFields(object *cue.Struct, n int) (bool, error)

MaxFields validates the maximum number of fields that are part of a struct. It can only be used as a validator, for instance `MaxFields(3)`.

Only fields that are part of the data model count. This excludes hidden fields, optional fields, and definitions.

func MinFields

func MinFields(object *cue.Struct, n int) *adt.Bottom

MinFields validates the minimum number of fields that are part of a struct. It can only be used as a validator, for instance `MinFields(3)`.

Only fields that are part of the data model count. This excludes hidden fields, optional fields, and definitions.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL