git

package
v0.1.0-dev.20260222175125 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *execution.ActionRegistry)

Register registers all git actions with the given registry.

Types

type Checkout

type Checkout struct{ Impl *Provider }

Checkout — Checkout checks out a ref in the given repository directory.

func (*Checkout) Do

func (*Checkout) Name

func (o *Checkout) Name() string

type Clone

type Clone struct{ Impl *Provider }

Clone — Clone clones a repository from url into path. Returns compensation state with the cloned path.

func (*Clone) Do

func (*Clone) Name

func (o *Clone) Name() string

func (*Clone) Undo

func (o *Clone) Undo(state execution.UndoState) error

type Provider

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

Provider provides git actions.

Compensable Forward methods return (string, map[string]any, error): the resource path, the compensation receipt, and an error. The map is opaque to the executor, meaningful only to the corresponding Compensate* Backward method.

func (*Provider) Checkout

func (p *Provider) Checkout(repo, ref string, output io.Writer) (string, error)

Checkout checks out a ref in the given repository directory.

Parameters:

  • repo: Local path to the git repository
  • ref: Branch, tag, or commit to check out

func (*Provider) Clone

func (p *Provider) Clone(url, path string, output io.Writer) (string, map[string]any, error)

Clone clones a repository from url into path. Returns compensation state with the cloned path.

Parameters:

  • url: Git repository URL to clone
  • path: Local directory path for the clone

func (*Provider) CompensateClone

func (p *Provider) CompensateClone(state any) error

CompensateClone removes the cloned directory.

func (*Provider) Pull

func (p *Provider) Pull(repo string, output io.Writer) (string, error)

Pull pulls the latest changes in the given repository directory.

Parameters:

  • repo: Local path to the git repository

type Pull

type Pull struct{ Impl *Provider }

Pull — Pull pulls the latest changes in the given repository directory.

func (*Pull) Do

func (o *Pull) Do(ctx *execution.Context, slots map[string]any) (execution.Result, execution.UndoState, error)

func (*Pull) Name

func (o *Pull) Name() string

Jump to

Keyboard shortcuts

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