autotls

package
v0.0.0-...-af14b6a Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package autotls support Let's Encrypt for a Go server application.

package main

import (

	"github.com/wangyysde/sysadmServer/autotls"
	"github.com/wangyysde/sysadmServer"
	"github.com/wangyysde/sysadmLog"
)

func main() {
	r := sysadmServer.Default()

	// Ping handler
	r.GET("/ping", func(c *sysadmServer.Context) {
		c.String(200, "pong")
	})

    sysadmLog.Log(autotls.Run(r, "example1.com", "example2.com"),"fatal")
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(r http.Handler, domain ...string) error

Run support 1-line LetsEncrypt HTTPS servers

func RunWithManager

func RunWithManager(r http.Handler, m *autocert.Manager) error

RunWithManager support custom autocert manager

Types

This section is empty.

Jump to

Keyboard shortcuts

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