sourceproviders

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCheckingOutBranch     = errors.New("err checking out branch")
	ErrCheckingOutRevision   = errors.New("err checking out revision")
	ErrCheckingOutRepository = errors.New("err checking out repository")
)

Functions

This section is empty.

Types

type GitSourceProvider

type GitSourceProvider struct {
	// The remote URL of the git repository
	Remote string
	// The directory to clone the git repository
	Directory string
	// The version of the git repository
	Version string
}

GitSourceProvider is the implementation of the SourceProvider interface

func GetGitSourceProvider

func GetGitSourceProvider(ctx context.Context, remote, directory, version string) (*GitSourceProvider, error)

GetGitSourceProvider returns a GitSourceProvider

func NewGitSourceProvider

func NewGitSourceProvider(remote, directory, version string) *GitSourceProvider

NewGitSourceProvider creates a new GitSourceProvider

func (*GitSourceProvider) Cleanup

func (g *GitSourceProvider) Cleanup(ctx context.Context)

Cleanup cleans up the resources of the provider

func (*GitSourceProvider) Get

func (g *GitSourceProvider) Get(ctx context.Context, opts ...entity.GetOption) (string, error)

Get clones the git repository and returns the directory

func (*GitSourceProvider) Type

Type returns the type of the source provider

Jump to

Keyboard shortcuts

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