feat: implement license platform business flows and delivery tooling
Add admin and customer interfaces, orders, signed activation and leases, protected package delivery, keyring verification, migrations, security controls, tests and deployment documentation. Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
package httpapi
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func NewRouter() *gin.Engine {
|
||||
return NewOperationalRouter(NewOperations(slog.New(slog.NewJSONHandler(os.Stdout, nil))))
|
||||
}
|
||||
func NewOperationalRouter(ops *Operations) *gin.Engine {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
r := gin.New()
|
||||
r.Use(gin.Logger(), gin.Recovery())
|
||||
_ = r.SetTrustedProxies(nil)
|
||||
r.Use(ops.Middleware())
|
||||
r.NoRoute(func(c *gin.Context) { apiError(c, 404, "not_found", "Not found") })
|
||||
r.GET("/api/v1/health/live", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"status": "ok"})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user