spring

package
v1.3.243 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 12 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 string, v string)

func AddFormValues

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

func CreateSpringTreeSelect

func CreateSpringTreeSelect(message string, name string, tree *SpringTreeSelect, data *SpringBootForm) *survey.Question

func CreateValueInput

func CreateValueInput(message string, name string, value *SpringValue, data *SpringBootForm) *survey.Question

func CreateValueSelect

func CreateValueSelect(message string, name string, options *SpringOptions, data *SpringBootForm) *survey.Question

Types

type SpringBootForm

type SpringBootForm 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 (*SpringBootForm) AddFormValues

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

func (*SpringBootForm) CreateProject

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

type SpringBootModel

type SpringBootModel struct {
	Packaging    SpringOptions
	Language     SpringOptions
	JavaVersion  SpringOptions
	BootVersion  SpringOptions
	Type         SpringOptions
	GroupId      SpringValue
	ArtifactId   SpringValue
	Version      SpringValue
	Name         SpringValue
	Description  SpringValue
	PackageName  SpringValue
	Dependencies SpringTreeSelect
}

func LoadSpringBoot

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

func (*SpringBootModel) CreateSurvey

func (model *SpringBootModel) CreateSurvey(data *SpringBootForm, advanced bool, batchMode bool) error

func (*SpringBootModel) ValidateInput

func (model *SpringBootModel) ValidateInput(name string, options *SpringOptions, value string) error

func (*SpringBootModel) ValidateTreeInput

func (model *SpringBootModel) ValidateTreeInput(name string, options *SpringTreeSelect, values []string) error

type SpringOption

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

type SpringOptions

type SpringOptions struct {
	Type    string
	Default string
	Values  []SpringOption
}

func (*SpringOptions) StringArray

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

type SpringTreeGroup

type SpringTreeGroup struct {
	Name   string
	Values []SpringOption
}

type SpringTreeSelect

type SpringTreeSelect struct {
	Type   string
	Values []SpringTreeGroup
}

func (*SpringTreeSelect) StringArray

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

type SpringValue

type SpringValue struct {
	Type    string
	Default string
}

Jump to

Keyboard shortcuts

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