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 ¶ added in v0.10.0
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 ¶ added in v0.10.0
func (endpoint *HTTPEndpoint) Bindings() []*config.TCPBinding
Bindings returns all TCP bindings of the current HTTP endpoint.
func (*HTTPEndpoint) DefaultURL ¶ added in v0.10.0
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 ¶ added in v0.10.0
func (endpoint *HTTPEndpoint) ForceHTTPS() bool
ForceHTTPS returns a flag indicating whether a secure connection shall be preferred over insecure connections.
func (*HTTPEndpoint) IsSecure ¶ added in v0.10.0
func (endpoint *HTTPEndpoint) IsSecure() bool
IsSecure returns a flag indicating whether the current HTTPEndpoint is secure (HTTPS) or not.
func (*HTTPEndpoint) Protocol ¶ added in v0.10.0
func (endpoint *HTTPEndpoint) Protocol() string
Protocol returns the protocol of the current HTTPEndpoint. "https" if this endpoint is secure; otherwise "http".
func (*HTTPEndpoint) String ¶ added in v0.10.0
func (endpoint *HTTPEndpoint) String() string
type HTTPSEndpoint ¶ added in v0.10.0
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 ¶ added in v0.10.0
func (endpoint *HTTPSEndpoint) CertFilePath() string
CertFilePath returns the SSL certificate file (e.g. "cert.pem") name of this HTTPSEndpoint.
func (*HTTPSEndpoint) KeyFilePath ¶ added in v0.10.0
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.