Browse Source

En cours de développement

master
losyme 9 months ago
parent
commit
20bb71192a
  1. 10
      go.mod
  2. 20
      go.sum
  3. 6
      internal/api/api.go

10
go.mod

@ -6,22 +6,22 @@ require (
forge.chapril.org/dune/jw v0.0.0-20211020130157-3c3c3fe4d012
forge.chapril.org/dune/memory v0.0.0-20211020130347-474549465ac2
forge.chapril.org/dune/model v0.0.0-20211020130416-c773f1d2fa0b
forge.chapril.org/eckmuhl/context v0.0.0-20211027123449-e913afbfa1d6
forge.chapril.org/eckmuhl/middleware v0.0.0-20211027123622-f366678527b7
forge.chapril.org/eckmuhl/router v0.0.0-20211027123537-4acff0f550e9
forge.chapril.org/eckmuhl/context v0.0.0-20211028072132-87fe20762eba
forge.chapril.org/eckmuhl/middleware v0.0.0-20211028072444-9da44b08ec04
forge.chapril.org/eckmuhl/router v0.0.0-20211028072217-1459f3dd2ce6
forge.chapril.org/losyme/application v0.0.0-20211008200819-b014e639a171
forge.chapril.org/losyme/cmdline v0.0.0-20211010173716-509a4c1f872e
forge.chapril.org/losyme/config v0.0.0-20211025142334-51a8a7a73a4f
forge.chapril.org/losyme/errors v0.0.0-20211003204336-ad5510c24b40
forge.chapril.org/losyme/logger v0.0.0-20211020125912-674a399f933c
forge.chapril.org/losyme/minikit v0.0.0-20211027202011-7c49ec237639
forge.chapril.org/losyme/minikit v0.0.0-20211028072657-eefc7eb50a66
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf
forge.chapril.org/losyme/util v0.0.0-20211025142031-fd89d32d86fe
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034
)
require (
forge.chapril.org/eckmuhl/render v0.0.0-20211026212913-24b58019a3b4 // indirect
forge.chapril.org/eckmuhl/render v0.0.0-20211028072039-05a78935e83a // indirect
forge.chapril.org/eckmuhl/server v0.0.0-20211025142833-6bfb82ee5b8e // indirect
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518 // indirect
forge.chapril.org/losyme/crypto v0.0.0-20211003213528-e97d4ebea720 // indirect

20
go.sum

@ -4,14 +4,14 @@ forge.chapril.org/dune/memory v0.0.0-20211020130347-474549465ac2 h1:gj9NfEbXMnYY
forge.chapril.org/dune/memory v0.0.0-20211020130347-474549465ac2/go.mod h1:3/uYWmGaCQHUWsjyXjOYZJB36MPhsWEBjZ/i2Sj/FXs=
forge.chapril.org/dune/model v0.0.0-20211020130416-c773f1d2fa0b h1:Sjgl+8N4nVtOsQLCNpLuJK9XSccNsY54xKNp39cmBiY=
forge.chapril.org/dune/model v0.0.0-20211020130416-c773f1d2fa0b/go.mod h1:NbcPP22feQcoXHLo9EyWsPtwv+zD/lLERCReI4XNecM=
forge.chapril.org/eckmuhl/context v0.0.0-20211027123449-e913afbfa1d6 h1:b6Zl2C7sME6WVswWfZGeOInRVz6xt23XnuHrY+cdNWM=
forge.chapril.org/eckmuhl/context v0.0.0-20211027123449-e913afbfa1d6/go.mod h1:C+BFg7gqtYFkvDWwkCOirG+bLmPMBv2h9Ev7Vpqqi5Q=
forge.chapril.org/eckmuhl/middleware v0.0.0-20211027123622-f366678527b7 h1:JHHNfm30SuR8sq1kHeXwVDy4zIg3cbuhVdHA/I4H+Yg=
forge.chapril.org/eckmuhl/middleware v0.0.0-20211027123622-f366678527b7/go.mod h1:GOf0TKgo2ZLj8T/ORq78R7jIdyB/J7yzWKabelCEjSI=
forge.chapril.org/eckmuhl/render v0.0.0-20211026212913-24b58019a3b4 h1:PjkgKjWgARf9HeTn6Enle89DSrXICSBfglCpT2RtTzE=
forge.chapril.org/eckmuhl/render v0.0.0-20211026212913-24b58019a3b4/go.mod h1:NfRA+CqB0f4RLDqQ/Q5QozEHSPBqyWUAyGI+7sJRuBw=
forge.chapril.org/eckmuhl/router v0.0.0-20211027123537-4acff0f550e9 h1:LFMed3eyjFruRQ2bbq8H/sRf2F3axNsQiXZHuM6GI5k=
forge.chapril.org/eckmuhl/router v0.0.0-20211027123537-4acff0f550e9/go.mod h1:gY5Q3NQddynkQ0EgD5lUMGt/QKomHmFhgOema19vSbk=
forge.chapril.org/eckmuhl/context v0.0.0-20211028072132-87fe20762eba h1:lAHdO0tVkbSUqP/K2oXGQXNhdBWiL5fz62UKFLtAf5g=
forge.chapril.org/eckmuhl/context v0.0.0-20211028072132-87fe20762eba/go.mod h1:rF7cBLvtL7gXwY9JpsLc7/mpFYM+J5YpWnC53ZqrKtQ=
forge.chapril.org/eckmuhl/middleware v0.0.0-20211028072444-9da44b08ec04 h1:IV0mCVdlrETMu2zO5MYyRlcjc7HlC6HW9iRmDgkln2c=
forge.chapril.org/eckmuhl/middleware v0.0.0-20211028072444-9da44b08ec04/go.mod h1:Dc6hLVzOAMhG1NqM9GKD+qpAjQp3SMjsnx9DxzoUwsQ=
forge.chapril.org/eckmuhl/render v0.0.0-20211028072039-05a78935e83a h1:UpYt+2sgFmXhtWCJjJPyR2phcj8djw2kBlsn1VQfO+Y=
forge.chapril.org/eckmuhl/render v0.0.0-20211028072039-05a78935e83a/go.mod h1:NfRA+CqB0f4RLDqQ/Q5QozEHSPBqyWUAyGI+7sJRuBw=
forge.chapril.org/eckmuhl/router v0.0.0-20211028072217-1459f3dd2ce6 h1:SAFcWvzF/+644dnSkR4r/wPagSI/IgPqvjIlu/t2tbs=
forge.chapril.org/eckmuhl/router v0.0.0-20211028072217-1459f3dd2ce6/go.mod h1:T9QUvVm4hrCFLpjCDq3u9/mAKUEejV1AdpNC1Mc46RU=
forge.chapril.org/eckmuhl/server v0.0.0-20211025142833-6bfb82ee5b8e h1:3vqsUmtMp2zb/o4uDZ3yQ47zJgQfkajVwBXsCo1YSUw=
forge.chapril.org/eckmuhl/server v0.0.0-20211025142833-6bfb82ee5b8e/go.mod h1:pCqVQ1FeaeRUymuC/LYA1c+5AY2uqjOZVKZjLysaotk=
forge.chapril.org/losyme/application v0.0.0-20211008200819-b014e639a171 h1:T8MQXGNCs1AsjtIQMYw1gjp0g4H9Frflosm6kkY8e7g=
@ -30,8 +30,8 @@ forge.chapril.org/losyme/kvfmt v0.0.0-20211003204256-34ac32764dae h1:RdYWXKy+OQN
forge.chapril.org/losyme/kvfmt v0.0.0-20211003204256-34ac32764dae/go.mod h1:wnVjwnCO2vFLLZ1EgFuFws1n8XLluufsGsdozGYSA7c=
forge.chapril.org/losyme/logger v0.0.0-20211020125912-674a399f933c h1:AsWWDqFMigGp33sHDqGdJVVACiPYcY1ChSmBN7olBrk=
forge.chapril.org/losyme/logger v0.0.0-20211020125912-674a399f933c/go.mod h1:a3fN8yTjq5S/ramr03hIkutKM/35UsijUgRNKHjjlMU=
forge.chapril.org/losyme/minikit v0.0.0-20211027202011-7c49ec237639 h1:YfYasXGiLBZVPqsvNpbGSKr8sFp7A2BdeIBRU1oB91o=
forge.chapril.org/losyme/minikit v0.0.0-20211027202011-7c49ec237639/go.mod h1:RF28tFdCfgzJJMqbGRgO/BNQ2NzwDAidS/8SyPdgbf8=
forge.chapril.org/losyme/minikit v0.0.0-20211028072657-eefc7eb50a66 h1:l9JsPNwUdjwLq/BQxF9xSz3Qwfe+9fJMZo5epdBCI5M=
forge.chapril.org/losyme/minikit v0.0.0-20211028072657-eefc7eb50a66/go.mod h1:x++NEZOh1KmmR7M2aEFrZ3OFBeyDSogsnJGGXNhYO5o=
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf h1:5OIlwVBTdvjCXh2JHAh5rq8FgSe1lXuuKDFtO/ZRaRM=
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf/go.mod h1:VNjFKl0Q2vvLDnR9tdNdTIZDLQNlR+gcIGNf2aIYv3o=
forge.chapril.org/losyme/util v0.0.0-20211025142031-fd89d32d86fe h1:xjMUKHxtG8jz57JyOxgNLlRaPLJeQvMV9K3HNlhKDB8=

6
internal/api/api.go

@ -11,6 +11,7 @@ import (
"forge.chapril.org/eckmuhl/context"
"forge.chapril.org/eckmuhl/middleware"
"forge.chapril.org/eckmuhl/middleware/json"
"forge.chapril.org/eckmuhl/router"
"forge.chapril.org/losyme/logger"
"forge.chapril.org/losyme/uuid"
@ -23,7 +24,7 @@ type api struct {
logger *logger.Component
}
func new(cs *components.Components) (*api, error) {
func newAPI(cs *components.Components) (*api, error) {
logger, err := cs.Logger.NewComponent(uuid.New(), "api")
if err != nil {
return nil, err
@ -42,7 +43,7 @@ func (api *api) status(c *context.Context) error {
}
func Setup(cs *components.Components) error {
api, err := new(cs)
api, err := newAPI(cs)
if err != nil {
return err
}
@ -50,6 +51,7 @@ func Setup(cs *components.Components) error {
cs.Router.Use(
middleware.RequestID(),
middleware.Logger(api.logger),
json.OnError(api.logger),
)
cs.Router.Group("/api", func(g *router.Group) { //api...............................................................

Loading…
Cancel
Save