server

package
v0.0.0-...-55e2115 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server handles serving of a Git Repository via HTTP

func NewFromRepoFolder

func NewFromRepoFolder(repoPath string) (*Server, error)

NewFromRepoFolder creates a server for a local folder containing a Git repo

func NewFromURL

func NewFromURL(repoURL string) (*Server, error)

NewFromURL creates a server for a given Git URL. The repo is cloned out to a temporary folder. NewFromURL will block until the repo has been cloned.

func (*Server) GetHandler

func (s *Server) GetHandler() (http.Handler, error)

GetHandler creates an http.Handler to serve requests for content in the server's repo.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown cleans up any temporary resources used.

Jump to

Keyboard shortcuts

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