handler

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package handler provides methods for accessing git repositories over SSH or HTTP(s)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitAuthConfig

type GitAuthConfig struct {
	PrivateSSHKey       string
	SkipHostKeyChecking bool
	Username            types.TrimmedString
	Password            types.TrimmedString
}

GitAuthConfig defines the attributes used to perform authentication over SSH or HTTP

type IGitHandler

type IGitHandler interface {
	GetAuthMethod(log log.T) (transport.AuthMethod, error)
	CloneRepository(log log.T, authMethod transport.AuthMethod, destPath string) (repository *gogit.Repository, err error)
	PerformCheckout(repository core.IGitRepository) error
	Validate() (bool, error)
}

IGitHandler defines methods to interact with git repositories

func NewGitHandler

func NewGitHandler(
	repository string,
	authConfig GitAuthConfig,
	options gitresource.CheckoutOptions,
	bridge ssmparameterresolver.ISsmParameterResolverBridge) (IGitHandler, error)

NewGitHandler creates a new git handler object

Directories

Path Synopsis
Package core contains wrapper structs for the git package resources
Package core contains wrapper structs for the git package resources
mock
Package mock defines the struct and its corresponding methods for mocking core.Repository
Package mock defines the struct and its corresponding methods for mocking core.Repository
Package mock defines the struct and its corresponding methods for mocking handler.IGitHandler
Package mock defines the struct and its corresponding methods for mocking handler.IGitHandler

Jump to

Keyboard shortcuts

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