github.com/kubeshop/testkube@v1.17.23/pkg/executor/content/interface.go (about)

     1  package content
     2  
     3  import "github.com/kubeshop/testkube/pkg/api/v1/testkube"
     4  
     5  // ContentFetcher is interface container for all possible fetchers
     6  type ContentFetcher interface {
     7  	StringFetcher
     8  	URIFetcher
     9  	GitDirFetcher
    10  	GitFileFetcher
    11  	GitFetcher
    12  
    13  	Fetch(content *testkube.TestContent) (path string, err error)
    14  	// Deprecated: use git instead
    15  	CalculateGitContentType(repo testkube.Repository) (string, error)
    16  }
    17  
    18  // StringFetcher interface for fetching string based content to file
    19  type StringFetcher interface {
    20  	FetchString(str string) (path string, err error)
    21  }
    22  
    23  // URIFetcher interface for fetching URI based content to file
    24  type URIFetcher interface {
    25  	FetchURI(uri string) (path string, err error)
    26  }
    27  
    28  // GitDirFetcher interface for fetching GitDir based content to local directory
    29  // Deprecated: use GitFetcher instead
    30  type GitDirFetcher interface {
    31  	FetchGitDir(repo *testkube.Repository) (path string, err error)
    32  }
    33  
    34  // GitFileFetcher interface for fetching GitDir based content to local file
    35  // Deprecated: use GitFetcher instead
    36  type GitFileFetcher interface {
    37  	FetchGitFile(repo *testkube.Repository) (path string, err error)
    38  }
    39  
    40  // GitFetcher interface for fetching GitFile or GitDir based content to local file
    41  type GitFetcher interface {
    42  	FetchGit(repo *testkube.Repository) (path string, err error)
    43  }