testserver

package
v0.0.1-beta.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitServer

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

GitServer is a git server for testing purposes. It can serve git repositories over HTTP and SSH.

func NewGitServer

func NewGitServer(docroot string) *GitServer

NewGitServer returns a GitServer with the given repository docroot set.

func NewTempGitServer

func NewTempGitServer() (*GitServer, error)

NewTempGitServer returns a GitServer with a newly created temp dir as repository docroot.

func (*GitServer) AutoCreate

func (s *GitServer) AutoCreate() *GitServer

AutoCreate enables the automatic creation of a non-existing Git repository on push.

func (*GitServer) HTTPAddress

func (s *GitServer) HTTPAddress() string

HTTPAddress returns the address of the HTTP git server.

func (*GitServer) Root

func (s *GitServer) Root() string

Root returns the repositories root directory.

func (*GitServer) SSHAddress

func (s *GitServer) SSHAddress() string

SSHAddress returns the address of the SSH git server.

func (*GitServer) StartHTTP

func (s *GitServer) StartHTTP() error

StartHTTP starts a new HTTP git server with the current configuration.

func (*GitServer) StartSSH

func (s *GitServer) StartSSH() error

StartSSH starts a new SSH git server with the current configuration.

func (*GitServer) StopHTTP

func (s *GitServer) StopHTTP()

StopHTTP stops the HTTP git server.

func (*GitServer) StopSSH

func (s *GitServer) StopSSH() error

StopSSH stops the SSH git server.

type HTTP

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

func NewHTTPServer

func NewHTTPServer(docroot string) *HTTP

func NewTempHTTPServer

func NewTempHTTPServer() (*HTTP, error)

func (*HTTP) Root

func (s *HTTP) Root() string

func (*HTTP) Start

func (s *HTTP) Start()

func (*HTTP) StartTLS

func (s *HTTP) StartTLS(cert, key, ca []byte) error

func (*HTTP) Stop

func (s *HTTP) Stop()

func (*HTTP) URL

func (s *HTTP) URL() string

func (*HTTP) WithMiddleware

func (s *HTTP) WithMiddleware(m func(handler http.Handler) http.Handler) *HTTP

type Helm

type Helm struct {
	*HTTP
}

func NewTempHelmServer

func NewTempHelmServer() (*Helm, error)

func (*Helm) GenerateIndex

func (s *Helm) GenerateIndex() error

func (*Helm) PackageChart

func (s *Helm) PackageChart(path string) error

func (*Helm) PackageChartWithVersion

func (s *Helm) PackageChartWithVersion(path, version string) error

Jump to

Keyboard shortcuts

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