feat: port certs :report subcommand to golang

The bash :report implementation for the certs plugin is replaced with a compiled golang binary. The certificate inspection getters run openssl and reproduce the existing field extraction, so the ssl report keys are unchanged, while collection now happens in parallel and json is marshalled directly. The now-unused fn-ssl-* display helpers are dropped, and fn-certs-set and fn-certs-remove remain for certs:add and certs:remove.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-07-07 06:56:51 -04:00
1 parent 8d0c36bad6
commit 6e5afb84a9
12 files changed
+435 -174

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
certs "github.com/dokku/dokku/plugins/certs"
"github.com/dokku/dokku/plugins/common"
)
// main entrypoint to all triggers
func main() {
parts := strings.Split(os.Args[0], "/")
trigger := parts[len(parts)-1]
flag.Parse()
var err error
switch trigger {
case "report":
appName := flag.Arg(0)
err = certs.ReportSingleApp(appName, "", "")
default:
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
}
if err != nil {
common.LogFailWithError(err)
}
}