spring

package
v0.2.37 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OptionGroupID        = "group"
	OptionArtifactID     = "artifact"
	OptionLanguage       = "language"
	OptionJavaVersion    = "java-version"
	OptionBootVersion    = "boot-version"
	OptionPackaging      = "packaging"
	OptionDependency     = "dep"
	OptionDependencyKind = "kind"
	OptionType           = "type"
)

Variables

View Source
var DefaultDependencyKinds = []string{"Core", "Web", "Template Engines", "SQL", "I/O", "Ops", "Spring Cloud GCP", "Azure", "Cloud Contract", "Cloud AWS", "Cloud Messaging", "Cloud Tracing"}

Functions

func AddFormValue

func AddFormValue(form *url.Values, key, v string)

func AddFormValues

func AddFormValues(form *url.Values, key string, values []string)

func CreateTreeSelect added in v0.2.23

func CreateTreeSelect(message, name string, tree *TreeSelect, data *BootForm) *survey.Question

func CreateValueInput

func CreateValueInput(message, name string, value *Value, data *BootForm) *survey.Question

func CreateValueSelect

func CreateValueSelect(message, name string, options *Options, data *BootForm) *survey.Question

Types

type BootForm added in v0.2.23

type BootForm struct {
	Packaging       string
	Language        string
	JavaVersion     string
	BootVersion     string
	GroupID         string
	ArtifactID      string
	Version         string
	Name            string
	PackageName     string
	Dependencies    []string
	DependencyKinds []string
	Type            string
}

func (*BootForm) AddFormValues added in v0.2.23

func (data *BootForm) AddFormValues(form *url.Values)

func (*BootForm) CreateProject added in v0.2.23

func (data *BootForm) CreateProject(workDir string) (string, error)

type BootModel added in v0.2.23

type BootModel struct {
	Packaging    Options
	Language     Options
	JavaVersion  Options
	BootVersion  Options
	Type         Options
	GroupID      Value
	ArtifactID   Value
	Version      Value
	Name         Value
	Description  Value
	PackageName  Value
	Dependencies TreeSelect
}

func LoadSpringBoot

func LoadSpringBoot(cacheDir string) (*BootModel, error)

func (*BootModel) CreateSurvey added in v0.2.23

func (model *BootModel) CreateSurvey(data *BootForm, advanced, batchMode bool) error

func (*BootModel) ValidateInput added in v0.2.23

func (model *BootModel) ValidateInput(name string, o *Options, value string) error

func (*BootModel) ValidateTreeInput added in v0.2.23

func (model *BootModel) ValidateTreeInput(name string, o *TreeSelect, values []string) error

type Option added in v0.2.23

type Option struct {
	ID           string
	Name         string
	Description  string
	VersionRange string
}

type Options added in v0.2.23

type Options struct {
	Type    string
	Default string
	Values  []Option
}

func (*Options) StringArray added in v0.2.23

func (o *Options) StringArray() []string

type TreeGroup added in v0.2.23

type TreeGroup struct {
	Name   string
	Values []Option
}

type TreeSelect added in v0.2.23

type TreeSelect struct {
	Type   string
	Values []TreeGroup
}

func (*TreeSelect) StringArray added in v0.2.23

func (options *TreeSelect) StringArray() []string

type Value added in v0.2.23

type Value struct {
	Type    string
	Default string
}

Jump to

Keyboard shortcuts

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