interfaces

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HookExecutor

type HookExecutor interface {
	ExecuteHooks(ctx context.Context, hookType hooks.HookType, hookCtx hooks.HookContext) []hooks.HookResult
}

HookExecutor defines the interface for executing hooks

type LockManager

type LockManager interface {
	StartSession() error
	EndSession()
	AcquireLock(req metadata.LockRequest) (metadata.LockResult, error)
	ReleaseLock(environment, user string) error
	IsLocked(environment string) bool
	RecoverLocks(user string, force bool) (metadata.RecoveryReport, error)
}

LockManager defines the interface for managing environment locks

type MetadataReader

type MetadataReader interface {
	Read() (*metadata.Metadata, error)
	Exists() bool
}

MetadataReader defines the interface for reading metadata

type MetadataWriter

type MetadataWriter interface {
	Write(meta *metadata.Metadata) error
	CreateOrphanBranch() error
}

MetadataWriter defines the interface for writing metadata

type Repository

type Repository interface {
	// Basic repository operations
	CurrentBranch() (string, error)
	CurrentCommitSHA() (string, error)
	Checkout(ref string) error
	BranchExists(name string) bool
	CreateBranch(name string, fromRef string) error
	DeleteBranch(name string, force bool) error

	// Git operations
	Merge(branch string, message string) error
	UserName() (string, error)
	UserEmail() (string, error)
	HasUncommittedChanges(branch string) (bool, error)
	WorkingTree() string
	IsGitRepository() bool
}

Repository defines the interface for Git repository operations This interface allows for better testability and flexibility

type RepositoryValidator

type RepositoryValidator interface {
	ValidateRepository() git.ValidationResult
}

RepositoryValidator defines the interface for repository validation

type TempBranchTester

type TempBranchTester interface {
	TestMerge(ctx context.Context, config safety.TestConfig) safety.TestResult
}

TempBranchTester defines the interface for testing merge operations safely

Jump to

Keyboard shortcuts

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