Documentation ¶
Overview ¶
Package server contains a web server that can serve an instance of the dataaccess.Repository interface via HTTP and HTTPs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPEndpoint ¶
type HTTPEndpoint struct {
// contains filtered or unexported fields
}
HTTPEndpoint contains HTTP server endpoint parameters such as a domain name and TCP bindings.
func (*HTTPEndpoint) Bindings ¶
func (endpoint *HTTPEndpoint) Bindings() []*config.TCPBinding
Bindings returns all TCP bindings of the current HTTP endpoint.
func (*HTTPEndpoint) DefaultURL ¶
func (endpoint *HTTPEndpoint) DefaultURL() string
DefaultURL return the default url for the current HTTP endpoint. It will include the domain name if one is configured. If none is configured it will use the IP address as the host name.
func (*HTTPEndpoint) ForceHTTPS ¶
func (endpoint *HTTPEndpoint) ForceHTTPS() bool
ForceHTTPS returns a flag indicating whether a secure connection shall be preferred over insecure connections.
func (*HTTPEndpoint) IsSecure ¶
func (endpoint *HTTPEndpoint) IsSecure() bool
IsSecure returns a flag indicating whether the current HTTPEndpoint is secure (HTTPS) or not.
func (*HTTPEndpoint) Protocol ¶
func (endpoint *HTTPEndpoint) Protocol() string
Protocol returns the protocol of the current HTTPEndpoint. "https" if this endpoint is secure; otherwise "http".
func (*HTTPEndpoint) String ¶
func (endpoint *HTTPEndpoint) String() string
type HTTPSEndpoint ¶
type HTTPSEndpoint struct { HTTPEndpoint // contains filtered or unexported fields }
HTTPSEndpoint contains a secure version of a HTTPEndpoint with parameters for secure TLS connections such as the certificate paths.
func (*HTTPSEndpoint) CertFilePath ¶
func (endpoint *HTTPSEndpoint) CertFilePath() string
CertFilePath returns the SSL certificate file (e.g. "cert.pem") name of this HTTPSEndpoint.
func (*HTTPSEndpoint) KeyFilePath ¶
func (endpoint *HTTPSEndpoint) KeyFilePath() string
KeyFilePath returns the SSL certificate key file name (e.g. "cert.key") of this HTTPSEndpoint.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a web server instance for a given repository.