metadata

package
v0.38.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseHTTP = true

Functions

func New

func New(
	configuration librepo.Configuration,
	customConfig config.CustomConfiguration,
	logging librepo.Logging,
	timestamp librepo.Timestamp,
	sshAuth repository.SshAuthProvider,
) repository.Metadata

Types

type Impl

type Impl struct {
	Configuration       librepo.Configuration
	CustomConfiguration config.CustomConfiguration
	Logging             librepo.Logging
	Timestamp           librepo.Timestamp

	SshAuthProvider repository.SshAuthProvider

	GitRepo *git.Repository

	// CommitCacheByFilePath holds information about the newest commit that touches a file, keyed by file path
	CommitCacheByFilePath map[string]repository.CommitInfo

	// KnownCommits remembers which commit hashes we already know
	KnownCommits map[string]bool

	// NewCommits is the list of commits that are new from the most recent Pull operation
	NewCommits []repository.CommitInfo

	// AlreadySeenCommit is the commit hash of the newest commit that we have already cached
	AlreadySeenCommit string

	LastPull time.Time
	// contains filtered or unexported fields
}

func (*Impl) Clone

func (r *Impl) Clone(ctx context.Context) error

func (*Impl) Commit

func (r *Impl) Commit(ctx context.Context, message string) (repository.CommitInfo, error)

func (*Impl) DeleteFile

func (r *Impl) DeleteFile(filename string) error

func (*Impl) Discard

func (r *Impl) Discard(ctx context.Context)

func (*Impl) IsCommitKnown

func (r *Impl) IsCommitKnown(hash string) bool

func (*Impl) IsMetadata

func (r *Impl) IsMetadata() bool

func (*Impl) LastUpdated

func (r *Impl) LastUpdated() time.Time

func (*Impl) MkdirAll

func (r *Impl) MkdirAll(path string) error

func (*Impl) NewPulledCommits

func (r *Impl) NewPulledCommits() []repository.CommitInfo

func (*Impl) Pull

func (r *Impl) Pull(ctx context.Context) error

func (*Impl) Push

func (r *Impl) Push(ctx context.Context) error

func (*Impl) ReadDir

func (r *Impl) ReadDir(path string) ([]os.FileInfo, error)

func (*Impl) ReadFile

func (r *Impl) ReadFile(filename string) ([]byte, repository.CommitInfo, error)

func (*Impl) Setup added in v0.33.0

func (r *Impl) Setup() error

func (*Impl) Stat

func (r *Impl) Stat(filename string) (os.FileInfo, error)

func (*Impl) Teardown added in v0.33.0

func (r *Impl) Teardown()

func (*Impl) Write

func (r *Impl) Write(p []byte) (n int, err error)

func (*Impl) WriteFile

func (r *Impl) WriteFile(filename string, contents []byte) error

Jump to

Keyboard shortcuts

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