sdks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sdk

type Sdk interface {
	Version() (string, error)
	Info() *SdkInfo
}

type SdkInfo

type SdkInfo struct {
	Name        string                   `json:"name"`
	Tools       []Tool                   `json:"tools"`
	BinPaths    []string                 `json:"binPaths"`
	Mirror      mirrors.Mirror           `json:"mirror"`
	WithEnvs    func(wp string) []string `json:"-"`
	PreRun      func(wp string) error    `json:"-"`
	PostInstall func(wp string) error    `json:"-"`
}

type SdkTool

type SdkTool struct {
	Sdk  Sdk
	Tool Tool
	Root string
}

func (*SdkTool) Info

func (s *SdkTool) Info() *SdkInfo

func (*SdkTool) Run

func (s *SdkTool) Run(ctx context.Context, args ...string) error

func (*SdkTool) VersionDesc added in v0.0.3

func (s *SdkTool) VersionDesc(ver string) (*mirrors.VersionDesc, error)

type Tool

type Tool struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

type UserIsolatedInstaller

type UserIsolatedInstaller struct {
	RootPath     string
	SdkStashPath string
	BinPath      string
	DataPath     string
	ConfigPath   string
	Sdks         []Sdk
}

func NewUserIsolatedInstaller

func NewUserIsolatedInstaller(home string, sdks []Sdk) *UserIsolatedInstaller

func (*UserIsolatedInstaller) GetSdk

func (i *UserIsolatedInstaller) GetSdk(name string) (Sdk, error)

func (*UserIsolatedInstaller) GetVersion added in v0.0.3

func (i *UserIsolatedInstaller) GetVersion(sdk Sdk) (string, error)

func (*UserIsolatedInstaller) Install

func (i *UserIsolatedInstaller) Install(name string) (*SdkTool, error)

func (*UserIsolatedInstaller) LatestVersion added in v0.0.3

func (i *UserIsolatedInstaller) LatestVersion(sdk Sdk) (*mirrors.VersionDesc, error)
func (i *UserIsolatedInstaller) Link(names ...string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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