schema

package
v6.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema provides types used to define the plugin.ConnectionConfigSchema

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchemaToObjectSpec

func SchemaToObjectSpec(schema map[string]*Attribute) hcldec.ObjectSpec

Types

type Attribute

type Attribute struct {
	// name - this will be inferred by the schema map key
	Name string
	// Type is the type of the value and must be one of the ValueType values.
	//   TypeBool - bool
	//   TypeInt - int
	//   TypeFloat - float64
	//   TypeString - string
	//   TypeList - []interface{}
	Type ValueType

	// Elem represents the element type. This may only be set for only set for TypeList.
	Elem *Attribute

	// is this attribute required
	Required bool
}

type ValueType

type ValueType int

ValueType is an enum of the type that can be represented by a schema.

const (
	TypeInvalid ValueType = iota
	TypeBool
	TypeInt
	TypeFloat
	TypeString
	TypeList
)

Jump to

Keyboard shortcuts

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