schema

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 13 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")
)
View Source
var (
	// ErrNotExist means no input schema for interactive prompt.
	ErrNotExist = errors.New("no schema found in current satck")
)

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 {
	// Dir is the path to stack! Not schema directly.
	Dir        string
	Parameters []Parameter `yaml:"parameters"`
}

Schema represents a input schema of a stack.

func New

func New(dir string) *Schema

New creates and returns a schema.

func (*Schema) AutomaticEnv added in v0.2.0

func (s *Schema) AutomaticEnv(interactive bool) error

AutomaticEnv sets envs automatically.

func (*Schema) LoadSchema added in v0.3.6

func (s *Schema) LoadSchema() error

LoadSchema reads the schema

func (Schema) Show added in v0.3.6

func (s Schema) Show(o io.Writer)

Show displays the info of input shcema.

Jump to

Keyboard shortcuts

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