gitdb

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogIfErr

func LogIfErr(logger *zap.Logger, err error, s string)

Types

type CanHTTPWrite

type CanHTTPWrite interface {
	HTTPWrite(w http.ResponseWriter, l *zap.Logger)
}

type CheckoutHandler

type CheckoutHandler struct {
	Checkouts map[string]*GitCheckout
	Log       *zap.Logger
	// contains filtered or unexported fields
}

func (*CheckoutHandler) ServeHTTP

func (h *CheckoutHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*CheckoutHandler) SetupMux

func (h *CheckoutHandler) SetupMux()

type ContextZapLogger

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

func (*ContextZapLogger) With

func (c *ContextZapLogger) With(ctx context.Context) *zap.Logger

type CoreMux

type CoreMux interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request)
	Handle(pattern string, handler http.Handler)
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
}

type GitCheckout

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

func (*GitCheckout) AbsPath

func (g *GitCheckout) AbsPath() string

func (*GitCheckout) FileContent

func (g *GitCheckout) FileContent(fileName string) (io.WriterTo, error)

func (*GitCheckout) LsFiles

func (g *GitCheckout) LsFiles() ([]string, error)

func (*GitCheckout) Refresh

func (g *GitCheckout) Refresh(ctx context.Context) error

func (*GitCheckout) RemoteExists

func (g *GitCheckout) RemoteExists(remote string) bool

func (*GitCheckout) WithReference

func (g *GitCheckout) WithReference(refName string) (*GitCheckout, error)

type GitOperator

type GitOperator struct {
	Log *zap.Logger
}

func (*GitOperator) Clone

func (g *GitOperator) Clone(ctx context.Context, into string, remoteURL string, auth transport.AuthMethod) (*GitCheckout, error)

Directories

Path Synopsis
tracing

Jump to

Keyboard shortcuts

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