util

package
v0.0.0-...-8019b93 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(clonePath, repoURL string) error

CloneRepo clones the repoURL to clonePath

func ConvertGitHubURL

func ConvertGitHubURL(URL string) (string, error)

ConvertGitHubURL converts a git url to its raw format adapted from https://github.com/redhat-developer/odo/blob/e63773cc156ade6174a533535cbaa0c79506ffdb/pkg/catalog/catalog.go#L72

func CurlEndpoint

func CurlEndpoint(endpoint string) ([]byte, error)

CurlEndpoint curls the endpoint and returns the response or an error if the response is a non-200 status

func DownloadDevfile

func DownloadDevfile(dir string) ([]byte, error)

DownloadDevfile downloads devfile from the various possible devfile locations in dir and returns the contents

func IsExist

func IsExist(path string) (bool, error)

IsExist returns whether the given file or directory exists

func ReadDevfilesFromRepo

func ReadDevfilesFromRepo(localpath string, depth int) (map[string][]byte, error)

ReadDevfilesFromRepo attempts to read and return devfiles from the local path upto the specified depth

func SanitizeName

func SanitizeName(name string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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