MCPcopy Create free account
hub / github.com/NextDotID/proof_server / Init

Function Init

controller/main.go:27–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27func Init() {
28 if Engine != nil {
29 return
30 }
31
32 Engine = gin.Default()
33 Engine.Use(middlewareCors())
34
35 Engine.GET("/healthz", healthz)
36 Engine.POST("/v1/proof/payload", proofPayload)
37 Engine.POST("/v1/proof", proofUpload)
38 Engine.GET("/v1/proof/exists", proofExists)
39 Engine.GET("/v1/proof", proofQuery)
40 Engine.GET("/v1/proofchain/changes", proofChainChanges)
41 Engine.GET("/v1/proofchain", proofChainQuery)
42}
43
44func errorResp(c *gin.Context, error_code int, err error) {
45 c.JSON(error_code, ErrorResponse{

Callers 3

initFunction · 0.92
mainFunction · 0.92
TestMainFunction · 0.70

Calls 1

middlewareCorsFunction · 0.70

Tested by 1

TestMainFunction · 0.56