Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultAcceptHeader = "application/vnd.initializr.v2.2+json" DefaultUrl = "https://start.spring.io" )
Variables ¶
This section is empty.
Functions ¶
func GenerateProject ¶
GenerateProject sends a request to a Spring Initializr instance to create a project based on specified options.
Types ¶
type Metadata ¶
type Metadata struct { ArtifactId MetadataText `json:"artifactId"` BootVersion MetadataSelect `json:"bootVersion"` Dependencies MetadataMultiSelect `json:"dependencies"` Description MetadataText `json:"description"` GroupId MetadataText `json:"groupId"` JavaVersion MetadataSelect `json:"javaVersion"` Language MetadataSelect `json:"language"` Name MetadataText `json:"name"` PackageName MetadataText `json:"packageName"` Packaging MetadataSelect `json:"packaging"` Type MetadataSelect `json:"type"` Version MetadataText `json:"version"` }
Metadata is JSON metadata containing settings that can be used to create a new project from the Spring Initializr API.
func FetchMetadata ¶
FetchMetadata fetches JSON metadata containing settings that can be used to generate a project from the Spring Initializr API.
For reference: https://docs.spring.io/initializr/docs/current/reference/html/#api-guide
type MetadataHierarchy ¶
type MetadataHierarchy struct { Name string `json:"name"` Values []MetadataValue `json:"values"` }
type MetadataMultiSelect ¶
type MetadataMultiSelect struct { Type MetadataType `json:"type"` Values []MetadataHierarchy `json:"values"` }
type MetadataSelect ¶
type MetadataSelect struct { Type MetadataType `json:"type"` Default string `json:"default"` Values []MetadataValue `json:"values"` }
type MetadataText ¶
type MetadataText struct { Type MetadataType `json:"type"` Default string `json:"default"` }
type MetadataType ¶
type MetadataType string
type MetadataValue ¶
type Options ¶
type Options struct { ArtifactId string `json:"artifactId"` BootVersion string `json:"bootVersion"` Dependencies []string `json:"dependencies"` Description string `json:"description"` GroupId string `json:"groupId"` JavaVersion string `json:"javaVersion"` Language string `json:"language"` Name string `json:"name"` PackageName string `json:"packageName"` Packaging string `json:"packaging"` Type string `json:"type"` Version string `json:"version"` }
Options represents options for Spring Initializr project creation.
func NewDefaultOptions ¶
NewDefaultOptions creates options based on Spring Initializr metadata.
func ParseOptions ¶
ParseOptions parses options from a JSON file.
Click to show internal directories.
Click to hide internal directories.