git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(ctx context.Context, importer *jobdef.Importer, opts WatchOptions) error

Watch performs an initial sync and optionally continues on an interval until ctx is cancelled.

Types

type BasicAuth

type BasicAuth struct {
	Username    string
	Password    string
	UsernameRef string
	PasswordRef string
}

BasicAuth holds optional credentials for HTTPS remotes.

type SSHAuth

type SSHAuth struct {
	Username        string
	UsernameRef     string
	PrivateKey      string
	PrivateKeyRef   string
	Passphrase      string
	PassphraseRef   string
	KnownHosts      string
	KnownHostsRef   string
	KnownHostsPath  string
	KnownHostsPaths []string
}

SSHAuth holds configuration for SSH-based authentication.

type Source

type Source struct {
	URL      string
	Ref      string
	Path     string
	Auth     *BasicAuth
	SSH      *SSHAuth
	Resolver secret.Resolver
	SourceID string
	Globs    []string
	LocalDir string
}

Source contains the parameters required to pull job definitions from Git.

func (*Source) Sync

func (s *Source) Sync(ctx context.Context, importer *jobdef.Importer) error

Sync clones/fetches the repository and applies manifests via the importer.

type WatchOptions

type WatchOptions struct {
	Source   Source
	Interval time.Duration
	Once     bool
}

WatchOptions configure a recurring sync loop.

Jump to

Keyboard shortcuts

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