Documentation ¶
Index ¶
Constants ¶
View Source
const (
OutputDevfileYamlPath = "devfile.yaml"
)
Default filenames for create devfile to be used in mocks
Variables ¶
View Source
var DevfilePossibilities = [...]string{"devfile.yaml", ".devfile.yaml", "devfile.yml", ".devfile.yml"}
Contains common naming conventions for devfiles to look for when downloading resources
Functions ¶
func ValidateDevfileExistence ¶
ValidateDevfileExistence verifies if any of the naming possibilities for devfile are present in the url path
Types ¶
type DevfileUtils ¶
type DevfileUtilsClient ¶
type DevfileUtilsClient struct { }
func NewDevfileUtilsClient ¶
func NewDevfileUtilsClient() DevfileUtilsClient
func (DevfileUtilsClient) DownloadGitRepoResources ¶
func (c DevfileUtilsClient) DownloadGitRepoResources(url string, destDir string, token string) error
DownloadGitRepoResources downloads the git repository resources
func (DevfileUtilsClient) DownloadInMemory ¶
func (c DevfileUtilsClient) DownloadInMemory(params util.HTTPRequestParams) ([]byte, error)
DownloadInMemory is a wrapper to the util.DownloadInMemory() call. This is done to help devfile/library clients invoke this function with a client.
type MockDevfileUtilsClient ¶
type MockDevfileUtilsClient struct { // Specify a valid git URL as an alias if using a localhost HTTP server in order to pass validation. ParentURLAlias string // MockGitUrl struct for mocking git related ops MockGitURL util.MockGitUrl // Mock Git token. Specify the string "valid-token" for the mock CloneGitRepo to pass GitTestToken string // Options to specify what file download needs to be mocked DownloadOptions util.MockDownloadOptions }
func NewMockDevfileUtilsClient ¶
func NewMockDevfileUtilsClient() MockDevfileUtilsClient
func (MockDevfileUtilsClient) DownloadGitRepoResources ¶
func (gc MockDevfileUtilsClient) DownloadGitRepoResources(url string, destDir string, token string) error
func (*MockDevfileUtilsClient) DownloadInMemory ¶
func (gc *MockDevfileUtilsClient) DownloadInMemory(params util.HTTPRequestParams) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.