Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
New creates autocert service cacheDir should be a path to the folder when you want to store your certificates (to save them when the app stops) email is used only for Let's Encrypt registration purposes hosts is the list of domain names of your site (could be just one)
func (*Service) GetHTTPSServer ¶
GetHTTPSServer should be used when you want some manual control over created https server after getting the server and applying your settings just call .ListenAndServeTLS("", "")
func (*Service) ListenHTTPRedirect ¶
ListenHTTPRedirect listens plain http and redirects all requests to https version of the site works only when your https server listens at 443 port
func (*Service) ListenHTTPS ¶
ListenHTTPS is the easiest way to start your https server hostPort may look like :443 (listens all interfaces) or 1.2.3.4:443 (listens only provided ip) mux should be a router of your choice (for example github.com/julienschmidt/httprouter)