Documentation ¶
Index ¶
- type ArtifactServer
- type File
- type GitServer
- func (s *GitServer) AutoCreate() *GitServer
- func (s *GitServer) HTTPAddress() string
- func (s *GitServer) Root() string
- func (s *GitServer) SSHAddress() string
- func (s *GitServer) StartHTTP() error
- func (s *GitServer) StartSSH() error
- func (s *GitServer) StopHTTP()
- func (s *GitServer) StopSSH() error
- type HTTPServer
- type HelmServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactServer ¶
type ArtifactServer struct {
*HTTPServer
}
func NewTempArtifactServer ¶
func NewTempArtifactServer() (*ArtifactServer, error)
func (*ArtifactServer) ArtifactFromFiles ¶
func (s *ArtifactServer) ArtifactFromFiles(files []File) (string, error)
ArtifactFromFiles creates a tar.gz artifact from the given files and returns the file name of the artifact.
func (*ArtifactServer) URLForFile ¶
func (s *ArtifactServer) URLForFile(file string) (string, error)
URLForFile returns the URL the given file can be reached at or an error if the server has not been started.
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 ¶
NewGitServer returns a GitServer with the given repository docroot set.
func NewTempGitServer ¶
NewTempGitServer returns a GitServer with a newly created temp dir as repository docroot.
func (*GitServer) AutoCreate ¶
AutoCreate enables the automatic creation of a non-existing Git repository on push.
func (*GitServer) HTTPAddress ¶
HTTPAddress returns the address of the HTTP git server.
func (*GitServer) SSHAddress ¶
SSHAddress returns the address of the SSH git server.
func (*GitServer) StartHTTP ¶
StartHTTP starts a new HTTP git server with the current configuration.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(docroot string) *HTTPServer
func NewTempHTTPServer ¶
func NewTempHTTPServer() (*HTTPServer, error)
func (*HTTPServer) Root ¶
func (s *HTTPServer) Root() string
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start()
func (*HTTPServer) StartTLS ¶
func (s *HTTPServer) StartTLS(cert, key, ca []byte) error
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop()
func (*HTTPServer) URL ¶
func (s *HTTPServer) URL() string
func (*HTTPServer) WithMiddleware ¶
func (s *HTTPServer) WithMiddleware(m func(handler http.Handler) http.Handler) *HTTPServer
type HelmServer ¶
type HelmServer struct {
*HTTPServer
}
func NewTempHelmServer ¶
func NewTempHelmServer() (*HelmServer, error)
func (*HelmServer) GenerateIndex ¶
func (s *HelmServer) GenerateIndex() error
func (*HelmServer) PackageChart ¶
func (s *HelmServer) PackageChart(path string) error
func (*HelmServer) PackageChartWithVersion ¶
func (s *HelmServer) PackageChartWithVersion(path, version string) error