certificate-api/cmd/main.go

25 lines
647 B
Go
Raw Permalink Normal View History

2020-12-11 00:18:06 -05:00
package main
import (
"github.com/gin-gonic/gin"
2021-07-03 19:02:52 -04:00
"github.com/gin-contrib/cors"
2020-12-11 00:18:06 -05:00
"gitlab.libraryofcode.org/engineering/certificate-api/routes"
)
func main() {
router := gin.Default()
router.GET("/", routes.GetCertificateInfo)
2020-12-23 20:12:28 -05:00
router.GET("/tls", routes.GetCertificateInfo)
router.POST("/parse", routes.GetCertificateInformationEncoded)
2021-07-02 16:57:38 -04:00
router.POST("/pgp", routes.GetOpenPGPInformationEncoded)
2021-07-03 19:02:52 -04:00
2021-07-03 19:04:16 -04:00
// router.POST("/encoding/pgp/armor-binary", routes.PGPArmorToBinary)
// router.POST("/encoding/x509/pem-der", routes.X509PEMToDER)
// router.POST("/encoding/x509/der-pem", routes.X509DERtoPEM)
2020-12-11 00:18:06 -05:00
2021-07-03 19:02:52 -04:00
router.Use(cors.Default())
2020-12-11 00:25:47 -05:00
router.Run()
2020-12-11 00:18:06 -05:00
}