repository

package
v0.0.0-...-901927a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Master = "master"

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(method, url string, secret git.Secret) (*http.Request, error)

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

type StructuredIdentifier struct {
	Owner  string
	Name   string
	Branch string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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