webserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WebServerNginxCode nginx web server code
	WebServerNginxCode = "nginx"
	// WebServerApacheCode apache web server code
	WebServerApacheCode = "apache"
)

Variables

This section is empty.

Functions

func GetSupportedWebServers

func GetSupportedWebServers() []string

GetSupportedWebServers returns the codes of supported web servers

Types

type ApacheWebServer

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

ApacheWebServer provides functionality to work with apache web server

func GetApacheWebServer

func GetApacheWebServer(options map[string]string) (*ApacheWebServer, error)

GetApacheWebServer creates an instance of ApacheWebServer

func (*ApacheWebServer) GetApacheConfigurator

func (aws *ApacheWebServer) GetApacheConfigurator() a2conf.ApacheConfigurator

GetApacheConfigurator returns webserver code

func (*ApacheWebServer) GetCode

func (aws *ApacheWebServer) GetCode() string

GetCode returns webserver code

func (*ApacheWebServer) GetVhostByName

func (aws *ApacheWebServer) GetVhostByName(serverName string) (*agentintegration.VirtualHost, error)

GetVhostByName returns virtual host by name

func (*ApacheWebServer) GetVhosts

func (aws *ApacheWebServer) GetVhosts() ([]agentintegration.VirtualHost, error)

GetVhosts returns apache web server vitual hosts

type WebServer

type WebServer interface {
	GetVhostByName(serverName string) (*agentintegration.VirtualHost, error)
	GetVhosts() ([]agentintegration.VirtualHost, error)
	GetCode() string
}

WebServer is an interface for a webserver like nginx, apache

func GetWebServer

func GetWebServer(webServerCode string, options map[string]string) (WebServer, error)

GetWebServer returns WebServer object by code

Jump to

Keyboard shortcuts

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