Documentation ¶
Index ¶
- Variables
- func CloneWithBackup(gitService portainer.GitService, fileService portainer.FileService, ...) (clean func(), err error)
- func GetCredentials(auth *gittypes.GitAuthentication) (string, string, error)
- func NewAzureClient() *azureClient
- func NewGitClient(preserveGitDir bool) *gitClient
- func ValidateRepoAuthentication(auth *gittypes.GitAuthentication) error
- func ValidateRepoConfig(repoConfig *gittypes.RepoConfig) error
- type CloneOptions
- type Service
- func (service *Service) CloneRepository(destination, repositoryURL, referenceName, username, password string, ...) error
- func (service *Service) LatestCommitID(repositoryURL, referenceName, username, password string, tlsSkipVerify bool) (string, error)
- func (service *Service) ListFiles(repositoryURL, referenceName, username, password string, ...) ([]string, error)
- func (service *Service) ListRefs(repositoryURL, username, password string, hardRefresh bool, tlsSkipVerify bool) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidGitCredential = errors.New("Invalid git credential")
)
Functions ¶
func CloneWithBackup ¶
func CloneWithBackup(gitService portainer.GitService, fileService portainer.FileService, options CloneOptions) (clean func(), err error)
func GetCredentials ¶
func GetCredentials(auth *gittypes.GitAuthentication) (string, string, error)
func NewAzureClient ¶
func NewAzureClient() *azureClient
func NewGitClient ¶
func NewGitClient(preserveGitDir bool) *gitClient
func ValidateRepoAuthentication ¶
func ValidateRepoAuthentication(auth *gittypes.GitAuthentication) error
func ValidateRepoConfig ¶
func ValidateRepoConfig(repoConfig *gittypes.RepoConfig) error
Types ¶
type CloneOptions ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service for managing Git.
func NewService ¶
NewService initializes a new service.
func (*Service) CloneRepository ¶
func (service *Service) CloneRepository(destination, repositoryURL, referenceName, username, password string, tlsSkipVerify bool) error
CloneRepository clones a git repository using the specified URL in the specified destination folder.
func (*Service) LatestCommitID ¶
func (service *Service) LatestCommitID(repositoryURL, referenceName, username, password string, tlsSkipVerify bool) (string, error)
LatestCommitID returns SHA1 of the latest commit of the specified reference
func (*Service) ListFiles ¶
func (service *Service) ListFiles(repositoryURL, referenceName, username, password string, dirOnly, hardRefresh bool, includedExts []string, tlsSkipVerify bool) ([]string, error)
ListFiles will list all the files of the target repository with specific extensions. If extension is not provided, it will list all the files under the target repository
Source Files ¶
Click to show internal directories.
Click to hide internal directories.