gitobject

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gitobject provides the internal use-case for a set of blob, tree and commit.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CreateGitObject

type CreateGitObject struct {
	FileSystem fs.Interface
	Logger     logger.Interface
	GitHub     github.Interface
}

CreateGitObject creates blob(s), a tree and a commit.

func (*CreateGitObject) Do

func (u *CreateGitObject) Do(ctx context.Context, in Input) (*Output, error)

type Input

type Input struct {
	Files           []fs.File // nil or empty to create an empty commit
	Repository      git.RepositoryID
	CommitMessage   git.CommitMessage
	Author          *git.CommitAuthor // optional
	Committer       *git.CommitAuthor // optional
	ParentCommitSHA git.CommitSHA     // no parent if empty
	ParentTreeSHA   git.TreeSHA       // no parent if empty
	NoFileMode      bool
}

type Interface

type Interface interface {
	Do(ctx context.Context, in Input) (*Output, error)
}

type Output

type Output struct {
	CommitSHA    git.CommitSHA
	ChangedFiles int
}

Directories

Path Synopsis
Package mock_gitobject is a generated GoMock package.
Package mock_gitobject is a generated GoMock package.

Jump to

Keyboard shortcuts

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