action

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (string, error)

Types

type Actions

type Actions struct {
	Options  *Options
	Install  *Install
	Download *Download
	Config   *Config
	Symlink  *Symlink
	Use      *Use
	// contains filtered or unexported fields
}

func NewActions

func NewActions(opts ...Option) *Actions

type Config

type Config action

func (*Config) Load

func (c *Config) Load() (cfg *config2.Config, err error)

func (*Config) Save

func (c *Config) Save(cfg *config2.Config) (err error)

func (*Config) SetCurrentSdk

func (c *Config) SetCurrentSdk(sdk, version, path string) (err error)

type Download

type Download action

func (*Download) Download

func (i *Download) Download(ctx context.Context, sdk, version string) (archive afero.File, err error)

type Generate

type Generate action

type Install

type Install action

Install Provides the Install Action

func (*Install) Install

func (i *Install) Install(ctx context.Context, sdk, version string) (dir string, err error)

type Option

type Option func(options *Options) *Options

func WithFs

func WithFs(fs afero.Fs) Option

func WithLogger

func WithLogger(l logging.Log) Option

func WithPather

func WithPather(pather devctlpath.Pather) Option

func WithSdkmanClient

func WithSdkmanClient(client *sdkman.Client) Option

type Options

type Options struct {
	Fs     afero.Fs
	Pather devctlpath.Pather
	Client *sdkman.Client
	Logger logging.Log
}

Options contains the configuration options for Actions

type Symlink action

func (*Symlink) LinkCurrentSDK

func (s *Symlink) LinkCurrentSDK(sdk, version string) (current string, err error)

type Use

type Use action

func (Use) UseSDK

func (u Use) UseSDK(sdk, version string) (err error)

Jump to

Keyboard shortcuts

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