core

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Overview

Package core contains wrapper structs for the git package resources

Package core contains wrapper structs for the git package resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRepository

type GitRepository struct {
	Repository *git.Repository
}

GitRepository is a wrapper for git.Repository and implements IGitRepository

func NewGitRepository

func NewGitRepository(repository *git.Repository) *GitRepository

NewGitRepository creates a new GitRepository object

func (*GitRepository) Worktree

func (repository *GitRepository) Worktree() (gitWorktree IGitWorktree, err error)

Worktree returns the worktree of the repository

type GitWorktree

type GitWorktree struct {
	Worktree *git.Worktree
}

GitWorktree is a wrapper for git.Worktree and implements IGitWorktree

func (*GitWorktree) Checkout

func (gitWorktree *GitWorktree) Checkout(opts *git.CheckoutOptions) error

Checkout performs the git checkout operation based on the given options

type IGitRepository

type IGitRepository interface {
	Worktree() (gitWorktree IGitWorktree, err error)
}

IGitRepository defines a subset of git.Repository methods required to clone/checkout a git repository

type IGitWorktree

type IGitWorktree interface {
	Checkout(opts *git.CheckoutOptions) error
}

IGitWorktree defines a subset of git.Worktree methods required to clone/checkout a git repository

func NewGitWorktree

func NewGitWorktree(gitRepository *GitRepository) (gitWorktree IGitWorktree, err error)

NewGitWorktree creates a new GitWorktree object

Directories

Path Synopsis
Package mock defines the struct and its corresponding methods for mocking core.Repository
Package mock defines the struct and its corresponding methods for mocking core.Repository

Jump to

Keyboard shortcuts

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