git

package
v0.0.0-...-3341807 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType int
const (
	Insert ActionType = 1
	Update ActionType = 2
	Delete ActionType = 3
)

func (ActionType) String

func (a ActionType) String() string

type ChangeSet

type ChangeSet struct {
	Created []string `yaml:"created" json:"created"`
	Updated []string `yaml:"updated" json:"updated"`
	Deleted []string `yaml:"deleted" json:"deleted"`
}

func NewChangeSet

func NewChangeSet(created []string, updated []string, deleted []string) *ChangeSet

func (*ChangeSet) Len

func (changeSet *ChangeSet) Len() int

type GitParser

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

func NewLocalRepoParser

func NewLocalRepoParser(logger *logging.Logger, filter string) *GitParser

Parses a new local .git repository

func NewRemotRepoParser

func NewRemotRepoParser(logger *logging.Logger, url string, filter string) *GitParser

Parses a remote repository with a disk clone

func NewRemoteMemoryRepoParser

func NewRemoteMemoryRepoParser(logger *logging.Logger, url string, filter string) *GitParser

Parses a remote repository with an in-memory clone

func (*GitParser) Diff

func (parser *GitParser) Diff(targetHash string) *ChangeSet

Diffs the last commit to determine which files have been created, modified, and/or deleted, and returns a ChangeSet containing the relative file paths.

Jump to

Keyboard shortcuts

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