v0manifest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentInfo

type ComponentInfo struct {
	Name       string   `json:"name"`
	Desc       string   `json:"desc"`
	Standalone bool     `json:"standalone"`
	Hide       bool     `json:"hide"` // don't show in component list
	Platforms  []string `json:"platforms"`
}

ComponentInfo represents the information of component

func (*ComponentInfo) IsSupport

func (c *ComponentInfo) IsSupport(platform string) bool

IsSupport returns true if the component can be run in current OS and architecture

type ComponentManifest

type ComponentManifest struct {
	Description string          `json:"description"`
	Modified    string          `json:"modified"`
	TiUPVersion Version         `json:"tiup_version"`
	Components  []ComponentInfo `json:"components"`
}

ComponentManifest represents the all components information of tiup supported

func (*ComponentManifest) FindComponent

func (m *ComponentManifest) FindComponent(component string) (ComponentInfo, bool)

FindComponent find the component by name and returns component info and a bool to indicate whether it exists

func (*ComponentManifest) HasComponent

func (m *ComponentManifest) HasComponent(component string) bool

HasComponent checks whether the manifest contains the specific component

type Version

type Version string

Version represents a version string, like: v3.1.2

func (Version) IsEmpty

func (v Version) IsEmpty() bool

IsEmpty returns true if the `Version` is a empty string

func (Version) IsNightly

func (v Version) IsNightly() bool

IsNightly returns true if the version is nightly

func (Version) IsValid

func (v Version) IsValid() bool

IsValid checks whether is the version string valid

func (Version) String

func (v Version) String() string

String implements the fmt.Stringer interface

type VersionInfo

type VersionInfo struct {
	Version   Version  `json:"version"`
	Date      string   `json:"date"`
	Entry     string   `json:"entry"`
	Platforms []string `json:"platforms"`
}

VersionInfo represents the version information of component

func (*VersionInfo) IsSupport

func (c *VersionInfo) IsSupport(goos, goarch string) bool

IsSupport returns true if the specific version can be run in specified OS and architecture

type VersionManifest

type VersionManifest struct {
	Description string        `json:"description"`
	Modified    string        `json:"modified"`
	Nightly     *VersionInfo  `json:"nightly"`
	Versions    []VersionInfo `json:"versions"`
}

VersionManifest represents the all versions information of specific component

func (*VersionManifest) ContainsVersion

func (manifest *VersionManifest) ContainsVersion(version Version) bool

ContainsVersion returns if the versions contain the specific version

func (*VersionManifest) FindVersion

func (manifest *VersionManifest) FindVersion(version Version) (VersionInfo, bool)

FindVersion returns the specific version info

func (*VersionManifest) IterVersion

func (manifest *VersionManifest) IterVersion(fn func(versionInfo VersionInfo) error) error

IterVersion iterates all versions

func (*VersionManifest) LatestVersion

func (manifest *VersionManifest) LatestVersion() Version

LatestVersion returns the latest stable version

func (*VersionManifest) Sort

func (manifest *VersionManifest) Sort()

Sort sorts all versions

Jump to

Keyboard shortcuts

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