ports

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

type CommitInfo

type CommitInfo struct {
	Hash    string
	Author  string
	Message string
	Time    string
}

type Encrypter

type Encrypter interface {
	EncryptDotenv(ctx context.Context, plaintext []byte, recipients []string) ([]byte, error)
	DecryptDotenv(ctx context.Context, ciphertext []byte) ([]byte, error)
	Version(ctx context.Context) (string, error)
}

type FileSystem

type FileSystem interface {
	ReadFile(path string) ([]byte, error)
	WriteFile(path string, data []byte, perm os.FileMode) error
	MkdirAll(path string, perm os.FileMode) error
	Remove(path string) error
	RemoveAll(path string) error
	Stat(path string) (os.FileInfo, error)
	ReadDir(path string) ([]os.DirEntry, error)
	Rename(oldpath, newpath string) error
	OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
}

type Git

type Git interface {
	IsRepo(ctx context.Context, path string) (bool, error)
	InitRepo(ctx context.Context, path string) error
	TopLevel(ctx context.Context, path string) (string, error)
	IsPathTracked(ctx context.Context, repoRoot, path string) (bool, error)
	IsDirty(ctx context.Context, repoRoot string) (bool, error)
	LastCommitInfo(ctx context.Context, repoRoot, path string) (CommitInfo, error)
	Pull(ctx context.Context, repoRoot string) error
	Push(ctx context.Context, repoRoot string) error
}

Jump to

Keyboard shortcuts

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