repos

package
v0.3.40 Latest Latest
Warning

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

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

Documentation

Overview

Package repos provides an interface for processing repositories.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRootPath = "/data"
	DefaultHostName = ""
	DefaultTimeOut  = 15 * time.Second
)

Functions

func PathKey

func PathKey(repo *sourcev1.GitRepository) string

Types

type Repo

type Repo interface {
	GetSourceName() string
	GetSourceNameSpace() string
	SyncRepo() error
	IsSynced() bool
	TidyRepo() error
	TidyAll() error
	AddUser(name string)
	RemoveUser(namer string) bool
	LinkData(layerPath, sourcePath string) error
	GetGitRepo() *sourcev1.GitRepository
	GetPath() string
	GetDataPath() string
	GetLoadPath() string
	SetHostName(hostName string)
	SetGitRepo(src *sourcev1.GitRepository, rootPath string)
	SetHTTPClient(client *http.Client)
	SetTarConsumer(tarConsumer tarconsumer.TarConsumer)
	// contains filtered or unexported methods
}

Repo defines the interface for managing repository and revision data.

type Repos

type Repos interface {
	Add(srcRepo *sourcev1.GitRepository) Repo
	Get(name string) Repo
	Delete(name string)
	List() map[string]Repo
	SetRootPath(path string)
	GetRootPath() string
	SetHostName(hostName string)
	SetTimeOut(timeOut time.Duration)
	SetHTTPClient(client *http.Client)
}

Repos defines the interface for managing multiple instances of repository and revision data.

func NewRepos

func NewRepos(ctx context.Context, log logr.Logger) Repos

NewRepos creates a repos object.

Jump to

Keyboard shortcuts

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