git

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitImplementer

type GitImplementer struct{}

GitImplementer implements the GitOperator interface.

func (*GitImplementer) Clone

func (g *GitImplementer) Clone(repoUrl string, directory string, logger logr.Logger) (err error)

Clone clones the given repository to a local directory.

func (*GitImplementer) Hash

func (g *GitImplementer) Hash(repo string, branch string, logger logr.Logger) (hash string, err error)

Hash retrieves the hash of the given repository.

func (*GitImplementer) Poll

func (g *GitImplementer) Poll(repo string, branch string, directory string, logger logr.Logger) (changes bool, err error)

Poll polls for changes for the given remote git repository. Returns true, if current local commit hash and remote hash are not equal.

type GitOperator

type GitOperator interface {
	Clone(repoUrl string, dir string, logger logr.Logger) (err error)
	Poll(repo string, branch string, directory string, logger logr.Logger) (changes bool, err error)
	Hash(repo string, branch string, logger logr.Logger) (hash string, err error)
}

GitOperator defines the interface for git operations.

Jump to

Keyboard shortcuts

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