sdk

package
v0.4.23 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive added in v0.4.22

type Archive struct {
	Sdk     Sdk
	Format  string
	SdkHome string
}

Archive represents downloaded compressed files in "archives" directory

func (Archive) Save added in v0.4.22

func (archive Archive) Save(r io.ReadCloser) error

Save saves bytes read from ReadCloser channel into archive file

type Sdk

type Sdk struct {
	Candidate string
	Version   string
	SdkHome   string
}

Sdk represents each version of sdk ex) Sdk{Candidate: "java", Version: "8.0.232-zulu"}

func CurrentSdk

func CurrentSdk(root string, candidate string) (Sdk, error)

CurrentSdk returns sdk of specified candidate which is linked with "current"

func CurrentSdks

func CurrentSdks(root string) []Sdk

CurrentSdks returns every Sdk that is linked via "current"

func DefaultSdk

func DefaultSdk(reg string, root string, candidate string) (Sdk, error)

func GetFromVersionString

func GetFromVersionString(registry string, sdkHome string, versionString string) (Sdk, error)

GetFromVersionString versionString format: e.g. "kotlin@1.7.0", "java@17.0.3-tem"

func InstalledSdks

func InstalledSdks(root string, candidate string) []Sdk

InstalledSdks returns every installed Sdk of specified candidate

func (Sdk) CheckValidVer

func (sdk Sdk) CheckValidVer(reg string) error

func (Sdk) Download added in v0.4.22

func (sdk Sdk) Download(registry string) error

func (Sdk) Install added in v0.4.22

func (sdk Sdk) Install(registry string) error

func (Sdk) IsArchived

func (sdk Sdk) IsArchived() bool

IsArchived returns if archive file of sdk exists or not

func (Sdk) IsInstalled

func (sdk Sdk) IsInstalled() bool

IsInstalled returns if sdk is installed or not

func (Sdk) ToString added in v0.4.22

func (sdk Sdk) ToString() string

func (Sdk) Unarchive

func (sdk Sdk) Unarchive() error

Unarchive extracts archive file of sdk into "candidates" directory

func (Sdk) Use

func (sdk Sdk) Use() error

Use links sdk with symlink named "current" so the sdk is used as default

Jump to

Keyboard shortcuts

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