feat: implement license platform business flows and delivery tooling
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

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:
2026-10-09 15:33:22 +08:00
parent 3ab651d3a8
commit 54c318c615
142 changed files with 11105 additions and 178 deletions

View File

@@ -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"})
})