git

package
v0.0.0-...-b7da0db Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(source providers.Source) (providers.Provider, error)

Factory creates Git providers from a source configuration

Types

type Auth

type Auth struct {
	Type           string // token, ssh, basic
	Token          string
	Username       string
	Password       string
	PrivateKey     []byte
	PrivateKeyPath string
}

Auth represents authentication details for Git

type GitProvider

type GitProvider struct {
	// contains filtered or unexported fields
}

GitProvider implements the Provider interface for Git repositories

func New

func New(name string, repoURL string, opts Options) (*GitProvider, error)

New creates a new Git provider

func (*GitProvider) Close

func (g *GitProvider) Close() error

Close releases resources used by the Git provider

func (*GitProvider) Get

func (g *GitProvider) Get(ctx context.Context, path string) ([]byte, error)

Get retrieves a file from the Git repository

func (*GitProvider) Name

func (g *GitProvider) Name() string

Name returns the provider name

func (*GitProvider) Watch

func (g *GitProvider) Watch(ctx context.Context, path string) (<-chan struct{}, error)

Watch starts monitoring a path for changes

type Options

type Options struct {
	Branch    string
	Tag       string
	Auth      Auth
	TLSConfig *tls.Config
	VerifySSL bool
}

Options for the Git provider

Jump to

Keyboard shortcuts

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