repository

package
v0.0.0-...-646ff60 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: CC0-1.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNeedsRebase

type ErrNeedsRebase struct {
	Err error
}

func (ErrNeedsRebase) Error

func (err ErrNeedsRebase) Error() string

func (ErrNeedsRebase) Unwrap

func (err ErrNeedsRebase) Unwrap() error

type GIT

type GIT struct {
	RemoteURL      string
	PrivateKey     []byte
	Auth           transport.AuthMethod
	Repo           *git.Repository
	FilePath       string
	CommitterName  string
	CommitterEmail string
}

func NewGit

func NewGit(
	ctx context.Context,
	remoteURL string,
	privateKey []byte,
	filePath string,
	committerName string,
	committerEmail string,
) (*GIT, error)

func (*GIT) Close

func (g *GIT) Close() error

func (*GIT) CommitAndPush

func (g *GIT) CommitAndPush(
	ctx context.Context,
	worktree *git.Worktree,
	ref *plumbing.Reference,
) (plumbing.Hash, error)

func (*GIT) Pull

func (g *GIT) Pull(
	ctx context.Context,
	lastKnownCommitHash plumbing.Hash,
	onUpdate func(
		ctx context.Context,
		commitHash plumbing.Hash,
		newData []byte,
	),
) (_err error)

func (*GIT) Read

func (g *GIT) Read() ([]byte, error)

func (*GIT) Write

func (g *GIT) Write(
	ctx context.Context,
	b []byte,
) (plumbing.Hash, error)

Jump to

Keyboard shortcuts

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