git

package
v0.8.15 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeWithHTTP

func InitializeWithHTTP(token string, logFunc runner.LogFunc) error

InitializeWithHTTP initialize git client with http protocol

func InitializeWithSSH

func InitializeWithSSH(path string, logFunc runner.LogFunc) error

InitializeWithSSH returns git client with ssh protocol

Types

type Git

type Git interface {
	Clone(ctx context.Context, dir string, src TargetSource) error
}

Git describes a git service.

func GetInstance

func GetInstance() (Git, error)

GetInstance returns a git client

type ProgressLogger

type ProgressLogger struct {
	runner.LogFunc
	// contains filtered or unexported fields
}

ProgressLogger is a writer for git progress

func (*ProgressLogger) Write

func (l *ProgressLogger) Write(p []byte) (n int, err error)

Write a log without CR or later.

type TargetSource

type TargetSource interface {
	GetSSHURL() string
	GetCloneURL() string
	GetRef() string
	GetSHA() plumbing.Hash
}

TargetSource is a interface returns clone URLs, Ref and SHA for target

Directories

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

Jump to

Keyboard shortcuts

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