spring

package
v0.0.0-...-46f2bb0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpringInitializrMetadataURL = "https://start.spring.io/metadata/client"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOption

type ConfigOption struct {
	Type    string        `json:"type"`
	Default string        `json:"default"`
	Values  []ConfigValue `json:"values"`
}

ConfigOption represents a configuration option with multiple values

type ConfigValue

type ConfigValue struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description,omitempty"`
	Action      string            `json:"action,omitempty"`
	Tags        map[string]string `json:"tags,omitempty"`
}

ConfigValue represents a single configuration value

type DependenciesConfig

type DependenciesConfig struct {
	Type   string            `json:"type"`
	Values []DependencyGroup `json:"values"`
}

DependenciesConfig represents the dependencies configuration

type DependencyDetail

type DependencyDetail struct {
	ID           string          `json:"id"`
	Name         string          `json:"name"`
	Description  string          `json:"description"`
	VersionRange *string         `json:"versionRange,omitempty"`
	Links        *map[string]any `json:"_links,omitempty"`
	Tag          string          `json:"-"`
	Selected     bool            `json:"-"`
}

DependencyDetail represents detailed information about a dependency

type DependencyGroup

type DependencyGroup struct {
	Name   string             `json:"name"`
	Values []DependencyDetail `json:"values"`
}

DependencyGroup represents a group of related dependencies

type DependencyGuide

type DependencyGuide struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}

type DependencyReference

type DependencyReference struct {
	Href      string `json:"href"`
	Templated bool   `json:"templated,omitempty"`
}

type IdNamePair

type IdNamePair struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}
type Link struct {
	Href      *string `json:"href,omitempty"`
	Title     *string `json:"title,omitempty"`
	Templated *bool   `json:"templated,omitempty"`
}

Link represents a single hypermedia link

type ProjectInitializr

type ProjectInitializr struct {
	Project           string
	Language          string
	SpringBootVersion string
	ProjectMetadata   ProjectMetadata
	Dependencies      []string
}

func (ProjectInitializr) Generate

func (pi ProjectInitializr) Generate() error

func (ProjectInitializr) URL

func (pi ProjectInitializr) URL() string

type ProjectMetadata

type ProjectMetadata struct {
	GroupID       string
	ArtifactID    string
	Name          string
	Description   string
	PackageName   string
	Packaging     string
	Configuration string
	JavaVersion   string
}

type SimpleConfigOption

type SimpleConfigOption struct {
	Type    string              `json:"type"`
	Default string              `json:"default"`
	Values  []SimpleConfigValue `json:"values"`
}

SimpleConfigOption represents a simple configuration option

type SimpleConfigValue

type SimpleConfigValue struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

SimpleConfigValue represents a simple configuration value

type SpringInitializrResponse

type SpringInitializrResponse struct {
	Links                   map[string]Link    `json:"_links"`
	Dependencies            DependenciesConfig `json:"dependencies"`
	Type                    SimpleConfigOption `json:"type"`
	Packaging               SimpleConfigOption `json:"packaging"`
	JavaVersion             SimpleConfigOption `json:"javaVersion"`
	Language                SimpleConfigOption `json:"language"`
	BootVersion             SimpleConfigOption `json:"bootVersion"`
	GroupID                 TextConfig         `json:"groupId"`
	ArtifactID              TextConfig         `json:"artifactId"`
	Version                 TextConfig         `json:"version"`
	Name                    TextConfig         `json:"name"`
	Description             TextConfig         `json:"description"`
	PackageName             TextConfig         `json:"packageName"`
	ConfigurationFileFormat SimpleConfigOption `json:"configurationFileFormat"`
}

func Run

func (*SpringInitializrResponse) FindDependencyByID

func (r *SpringInitializrResponse) FindDependencyByID(id string) *DependencyDetail

func (*SpringInitializrResponse) GetAllDependencies

func (r *SpringInitializrResponse) GetAllDependencies() []DependencyDetail

func (*SpringInitializrResponse) GetBootVersions

func (r *SpringInitializrResponse) GetBootVersions() []string

func (*SpringInitializrResponse) GetBuildTypes

func (r *SpringInitializrResponse) GetBuildTypes() []string

func (*SpringInitializrResponse) GetConfigurationFileFormat

func (r *SpringInitializrResponse) GetConfigurationFileFormat() []string

func (*SpringInitializrResponse) GetDependenciesByGroup

func (r *SpringInitializrResponse) GetDependenciesByGroup() map[string][]DependencyDetail

func (*SpringInitializrResponse) GetDependencyIDs

func (r *SpringInitializrResponse) GetDependencyIDs() []string

func (*SpringInitializrResponse) GetJavaVersions

func (r *SpringInitializrResponse) GetJavaVersions() []string

func (*SpringInitializrResponse) GetLanguages

func (r *SpringInitializrResponse) GetLanguages() []string

func (*SpringInitializrResponse) GetPackagingTypes

func (r *SpringInitializrResponse) GetPackagingTypes() []string

func (*SpringInitializrResponse) GetProjectTypes

func (r *SpringInitializrResponse) GetProjectTypes() []string

type TextConfig

type TextConfig struct {
	Type    string        `json:"type"`
	Default string        `json:"default"`
	Values  *[]IdNamePair `json:"values,omitempty"`
}

TextConfig represents a text input configuration

Jump to

Keyboard shortcuts

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