utils

package
v0.0.0-...-543eb04 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppExistsInManifest

func AppExistsInManifest(appName string, manifest *models.Manifest) bool

func CopyFile

func CopyFile(sourceFileName, destFileName string) error

func CreateTarball

func CreateTarball(sourceFolder, tarballFilePath string) error

CreateTarball creates tarball out of sourceFolder and saves it to tarballFilePath

func DownloadFile

func DownloadFile(sourceUrl string) (string, error)

func GetFromUrl

func GetFromUrl(url string) ([]byte, error)

func HttpPost

func HttpPost(url string, headers map[string]string, body *strings.Reader) ([]byte, int, error)

HttpPost issues HTTP POST request to given url, returns Body, StatusCode, error

func IndexOfApp

func IndexOfApp(appName string, list []models.App) int

func IndexOfRemote

func IndexOfRemote(remoteName string, list []models.RemoteAddr) int

func NewPackageVersion

func NewPackageVersion(versionStr string) models.Version

func ReadConfig

func ReadConfig() (*models.AppConfig, error)

func ReadManifestFile

func ReadManifestFile(dir string) (models.Manifest, error)

func RemoveApp

func RemoveApp(appName string, list []models.App) ([]models.App, error)

func RemoveRemote

func RemoveRemote(remoteName string, list []models.RemoteAddr) ([]models.RemoteAddr, error)

func SaveConfig

func SaveConfig(config *models.AppConfig) error

func UnTar

func UnTar(dst string, r io.Reader) error

func WriteManifestFile

func WriteManifestFile(outDir string, manifest *models.Manifest) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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