gitops

package
v0.1.56 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gitops owns durable workspace Git writes. HTTP is only a caller and observer: losing a connection never cancels or replays an accepted operation.

Index

Constants

View Source
const Version = 6

Version 6 supplies repository-scoped GitHub credentials to commit hooks.

Variables

View Source
var (
	ErrBranchChanged  = errors.New("This branch changed or was removed. Refresh the branch list before trying again.")
	ErrBranchInUse    = errors.New("This branch is checked out. Switch to another branch before deleting it; branches open in another worktree must be managed there.")
	ErrBranchUnmerged = errors.New("This branch has unmerged commits. Merge them first, or explicitly delete the unmerged branch.")
)
View Source
var (
	ErrRestoreDirty      = errors.New("Commit or stash your local changes before restoring a version.")
	ErrRestoreChanged    = errors.New("The current branch changed. Review it before restoring this version.")
	ErrRestoreInProgress = errors.New("Finish the current merge, rebase, or other Git operation before restoring a version.")
	ErrRestoreCommit     = errors.New("This commit is no longer available. Refresh commit history and try again.")
	ErrRestoreLocalFiles = errors.New("Local ignored files would be replaced by this version. Move them before restoring.")
)
View Source
var ErrIdentityRequired = errors.New("Set your Git author name and email before committing.")

Functions

func ActionVersion

func ActionVersion(action string) int

ActionVersion describes the closed action enum, independently of optional fields.

func Network

func Network(action string) bool

func Normalize

func Normalize(spec *registry.GitSpec) error

func Root

func Root(ctx context.Context, directory string) (string, error)

func SameIntent

func SameIntent(a, b registry.GitSpec) bool

SameIntent ignores the server-resolved directory: a project moved after a completed request must not cause that request's ID to execute a second time.

Types

type Service

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

func New

func New(store *registry.Store, access *gitaccess.Service) (*Service, error)

func (*Service) ActiveCount

func (s *Service) ActiveCount() int

func (*Service) BusyPath

func (s *Service) BusyPath(path string) bool

func (*Service) Cancel

func (s *Service) Cancel(id string) (registry.GitOperation, error)

func (*Service) Changes

func (s *Service) Changes() <-chan struct{}

func (*Service) Close

func (s *Service) Close()

func (*Service) Get

func (s *Service) Get(id string) (registry.GitOperation, error)

func (*Service) List

func (s *Service) List(projectID string, activeOnly bool) ([]registry.GitOperation, error)

func (*Service) Start

func (*Service) Wait

func (s *Service) Wait(ctx context.Context, id string) (registry.GitOperation, error)

Jump to

Keyboard shortcuts

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