repofs

package
v0.0.0-...-b0fec18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneDirectories

type CloneDirectories struct {
	Default  string    `toml:"default"`
	Matchers []Matcher `toml:"matchers"`
}

func (CloneDirectories) FindMatch

func (c CloneDirectories) FindMatch(str string) string

func (CloneDirectories) Validate

func (c CloneDirectories) Validate() error

type Matcher

type Matcher struct {
	Match     string `toml:"match"`
	Directory string `toml:"dir"`
}

func (Matcher) IsMatch

func (m Matcher) IsMatch(str string) bool

type RepoFS

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

func New

func New(dirs CloneDirectories) *RepoFS

func (*RepoFS) FindCloneDirectory

func (rfs *RepoFS) FindCloneDirectory(repo repos.Repository) (string, error)

FindCloneDirectory finds the clone directory for a repository based on the CloneDirectories configuration.

func (*RepoFS) IsCloned

func (rfs *RepoFS) IsCloned(r repos.Repository) bool

IsCloned checks if a repository is cloned. These results are cached in-memory.

func (*RepoFS) Refresh

func (rfs *RepoFS) Refresh(r repos.Repository) (exists bool)

Jump to

Keyboard shortcuts

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