MCPcopy Index your code
hub / github.com/adrianosela/sslmgr

github.com/adrianosela/sslmgr @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
11 symbols 37 edges 3 files 7 documented · 64%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Simple Secure Server

Go Report Card Documentation GitHub issues license Mentioned in Awesome Go

Prerequisites:

  • Your server must be reachable through the provided domain name, this is how LetsEncrypt verifies domain ownership and grants your server a trusted certificate

With Default Values:

ss, err := sslmgr.NewSecureServer(handler, "yourhostname.com")
if err != nil {
    log.Fatal(err)
}
ss.ListenAndServe()

Note: This option uses the file system as the certificate cache. If your use case does not have a persistent file system, you should provide a value for CertCache in the ServerConfig as shown below.

With Optional Values:

(Using the certcache library to define a cache)

ss, err := sslmgr.NewServer(sslmgr.ServerConfig{
    Hostnames: []string{os.Getenv("CN_FOR_CERTIFICATE")},
    HTTPPort:  ":80",
    HTTPSPort: ":443",
    Handler:   h,
    ServeSSLFunc: func() bool {
        return strings.ToLower(os.Getenv("PROD")) == "true"
    },
    CertCache: certcache.NewLayered(
        certcache.NewLogger(),
        autocert.DirCache("."),
    ),
    ReadTimeout:         5 * time.Second,
    WriteTimeout:        5 * time.Second,
    IdleTimeout:         25 * time.Second,
    GracefulnessTimeout: 5 * time.Second,
    GracefulShutdownErrHandler: func(e error) {
        log.Fatal(e)
    },
})
if err != nil {
    log.Fatal(err)
}

ss.ListenAndServe()

Core symbols most depended-on inside this repo

Shape

Method 5
Function 4
Struct 2

Languages

Go100%

Modules by API surface

server.go9 symbols
server_test.go1 symbols
example/main.go1 symbols

For agents

$ claude mcp add sslmgr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page