handlers

package
v0.0.0-...-4a00286 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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 ArchiveHandler

type ArchiveHandler interface {
	Extract(archivePath string, outputPath string) error
}

type ArchiveHandlerFactory

type ArchiveHandlerFactory interface {
	GetHandler(filename string) (ArchiveHandler, error)
}

type ErrHandler

type ErrHandler struct{}

func NewErrHandler

func NewErrHandler() *ErrHandler

func (*ErrHandler) Extract

func (h *ErrHandler) Extract(archivePath string, outputPath string) error

type ExecPermissionHandler

type ExecPermissionHandler interface {
	SetPermission(filepath string) error
}

type GithubRealease

type GithubRealease struct {
	ID        int    `json:"id"`
	Url       string `json:"url"`
	AssetsUrl string `json:"assets_url"`
	TagName   string `json:"tag_name"`
}

type GithubReleaseAsset

type GithubReleaseAsset struct {
	ID                 int    `json:"id"`
	Url                string `json:"url"`
	Name               string `json:"name"`
	ContentType        string `json:"content_type"`
	Size               int    `json:"size"`
	BrowserDownloadUrl string `json:"browser_download_url"`
}

type GithubReleaseHandler

type GithubReleaseHandler struct {
	// contains filtered or unexported fields
}

func NewGitReleaseHandler

func NewGitReleaseHandler(logger loggers.Logger) *GithubReleaseHandler

func (*GithubReleaseHandler) DownloadAssetFromLatestVersion

func (g *GithubReleaseHandler) DownloadAssetFromLatestVersion(repo string, assetName string, filepath string) (GithubReleaseWithAsset, error)

func (*GithubReleaseHandler) LatestVersion

func (g *GithubReleaseHandler) LatestVersion(repo string) (GithubRealease, error)

func (*GithubReleaseHandler) LatestVersionWithAssets

func (g *GithubReleaseHandler) LatestVersionWithAssets(repo string) (GithubReleaseWithAssets, error)

type GithubReleaseWithAsset

type GithubReleaseWithAsset struct {
	GithubRealease
	Asset GithubReleaseAsset
}

type GithubReleaseWithAssets

type GithubReleaseWithAssets struct {
	GithubRealease
	Assets []GithubReleaseAsset
}

type InstallsListHandler

type InstallsListHandler interface {
	GetInstalls() (map[string](*string), error)
	SetVersion(id string, version *string) error
}

type JsonInstallsHandler

type JsonInstallsHandler struct {
	// contains filtered or unexported fields
}

func NewJsonInstallsHandler

func NewJsonInstallsHandler(runtimeConf runtime.Conf) *JsonInstallsHandler

func (*JsonInstallsHandler) GetInstalls

func (j *JsonInstallsHandler) GetInstalls() (map[string](*string), error)

func (*JsonInstallsHandler) SetVersion

func (j *JsonInstallsHandler) SetVersion(id string, version *string) error

type LinkHander

type LinkHander interface {
	CreateLink(source string, destination string) error
}

type NativeArchiveHandlerFactory

type NativeArchiveHandlerFactory struct{}

func NewNativeArchiveHandlerFactory

func NewNativeArchiveHandlerFactory() *NativeArchiveHandlerFactory

func (*NativeArchiveHandlerFactory) GetHandler

func (f *NativeArchiveHandlerFactory) GetHandler(filename string) (ArchiveHandler, error)

type NpmHandler

type NpmHandler struct {
	// contains filtered or unexported fields
}

func NewNpmHandler

func NewNpmHandler(logger loggers.Logger) *NpmHandler

func (*NpmHandler) GetLatestVersion

func (h *NpmHandler) GetLatestVersion(pkg string) (string, error)

func (*NpmHandler) Install

func (h *NpmHandler) Install(pkg string) error

func (*NpmHandler) Remove

func (h *NpmHandler) Remove(pkg string) error

func (*NpmHandler) Update

func (h *NpmHandler) Update(pkg string) error

type SymbolicLinkHandler

type SymbolicLinkHandler struct{}

func NewSymbolicLinkHandler

func NewSymbolicLinkHandler() *SymbolicLinkHandler
func (s *SymbolicLinkHandler) CreateLink(source string, destination string) error

type TarHandler

type TarHandler struct {
	// contains filtered or unexported fields
}

Tar handler

func NewTarHandler

func NewTarHandler(filename string) *TarHandler

func (*TarHandler) Extract

func (h *TarHandler) Extract(archivePath string, outputPath string) error

type UnixExecPermissionHandler

type UnixExecPermissionHandler struct{}

func NewUnixExecPermissionHandler

func NewUnixExecPermissionHandler() *UnixExecPermissionHandler

func (*UnixExecPermissionHandler) SetPermission

func (s *UnixExecPermissionHandler) SetPermission(filepath string) error

type ZipHandler

type ZipHandler struct{}

Zip handler

func NewZipHandler

func NewZipHandler() *ZipHandler

func (*ZipHandler) Extract

func (h *ZipHandler) Extract(archivePath string, outputPath string) error

Jump to

Keyboard shortcuts

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