vcs

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsWellKnown

func IsWellKnown(address string) (kind, repoAddress, projectPath string, ok bool)

Types

type DialGitOptions

type DialGitOptions struct {
	Insecure  bool
	AllowFile bool
}

type Repository

type Repository interface {
	Path() string

	DefaultRef(ctx context.Context) (string, error)
	Versions(ctx context.Context) ([]*Version, error)
	ResolveRef(ctx context.Context, ref string) (string, error)
	GetRevision(ctx context.Context, id string) (Revision, error)

	FetchRevision(ctx context.Context, projectPath string, revision Revision, destDir string) error
}

func DialGitRepository

func DialGitRepository(ctx context.Context, repoPath string, options *DialGitOptions) (Repository, error)

TODO: should this accept config for a cache directory or something?

type Revision

type Revision interface {
	ID() string
	PseudoID() string
	When() time.Time
	History() iter.Seq[Revision]
}

type Version

type Version struct {
	Version     module.Version
	ProjectPath string
	RevisionID  string
}

Jump to

Keyboard shortcuts

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