cuetils

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPluginAndInjectProxy

func BuildPluginAndInjectProxy(decodedSchema []*Node, proxy http.Config) (common.Plugin, error)

Types

type Node

type Node struct {
	// The type of the current node. Can be a string, number, boolean, struct
	Type NodeType `json:"type" yaml:"type"`
	// The name of field. Anonymous field is not considered
	FieldName string `json:"field_name" yaml:"field_name"`
	// In case the type is a string or a number or a boolean, value will be set here.
	ConcreteValue string `json:"concrete_value" yaml:"concrete_value"`
	// In case the type is a struct, then it will contain an array of node.
	Nodes []*Node `json:"nodes" yaml:"nodes"`
}

func NewFromSchema

func NewFromSchema(v cue.Value) ([]*Node, error)

NewFromSchema is generating a tree representing the schema passed in parameter. Note: any optional field won't be represented in this tree.

type NodeType

type NodeType string
const (
	StringNodeType  NodeType = "string"
	BoolNodeType    NodeType = "bool"
	IntegerNodeType NodeType = "integer"
	FloatNodeType   NodeType = "float"
	StructNodeType  NodeType = "struct"
)

Jump to

Keyboard shortcuts

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