util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) bool

Types

type ArchType

type ArchType string
const (
	AMD64 ArchType = "amd64"
	ARM64 ArchType = "arm64"
)

func GetArchType

func GetArchType() ArchType

type Decompressor

type Decompressor interface {
	Decompress(dest string) error
}

func NewDecompressor

func NewDecompressor(src string) Decompressor

type Downloader

type Downloader struct {
	// URL is the URL to download the SDK from.
	LocalPath string `json:"local_path"`
}

func NewDownloader

func NewDownloader(localPath string) *Downloader

func (*Downloader) Download

func (d *Downloader) Download(url *url.URL) (string, error)

type GzipTarDecompressor

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

func (*GzipTarDecompressor) Decompress

func (g *GzipTarDecompressor) Decompress(dest string) error

type OSType

type OSType string
const (
	MacOS   OSType = "darwin"
	Windows OSType = "windows"
	Linux   OSType = "linux"
)

func GetOSType

func GetOSType() OSType

type XZTarDecompressor

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

func (*XZTarDecompressor) Decompress

func (g *XZTarDecompressor) Decompress(dest string) error

type ZipDecompressor

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

func (*ZipDecompressor) Decompress

func (z *ZipDecompressor) Decompress(dest string) error

Jump to

Keyboard shortcuts

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