Documentation
¶
Index ¶
Constants ¶
View Source
const Master = "master"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileExistenceChecker ¶
type FileExistenceChecker interface { // GetListOfFoundFiles returns list of filenames present in the root directory GetListOfFoundFiles() []string // DetectFiles detects if any of the build tool files are present in the root directory DetectFiles(buildTool build.Tool) []string }
func NewCheckerUsingHeaderRequests ¶
func NewCheckerUsingHeaderRequests(log *log.GitSourceLogger, baseURL string, secret git.Secret) FileExistenceChecker
func NewCheckerWithFetchedFiles ¶
func NewCheckerWithFetchedFiles(filenames []string) FileExistenceChecker
type GitService ¶
type GitService interface { // FileExistenceChecker returns an instance of checker for existence of files in the root directory FileExistenceChecker() (FileExistenceChecker, error) // GetLanguageList returns list of detected languages in the sorted order where the first one is the most used GetLanguageList() ([]string, error) // CheckCredentials tries to get user information associated with the attached secret from the git server CheckCredentials() error // Tries to connect to the git repository with the attached secret CheckRepoAccessibility() error // Checks if the branch exists in the git repository CheckBranch() error }
func NewGitService ¶
func NewGitService(log *log.GitSourceLogger, gitSource *v1alpha1.GitSource, secret *git.SecretProvider, serviceCreators []ServiceCreator) (GitService, error)
NewGitService returns an instance of GitService for the given v1alpha1.GitSource. If no service is matched then returns nil
type ServiceCreator ¶
type ServiceCreator func(log *log.GitSourceLogger, gitSource *v1alpha1.GitSource, secret *git.SecretProvider) (GitService, error)
ServiceCreator creates an instance of GitService for the given v1alpha1.GitSource
type StructuredIdentifier ¶
StructuredIdentifier is an identifier of git repository that consist of a owner, name and branch
func NewStructuredIdentifier ¶
func NewStructuredIdentifier(gitSource *v1alpha1.GitSource, endpoint *gittransport.Endpoint) (StructuredIdentifier, error)
NewStructuredIdentifier returns an instance of the StructuredIdentifier for the given v1alpha1.GitSource
func (StructuredIdentifier) OwnerWithName ¶
func (i StructuredIdentifier) OwnerWithName() string
OwnerWithName joins owner and name by a slash
Click to show internal directories.
Click to hide internal directories.