sdkman

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListCandidates() (candidates []string, resp *http.Response, err error)
	DownloadSDK(filepath, sdk, version string, arch aarch.Arch) (download *SDKDownload, resp *http.Response, err error)
}

Client provides the SDKMAN Api

func NewSdkManClient

func NewSdkManClient() Client

NewSdkManClient creates the default sdkman.Client

type DownloadService

type DownloadService service

DownloadService downloads SDKs to the filesystem

func (*DownloadService) DownloadSDK

func (s *DownloadService) DownloadSDK(ctx context.Context, filepath, sdk, version string, arch aarch.Arch) (*SDKDownload, *http.Response, error)

DownloadSDK downloads the sdk from the sdkman broker. SDK specifies the sdk Version specifies the version aarch specifies the aarch [darwinx64,darwin] https://api.sdkman.io/2/broker/download/scala/scala-2.13.4/darwinx64 https://api.sdkman.io/2/broker/download/scala/2.13.4/darwinx64 nolint: lll

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (response *http.Response, err error)
}

HTTPClient Sends http.Request returning http.Response or an error.Error

type HTTPDoFunc

type HTTPDoFunc func(req *http.Request) (*http.Response, error)

type ListAllSDKService

type ListAllSDKService service

func (*ListAllSDKService) ListAllSDK

func (s *ListAllSDKService) ListAllSDK(ctx context.Context) (candidates []string, resp *http.Response, err error)

CreateListAllAvailableSDKURI gets all available SDK and returns them as an array of strings https://api.sdkman.io/2/candidates/all

type SDKDownload

type SDKDownload struct {
	Path   string
	Reader io.Reader
}

type URI

type URI fmt.Stringer

Jump to

Keyboard shortcuts

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