content

package
v1.9.17 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 15 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentFetcher

type ContentFetcher interface {
	StringFetcher
	URIFetcher
	GitDirFetcher
	GitFileFetcher

	Fetch(content *testkube.TestContent) (path string, err error)
	CalculateGitContentType(repo testkube.Repository) (string, error)
}

ContentFetcher is interface container for all possible fetchers

type CopyFilesPlacer added in v1.6.35

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

CopyFilesPlacer takes care of downloading the file into the execution

func NewCopyFilesPlacer added in v1.6.35

func NewCopyFilesPlacer(endpoint, accessKeyID, secretAccessKey, location, token, bucket string, ssl bool) *CopyFilesPlacer

NewCopyFilesPlaces creates a new

func (CopyFilesPlacer) PlaceFiles added in v1.6.35

func (p CopyFilesPlacer) PlaceFiles(testName, executionBucket string)

PlaceFiles downloads the files from minio and places them into the /data/uploads directory A warning will be shown in case there was an error placing the files.

type Fetcher

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

func NewFetcher

func NewFetcher(path string) Fetcher

NewFetcher returns new file/dir fetcher based on given directory path

func (Fetcher) CalculateGitContentType added in v1.9.14

func (f Fetcher) CalculateGitContentType(repo testkube.Repository) (string, error)

CalculateGitContentType returns the type of the git test source

func (Fetcher) Fetch

func (f Fetcher) Fetch(content *testkube.TestContent) (path string, err error)

func (Fetcher) FetchGitDir

func (f Fetcher) FetchGitDir(repo *testkube.Repository) (path string, err error)

FetchGitDir returns path to locally checked out git repo with partial path

func (Fetcher) FetchGitFile

func (f Fetcher) FetchGitFile(repo *testkube.Repository) (path string, err error)

FetchGitFile returns path to git based file saved in local temp directory

func (Fetcher) FetchString

func (f Fetcher) FetchString(str string) (path string, err error)

FetchString stores string content as file

func (Fetcher) FetchURI

func (f Fetcher) FetchURI(uri string) (path string, err error)

FetchURI stores uri as local file

type GitDirFetcher

type GitDirFetcher interface {
	FetchGitDir(repo *testkube.Repository) (path string, err error)
}

GitDirFetcher interface for fetching GitDir based content to local directory

type GitFileFetcher

type GitFileFetcher interface {
	FetchGitFile(repo *testkube.Repository) (path string, err error)
}

GitFileFetcher interface for fetching GitDir based content to local file

type StringFetcher

type StringFetcher interface {
	FetchString(str string) (path string, err error)
}

StringFetcher interface for fetching string based content to file

type URIFetcher

type URIFetcher interface {
	FetchURI(uri string) (path string, err error)
}

URIFetcher interface for fetching URI based content to file

Jump to

Keyboard shortcuts

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