schema

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrCancelInput is a signal to break the interactive inputing process.
	ErrCancelInput = errors.New("cancel interactive inputing process")
)

Functions

This section is empty.

Types

type Parameter

type Parameter struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	Type        string `yaml:"type"`
	Key         string `yaml:"key"`
	Value       string `yaml:"value"`
	Default     string `yaml:"default"`
	Required    bool   `yaml:"required"`
}

Parameter is a field in the schema.

type Schema

type Schema struct {
	Parameters []Parameter `yaml:"parameters"`
}

Schema represents a input schema of a stack.

func New

func New() *Schema

New creates and returns a schema.

func (*Schema) Load

func (s *Schema) Load() error

Load loads the schema from src file. NOTE: Make sure you are already in the project dir.

func (*Schema) SetEnv

func (s *Schema) SetEnv(m map[string]interface{}, interactive bool) error

SetEnv sets up input values.

Jump to

Keyboard shortcuts

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