Compare commits

..

2 Commits

Author SHA1 Message Date
wpetit feb21d1598 wip: zim lib rewrite
arcad/edge/pipeline/head There was a failure building this commit Details
2023-10-18 19:10:37 +02:00
wpetit 8facff2bd2 feat: basic zim support 2023-10-03 14:19:20 -06:00
43 changed files with 145 additions and 313 deletions

View File

@ -160,7 +160,7 @@ func RunCommand() *cli.Command {
appCtx := logger.With(cmdCtx, logger.F("address", address)) appCtx := logger.With(cmdCtx, logger.F("address", address))
if err := runApp(appCtx, path, address, documentstoreDSN, blobstoreDSN, shareStoreDSN, accountsFile, appsRepository); err != nil { if err := runApp(appCtx, path, address, documentstoreDSN, blobstoreDSN, shareStoreDSN, accountsFile, appsRepository); err != nil {
logger.Error(appCtx, "could not run app", logger.CapturedE(errors.WithStack(err))) logger.Error(appCtx, "could not run app", logger.E(errors.WithStack(err)))
} }
}(p, port, idx) }(p, port, idx)
} }
@ -238,7 +238,7 @@ func runApp(ctx context.Context, path, address, documentStoreDSN, blobStoreDSN,
authModuleMiddleware.AnonymousUser(key, jwa.HS256), authModuleMiddleware.AnonymousUser(key, jwa.HS256),
), ),
) )
if err := handler.Load(ctx, bundle); err != nil { if err := handler.Load(bundle); err != nil {
return errors.Wrap(err, "could not load app bundle") return errors.Wrap(err, "could not load app bundle")
} }
@ -354,7 +354,7 @@ func findMatchingDeviceAddress(ctx context.Context, from string, defaultAddr str
if err != nil { if err != nil {
logger.Error( logger.Error(
ctx, "could not retrieve iface adresses", ctx, "could not retrieve iface adresses",
logger.CapturedE(errors.WithStack(err)), logger.F("iface", ifa.Name), logger.E(errors.WithStack(err)), logger.F("iface", ifa.Name),
) )
continue continue
@ -365,7 +365,7 @@ func findMatchingDeviceAddress(ctx context.Context, from string, defaultAddr str
if err != nil { if err != nil {
logger.Error( logger.Error(
ctx, "could not parse address", ctx, "could not parse address",
logger.CapturedE(errors.WithStack(err)), logger.F("address", addr.String()), logger.E(errors.WithStack(err)), logger.F("address", addr.String()),
) )
continue continue

View File

@ -4,12 +4,10 @@ import (
"context" "context"
"fmt" "fmt"
"net/http" "net/http"
"os"
"strings" "strings"
"sync" "sync"
"time" "time"
"github.com/getsentry/sentry-go"
"github.com/hashicorp/golang-lru/v2/expirable" "github.com/hashicorp/golang-lru/v2/expirable"
"github.com/keegancsmith/rpc" "github.com/keegancsmith/rpc"
"github.com/lestrrat-go/jwx/v2/jwa" "github.com/lestrrat-go/jwx/v2/jwa"
@ -63,16 +61,6 @@ func Run() *cli.Command {
EnvVars: []string{"STORAGE_SERVER_SHARESTORE_DSN_PATTERN"}, EnvVars: []string{"STORAGE_SERVER_SHARESTORE_DSN_PATTERN"},
Value: fmt.Sprintf("sqlite://data/%%TENANT%%/sharestore.sqlite?_pragma=foreign_keys(1)&_pragma=busy_timeout=%d", (60 * time.Second).Milliseconds()), Value: fmt.Sprintf("sqlite://data/%%TENANT%%/sharestore.sqlite?_pragma=foreign_keys(1)&_pragma=busy_timeout=%d", (60 * time.Second).Milliseconds()),
}, },
&cli.StringFlag{
Name: "sentry-dsn",
EnvVars: []string{"STORAGE_SERVER_SENTRY_DSN"},
Value: "",
},
&cli.StringFlag{
Name: "sentry-environment",
EnvVars: []string{"STORAGE_SERVER_SENTRY_ENVIRONMENT"},
Value: "",
},
flag.PrivateKey, flag.PrivateKey,
flag.PrivateKeySigningAlgorithm, flag.PrivateKeySigningAlgorithm,
flag.PrivateKeyDefaultSize, flag.PrivateKeyDefaultSize,
@ -101,30 +89,6 @@ func Run() *cli.Command {
logger.SetLevel(logger.Level(logLevel)) logger.SetLevel(logger.Level(logLevel))
sentryDSN := ctx.String("sentry-dsn")
sentryEnvironment := ctx.String("sentry-environment")
if sentryDSN != "" {
if sentryEnvironment == "" {
sentryEnvironment, _ = os.Hostname()
}
err := sentry.Init(sentry.ClientOptions{
Dsn: sentryDSN,
Debug: logLevel == int(logger.LevelDebug),
AttachStacktrace: true,
Environment: sentryEnvironment,
})
if err != nil {
logger.Error(ctx.Context, "could not initialize sentry", logger.CapturedE(errors.WithStack(err)))
}
logger.SetCaptureFunc(func(err error) {
sentry.CaptureException(err)
})
defer sentry.Flush(2 * time.Second)
}
router := chi.NewRouter() router := chi.NewRouter()
privateKey, err := jwtutil.LoadOrGenerateKey( privateKey, err := jwtutil.LoadOrGenerateKey(
@ -240,7 +204,7 @@ func createStoreHandler(getStoreServer getRPCServerFunc, dsnPattern string, appI
server, err := getStoreServer(cacheSize, cacheTTL, tenant, appID, dsnPattern) server, err := getStoreServer(cacheSize, cacheTTL, tenant, appID, dsnPattern)
if err != nil { if err != nil {
logger.Error(r.Context(), "could not retrieve store server", logger.CapturedE(errors.WithStack(err)), logger.F("tenant", tenant)) logger.Error(r.Context(), "could not retrieve store server", logger.E(errors.WithStack(err)), logger.F("tenant", tenant))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -281,7 +245,7 @@ func authenticate(privateKey jwk.Key, signingAlgorithm jwa.SignatureAlgorithm) f
} }
}) })
if err != nil { if err != nil {
logger.Error(ctx, "could not create keyset accessor", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not create keyset accessor", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -291,7 +255,7 @@ func authenticate(privateKey jwk.Key, signingAlgorithm jwa.SignatureAlgorithm) f
jwtutil.FindTokenFromQueryString("token"), jwtutil.FindTokenFromQueryString("token"),
)) ))
if err != nil { if err != nil {
logger.Error(ctx, "could not find jwt token", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not find jwt token", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return return
@ -299,7 +263,7 @@ func authenticate(privateKey jwk.Key, signingAlgorithm jwa.SignatureAlgorithm) f
tokenMap, err := token.AsMap(ctx) tokenMap, err := token.AsMap(ctx)
if err != nil { if err != nil {
logger.Error(ctx, "could not transform token to map", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not transform token to map", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return return

13
go.mod
View File

@ -3,7 +3,6 @@ module forge.cadoles.com/arcad/edge
go 1.21 go 1.21
require ( require (
github.com/getsentry/sentry-go v0.25.0
github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/mdns v1.0.5 github.com/hashicorp/mdns v1.0.5
github.com/keegancsmith/rpc v1.3.0 github.com/keegancsmith/rpc v1.3.0
@ -16,11 +15,11 @@ require (
require ( require (
cloud.google.com/go v0.75.0 // indirect cloud.google.com/go v0.75.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/locales v0.12.1 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-playground/universal-translator v0.16.0 // indirect
github.com/goccy/go-json v0.9.11 // indirect github.com/goccy/go-json v0.9.11 // indirect
github.com/gogo/protobuf v0.0.0-20161014173244-50d1bd39ce4e // indirect github.com/gogo/protobuf v0.0.0-20161014173244-50d1bd39ce4e // indirect
github.com/leodido/go-urn v1.2.1 // indirect github.com/leodido/go-urn v1.1.0 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect github.com/lestrrat-go/blackmagic v1.0.1 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect github.com/lestrrat-go/httprc v1.0.4 // indirect
@ -52,8 +51,8 @@ require (
github.com/gorilla/websocket v1.4.2 // indirect github.com/gorilla/websocket v1.4.2 // indirect
github.com/igm/sockjs-go/v3 v3.0.2 github.com/igm/sockjs-go/v3 v3.0.2
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 github.com/mitchellh/mapstructure v1.5.0
github.com/oklog/ulid/v2 v2.1.0 github.com/oklog/ulid/v2 v2.1.0
github.com/orcaman/concurrent-map v1.0.0 github.com/orcaman/concurrent-map v1.0.0
@ -62,7 +61,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/urfave/cli/v2 v2.24.3 github.com/urfave/cli/v2 v2.24.3
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
gitlab.com/wpetit/goweb v0.0.0-20231019192040-4c72331a7648 gitlab.com/wpetit/goweb v0.0.0-20230419082146-a94d9ed7202b
go.opencensus.io v0.22.5 // indirect go.opencensus.io v0.22.5 // indirect
golang.org/x/crypto v0.10.0 golang.org/x/crypto v0.10.0
golang.org/x/mod v0.10.0 golang.org/x/mod v0.10.0

65
go.sum
View File

@ -101,20 +101,16 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q=
github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M=
github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI=
github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0=
github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc=
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rmGrCjJ8eAeUP/K/EKx4DM=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
@ -147,10 +143,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@ -163,9 +157,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@ -179,8 +171,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@ -224,8 +216,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80=
github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU=
github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=
@ -239,17 +231,14 @@ github.com/lestrrat-go/jwx/v2 v2.0.8/go.mod h1:zLxnyv9rTlEvOUHbc48FAfIL8iYu2hHvI
github.com/lestrrat-go/option v1.0.0 h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4= github.com/lestrrat-go/option v1.0.0 h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/miekg/dns v0.0.0-20161006100029-fc4e1e2843d8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v0.0.0-20161006100029-fc4e1e2843d8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw=
@ -264,9 +253,6 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@ -278,9 +264,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
@ -296,9 +281,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
@ -313,8 +297,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
gitlab.com/wpetit/goweb v0.0.0-20231019192040-4c72331a7648 h1:t2UQmCmUoElIBBuVTqxqo8DcTJA/exQ/Q7XycfLqCZo= gitlab.com/wpetit/goweb v0.0.0-20230419082146-a94d9ed7202b h1:nkvOl8TCj/mErADnwFFynjxBtC+hHsrESw6rw56JGmg=
gitlab.com/wpetit/goweb v0.0.0-20231019192040-4c72331a7648/go.mod h1:WdxGjM3HJWgBkUa4TwaTXUqY2BnRKlNSyUIv1aF4jxk= gitlab.com/wpetit/goweb v0.0.0-20230419082146-a94d9ed7202b/go.mod h1:3sus4zjoUv1GB7eDLL60QaPkUnXJCWBpjvbe0jWifeY=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@ -330,7 +314,6 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -366,7 +349,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20161013035702-8b4af36cd21a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20161013035702-8b4af36cd21a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -405,8 +387,6 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@ -429,7 +409,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -471,15 +450,11 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -491,8 +466,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -543,7 +516,6 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y=
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -637,11 +609,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM=
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@ -671,9 +640,7 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0=
modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
@ -687,11 +654,9 @@ modernc.org/sqlite v1.20.4/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34=
modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE=
modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE=
modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

View File

@ -13,7 +13,7 @@ import (
var ( var (
ErrFuncDoesNotExist = errors.New("function does not exist") ErrFuncDoesNotExist = errors.New("function does not exist")
ErrUnknownError = errors.New("unknown error") ErUnknownError = errors.New("unknown error")
) )
type Server struct { type Server struct {
@ -88,9 +88,9 @@ func (s *Server) Exec(ctx context.Context, callableOrFuncname any, args ...inter
if recovered := recover(); recovered != nil { if recovered := recover(); recovered != nil {
revoveredErr, ok := recovered.(error) revoveredErr, ok := recovered.(error)
if ok { if ok {
logger.Error(ctx, "recovered runtime error", logger.CapturedE(errors.WithStack(revoveredErr))) logger.Error(ctx, "recovered runtime error", logger.E(errors.WithStack(revoveredErr)))
err = errors.WithStack(ErrUnknownError) err = errors.WithStack(ErUnknownError)
return return
} }
@ -162,7 +162,7 @@ func (s *Server) WaitForPromise(promise *goja.Promise) goja.Value {
return value return value
} }
func (s *Server) Start(ctx context.Context) error { func (s *Server) Start() error {
s.loop.Start() s.loop.Start()
var err error var err error
@ -171,7 +171,7 @@ func (s *Server) Start(ctx context.Context) error {
rt.SetFieldNameMapper(goja.TagFieldNameMapper("goja", true)) rt.SetFieldNameMapper(goja.TagFieldNameMapper("goja", true))
rt.SetRandSource(createRandomSource()) rt.SetRandSource(createRandomSource())
if err = s.initModules(ctx, rt); err != nil { if err = s.initModules(rt); err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
} }
}) })
@ -186,7 +186,7 @@ func (s *Server) Stop() {
s.loop.Stop() s.loop.Stop()
} }
func (s *Server) initModules(ctx context.Context, rt *goja.Runtime) error { func (s *Server) initModules(rt *goja.Runtime) error {
modules := make([]ServerModule, 0, len(s.factories)) modules := make([]ServerModule, 0, len(s.factories))
for _, moduleFactory := range s.factories { for _, moduleFactory := range s.factories {
@ -206,9 +206,9 @@ func (s *Server) initModules(ctx context.Context, rt *goja.Runtime) error {
continue continue
} }
logger.Debug(ctx, "initializing module", logger.F("module", initMod.Name())) logger.Debug(context.Background(), "initializing module", logger.F("module", initMod.Name()))
if err := initMod.OnInit(ctx, rt); err != nil { if err := initMod.OnInit(rt); err != nil {
return errors.WithStack(err) return errors.WithStack(err)
} }
} }

View File

@ -1,8 +1,6 @@
package app package app
import ( import (
"context"
"github.com/dop251/goja" "github.com/dop251/goja"
) )
@ -15,5 +13,5 @@ type ServerModule interface {
type InitializableModule interface { type InitializableModule interface {
ServerModule ServerModule
OnInit(ctx context.Context, rt *goja.Runtime) error OnInit(rt *goja.Runtime) error
} }

View File

@ -40,6 +40,8 @@ func (fs *FileSystem) Open(name string) (http.File, error) {
return nil, err return nil, err
} }
logger.Error(ctx, "could not open bundle file", logger.E(err))
return nil, errors.Wrapf(err, "could not open bundle file '%s'", p) return nil, errors.Wrapf(err, "could not open bundle file '%s'", p)
} }
defer readCloser.Close() defer readCloser.Close()
@ -51,6 +53,8 @@ func (fs *FileSystem) Open(name string) (http.File, error) {
if fileInfo.IsDir() { if fileInfo.IsDir() {
files, err := fs.bundle.Dir(p) files, err := fs.bundle.Dir(p)
if err != nil { if err != nil {
logger.Error(ctx, "could not read bundle directory", logger.E(err))
return nil, errors.Wrapf(err, "could not read bundle directory '%s'", p) return nil, errors.Wrapf(err, "could not read bundle directory '%s'", p)
} }
@ -58,7 +62,7 @@ func (fs *FileSystem) Open(name string) (http.File, error) {
} else { } else {
data, err := io.ReadAll(readCloser) data, err := io.ReadAll(readCloser)
if err != nil { if err != nil {
logger.Error(ctx, "could not read bundle file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not read bundle file", logger.E(err))
return nil, errors.Wrapf(err, "could not read bundle file '%s'", p) return nil, errors.Wrapf(err, "could not read bundle file '%s'", p)
} }

View File

@ -149,7 +149,7 @@ func (d *eventDispatcher) Run(ctx context.Context) {
ctx, ctx,
"message subscription context canceled", "message subscription context canceled",
logger.F("message", msg), logger.F("message", msg),
logger.CapturedE(errors.WithStack(ctx.Err())), logger.E(errors.WithStack(ctx.Err())),
) )
return return

View File

@ -39,7 +39,7 @@ func (h *Handler) handleAppUpload(w http.ResponseWriter, r *http.Request) {
r.Body = http.MaxBytesReader(w, r.Body, h.uploadMaxFileSize) r.Body = http.MaxBytesReader(w, r.Body, h.uploadMaxFileSize)
if err := r.ParseMultipartForm(h.uploadMaxFileSize); err != nil { if err := r.ParseMultipartForm(h.uploadMaxFileSize); err != nil {
logger.Error(ctx, "could not parse multipart form", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not parse multipart form", logger.E(errors.WithStack(err)))
jsonError(w, http.StatusBadRequest, errorCodeBadRequest) jsonError(w, http.StatusBadRequest, errorCodeBadRequest)
return return
@ -47,7 +47,7 @@ func (h *Handler) handleAppUpload(w http.ResponseWriter, r *http.Request) {
_, fileHeader, err := r.FormFile("file") _, fileHeader, err := r.FormFile("file")
if err != nil { if err != nil {
logger.Error(ctx, "could not read form file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not read form file", logger.E(errors.WithStack(err)))
jsonError(w, http.StatusBadRequest, errorCodeBadRequest) jsonError(w, http.StatusBadRequest, errorCodeBadRequest)
return return
@ -58,7 +58,7 @@ func (h *Handler) handleAppUpload(w http.ResponseWriter, r *http.Request) {
rawMetadata := r.Form.Get("metadata") rawMetadata := r.Form.Get("metadata")
if rawMetadata != "" { if rawMetadata != "" {
if err := json.Unmarshal([]byte(rawMetadata), &metadata); err != nil { if err := json.Unmarshal([]byte(rawMetadata), &metadata); err != nil {
logger.Error(ctx, "could not parse metadata", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not parse metadata", logger.E(errors.WithStack(err)))
jsonError(w, http.StatusBadRequest, errorCodeBadRequest) jsonError(w, http.StatusBadRequest, errorCodeBadRequest)
return return
@ -73,7 +73,7 @@ func (h *Handler) handleAppUpload(w http.ResponseWriter, r *http.Request) {
reply, err := h.bus.Request(ctx, requestMsg) reply, err := h.bus.Request(ctx, requestMsg)
if err != nil { if err != nil {
logger.Error(ctx, "could not retrieve file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve file", logger.E(errors.WithStack(err)))
jsonError(w, http.StatusInternalServerError, errorCodeInternalError) jsonError(w, http.StatusInternalServerError, errorCodeInternalError)
return return
@ -125,7 +125,7 @@ func (h *Handler) handleAppDownload(w http.ResponseWriter, r *http.Request) {
reply, err := h.bus.Request(ctx, requestMsg) reply, err := h.bus.Request(ctx, requestMsg)
if err != nil { if err != nil {
logger.Error(ctx, "could not retrieve file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve file", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -135,7 +135,7 @@ func (h *Handler) handleAppDownload(w http.ResponseWriter, r *http.Request) {
if !ok { if !ok {
logger.Error( logger.Error(
ctx, "unexpected download response message", ctx, "unexpected download response message",
logger.CapturedE(errors.WithStack(bus.ErrUnexpectedMessage)), logger.E(errors.WithStack(bus.ErrUnexpectedMessage)),
logger.F("message", reply), logger.F("message", reply),
) )
jsonError(w, http.StatusInternalServerError, errorCodeInternalError) jsonError(w, http.StatusInternalServerError, errorCodeInternalError)
@ -157,7 +157,7 @@ func (h *Handler) handleAppDownload(w http.ResponseWriter, r *http.Request) {
defer func() { defer func() {
if err := replyMsg.Blob.Close(); err != nil { if err := replyMsg.Blob.Close(); err != nil {
logger.Error(ctx, "could not close blob", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close blob", logger.E(errors.WithStack(err)))
} }
}() }()
@ -175,7 +175,7 @@ func serveFile(w http.ResponseWriter, r *http.Request, fs fs.FS, path string) {
return return
} }
logger.Error(ctx, "error while opening fs file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error while opening fs file", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -183,13 +183,13 @@ func serveFile(w http.ResponseWriter, r *http.Request, fs fs.FS, path string) {
defer func() { defer func() {
if err := file.Close(); err != nil { if err := file.Close(); err != nil {
logger.Error(ctx, "error while closing fs file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error while closing fs file", logger.E(errors.WithStack(err)))
} }
}() }()
info, err := file.Stat() info, err := file.Stat()
if err != nil { if err != nil {
logger.Error(ctx, "error while retrieving fs file stat", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error while retrieving fs file stat", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return

View File

@ -34,7 +34,7 @@ func (h *Handler) handleAppFetch(w http.ResponseWriter, r *http.Request) {
reply, err := h.bus.Request(ctx, requestMsg) reply, err := h.bus.Request(ctx, requestMsg)
if err != nil { if err != nil {
logger.Error(ctx, "could not retrieve fetch request reply", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve fetch request reply", logger.E(errors.WithStack(err)))
jsonError(w, http.StatusInternalServerError, errorCodeInternalError) jsonError(w, http.StatusInternalServerError, errorCodeInternalError)
return return
@ -63,7 +63,7 @@ func (h *Handler) handleAppFetch(w http.ResponseWriter, r *http.Request) {
if err != nil { if err != nil {
logger.Error( logger.Error(
ctx, "could not create proxy request", ctx, "could not create proxy request",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
jsonError(w, http.StatusInternalServerError, errorCodeInternalError) jsonError(w, http.StatusInternalServerError, errorCodeInternalError)
@ -82,7 +82,7 @@ func (h *Handler) handleAppFetch(w http.ResponseWriter, r *http.Request) {
if err != nil { if err != nil {
logger.Error( logger.Error(
ctx, "could not execute proxy request", ctx, "could not execute proxy request",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
jsonError(w, http.StatusInternalServerError, errorCodeInternalError) jsonError(w, http.StatusInternalServerError, errorCodeInternalError)
@ -93,7 +93,7 @@ func (h *Handler) handleAppFetch(w http.ResponseWriter, r *http.Request) {
if err := res.Body.Close(); err != nil { if err := res.Body.Close(); err != nil {
logger.Error( logger.Error(
ctx, "could not close response body", ctx, "could not close response body",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
} }
}() }()

View File

@ -1,8 +1,7 @@
package http package http
import ( import (
"context" "io/ioutil"
"io"
"net/http" "net/http"
"sync" "sync"
@ -41,7 +40,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.router.ServeHTTP(w, r) h.router.ServeHTTP(w, r)
} }
func (h *Handler) Load(ctx context.Context, bdle bundle.Bundle) error { func (h *Handler) Load(bdle bundle.Bundle) error {
h.mutex.Lock() h.mutex.Lock()
defer h.mutex.Unlock() defer h.mutex.Unlock()
@ -50,7 +49,7 @@ func (h *Handler) Load(ctx context.Context, bdle bundle.Bundle) error {
return errors.Wrap(err, "could not open server main script") return errors.Wrap(err, "could not open server main script")
} }
mainScript, err := io.ReadAll(file) mainScript, err := ioutil.ReadAll(file)
if err != nil { if err != nil {
return errors.Wrap(err, "could not read server main script") return errors.Wrap(err, "could not read server main script")
} }
@ -69,7 +68,7 @@ func (h *Handler) Load(ctx context.Context, bdle bundle.Bundle) error {
h.server.Stop() h.server.Stop()
} }
if err := server.Start(ctx); err != nil { if err := server.Start(); err != nil {
return errors.WithStack(err) return errors.WithStack(err)
} }

View File

@ -30,7 +30,7 @@ func HTML5Fileserver(fs http.FileSystem) http.Handler {
return return
} }
logger.Error(r.Context(), "could not open bundle file", logger.CapturedE(err)) logger.Error(r.Context(), "could not open bundle file", logger.E(err))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -38,7 +38,7 @@ func HTML5Fileserver(fs http.FileSystem) http.Handler {
defer func() { defer func() {
if err := file.Close(); err != nil { if err := file.Close(); err != nil {
logger.Error(r.Context(), "could not close file", logger.CapturedE(err)) logger.Error(r.Context(), "could not close file", logger.E(err))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)

View File

@ -37,7 +37,7 @@ func (h *Handler) handleSockJSSession(sess sockjs.Session) {
defer func() { defer func() {
if sess.GetSessionState() == sockjs.SessionActive { if sess.GetSessionState() == sockjs.SessionActive {
if err := sess.Close(statusChannelClosed, "channel closed"); err != nil { if err := sess.Close(statusChannelClosed, "channel closed"); err != nil {
logger.Error(ctx, "could not close sockjs session", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close sockjs session", logger.E(errors.WithStack(err)))
} }
} }
}() }()
@ -63,7 +63,7 @@ func (h *Handler) handleServerMessages(ctx context.Context, sess sockjs.Session)
} }
if err := sess.Close(statusChannelClosed, "channel closed"); err != nil { if err := sess.Close(statusChannelClosed, "channel closed"); err != nil {
logger.Error(ctx, "could not close sockjs session", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close sockjs session", logger.E(errors.WithStack(err)))
} }
}() }()
@ -96,7 +96,7 @@ func (h *Handler) handleServerMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not encode message", "could not encode message",
logger.CapturedE(errors.WithStack(err)), logger.E(err),
) )
continue continue
@ -112,7 +112,7 @@ func (h *Handler) handleServerMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not encode message", "could not encode message",
logger.CapturedE(errors.WithStack(err)), logger.E(err),
) )
continue continue
@ -125,7 +125,7 @@ func (h *Handler) handleServerMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not send message", "could not send message",
logger.CapturedE(errors.WithStack(err)), logger.E(err),
) )
} }
} }
@ -152,7 +152,7 @@ func (h *Handler) handleClientMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not read message", "could not read message",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
break break
@ -165,7 +165,7 @@ func (h *Handler) handleClientMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not decode message", "could not decode message",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
break break
@ -179,7 +179,7 @@ func (h *Handler) handleClientMessages(ctx context.Context, sess sockjs.Session)
logger.Error( logger.Error(
ctx, ctx,
"could not decode payload", "could not decode payload",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
) )
return return
@ -197,7 +197,7 @@ func (h *Handler) handleClientMessages(ctx context.Context, sess sockjs.Session)
if err := h.bus.Publish(ctx, clientMessage); err != nil { if err := h.bus.Publish(ctx, clientMessage); err != nil {
logger.Error(ctx, "could not publish message", logger.Error(ctx, "could not publish message",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("message", clientMessage), logger.F("message", clientMessage),
) )

View File

@ -3,7 +3,7 @@ package memory
import ( import (
"context" "context"
"fmt" "fmt"
"os" "io/ioutil"
"testing" "testing"
"forge.cadoles.com/arcad/edge/pkg/app" "forge.cadoles.com/arcad/edge/pkg/app"
@ -41,7 +41,7 @@ func TestAppModuleWithMemoryRepository(t *testing.T) {
file := "testdata/app.js" file := "testdata/app.js"
data, err := os.ReadFile(file) data, err := ioutil.ReadFile(file)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -52,8 +52,7 @@ func TestAppModuleWithMemoryRepository(t *testing.T) {
defer server.Stop() defer server.Stop()
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
} }

View File

@ -20,7 +20,7 @@ type Handler struct {
func (h *Handler) serveApps(w http.ResponseWriter, r *http.Request) { func (h *Handler) serveApps(w http.ResponseWriter, r *http.Request) {
manifests, err := h.repo.List(r.Context()) manifests, err := h.repo.List(r.Context())
if err != nil { if err != nil {
logger.Error(r.Context(), "could not retrieve app manifest", logger.CapturedE(errors.WithStack(err))) logger.Error(r.Context(), "could not retrieve app manifest", logger.E(errors.WithStack(err)))
api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil) api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil)
return return
@ -44,7 +44,7 @@ func (h *Handler) serveApp(w http.ResponseWriter, r *http.Request) {
return return
} }
logger.Error(r.Context(), "could not retrieve app manifest", logger.CapturedE(errors.WithStack(err))) logger.Error(r.Context(), "could not retrieve app manifest", logger.E(errors.WithStack(err)))
api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil) api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil)
return return
@ -84,7 +84,7 @@ func (h *Handler) serveAppURL(w http.ResponseWriter, r *http.Request) {
return return
} }
logger.Error(r.Context(), "could not retrieve app url", logger.CapturedE(errors.WithStack(err))) logger.Error(r.Context(), "could not retrieve app url", logger.E(errors.WithStack(err)))
api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil) api.ErrorResponse(w, http.StatusInternalServerError, api.ErrCodeUnknownError, nil)
return return

View File

@ -69,7 +69,7 @@ func (h *LocalHandler) serveForm(w http.ResponseWriter, r *http.Request) {
} }
if err := loginTemplate.Execute(w, data); err != nil { if err := loginTemplate.Execute(w, data); err != nil {
logger.Error(ctx, "could not execute login page template", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not execute login page template", logger.E(errors.WithStack(err)))
} }
} }
@ -77,7 +77,7 @@ func (h *LocalHandler) handleForm(w http.ResponseWriter, r *http.Request) {
ctx := r.Context() ctx := r.Context()
if err := r.ParseForm(); err != nil { if err := r.ParseForm(); err != nil {
logger.Error(ctx, "could not parse form", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not parse form", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest) http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return return
@ -99,13 +99,13 @@ func (h *LocalHandler) handleForm(w http.ResponseWriter, r *http.Request) {
data.Message = "Invalid username or password." data.Message = "Invalid username or password."
if err := loginTemplate.Execute(w, data); err != nil { if err := loginTemplate.Execute(w, data); err != nil {
logger.Error(ctx, "could not execute login page template", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not execute login page template", logger.E(errors.WithStack(err)))
} }
return return
} }
logger.Error(ctx, "could not authenticate account", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not authenticate account", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -115,7 +115,7 @@ func (h *LocalHandler) handleForm(w http.ResponseWriter, r *http.Request) {
token, err := jwtutil.SignedToken(h.key, h.signingAlgorithm, account.Claims) token, err := jwtutil.SignedToken(h.key, h.signingAlgorithm, account.Claims)
if err != nil { if err != nil {
logger.Error(ctx, "could not generate signed token", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not generate signed token", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -123,7 +123,7 @@ func (h *LocalHandler) handleForm(w http.ResponseWriter, r *http.Request) {
cookieDomain, err := h.getCookieDomain(r) cookieDomain, err := h.getCookieDomain(r)
if err != nil { if err != nil {
logger.Error(ctx, "could not retrieve cookie domain", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve cookie domain", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -146,7 +146,7 @@ func (h *LocalHandler) handleForm(w http.ResponseWriter, r *http.Request) {
func (h *LocalHandler) handleLogout(w http.ResponseWriter, r *http.Request) { func (h *LocalHandler) handleLogout(w http.ResponseWriter, r *http.Request) {
cookieDomain, err := h.getCookieDomain(r) cookieDomain, err := h.getCookieDomain(r)
if err != nil { if err != nil {
logger.Error(r.Context(), "could not retrieve cookie domain", logger.CapturedE(errors.WithStack(err))) logger.Error(r.Context(), "could not retrieve cookie domain", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return

View File

@ -42,7 +42,7 @@ func AnonymousUser(key jwk.Key, signingAlgorithm jwa.SignatureAlgorithm, funcs .
uuid, err := uuid.NewUUID() uuid, err := uuid.NewUUID()
if err != nil { if err != nil {
logger.Error(ctx, "could not generate uuid for anonymous user", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not generate uuid for anonymous user", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -51,7 +51,7 @@ func AnonymousUser(key jwk.Key, signingAlgorithm jwa.SignatureAlgorithm, funcs .
subject := fmt.Sprintf("%s-%s", AnonIssuer, uuid.String()) subject := fmt.Sprintf("%s-%s", AnonIssuer, uuid.String())
preferredUsername, err := generateRandomPreferredUsername(8) preferredUsername, err := generateRandomPreferredUsername(8)
if err != nil { if err != nil {
logger.Error(ctx, "could not generate preferred username for anonymous user", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not generate preferred username for anonymous user", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -68,7 +68,7 @@ func AnonymousUser(key jwk.Key, signingAlgorithm jwa.SignatureAlgorithm, funcs .
token, err := jwtutil.SignedToken(key, signingAlgorithm, claims) token, err := jwtutil.SignedToken(key, signingAlgorithm, claims)
if err != nil { if err != nil {
logger.Error(ctx, "could not generate signed token", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not generate signed token", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return
@ -76,7 +76,7 @@ func AnonymousUser(key jwk.Key, signingAlgorithm jwa.SignatureAlgorithm, funcs .
cookieDomain, err := opts.GetCookieDomain(r) cookieDomain, err := opts.GetCookieDomain(r)
if err != nil { if err != nil {
logger.Error(ctx, "could not retrieve cookie domain", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve cookie domain", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return return

View File

@ -79,7 +79,7 @@ func (m *Module) getClaim(call goja.FunctionCall, rt *goja.Runtime) goja.Value {
return nil return nil
} }
logger.Error(ctx, "could not retrieve claim", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve claim", logger.E(errors.WithStack(err)))
return nil return nil
} }

View File

@ -42,8 +42,7 @@ func TestAuthModule(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
@ -71,7 +70,7 @@ func TestAuthModule(t *testing.T) {
req.Header.Add("Authorization", "Bearer "+string(rawToken)) req.Header.Add("Authorization", "Bearer "+string(rawToken))
ctx = context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req) ctx := context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req)
if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil { if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
@ -99,8 +98,7 @@ func TestAuthAnonymousModule(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
@ -111,7 +109,7 @@ func TestAuthAnonymousModule(t *testing.T) {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
ctx = context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req) ctx := context.WithValue(context.Background(), edgeHTTP.ContextKeyOriginRequest, req)
if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil { if _, err := server.ExecFuncByName(ctx, "testAuth", ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))

View File

@ -35,7 +35,7 @@ func (h *Handler) serveProfile(w http.ResponseWriter, r *http.Request) {
return return
} }
logger.Error(ctx, "could not retrieve claims", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not retrieve claims", logger.E(errors.WithStack(err)))
api.ErrorResponse( api.ErrorResponse(
w, http.StatusInternalServerError, w, http.StatusInternalServerError,
api.ErrCodeUnknownError, api.ErrCodeUnknownError,

View File

@ -95,7 +95,7 @@ func (m *Module) writeBlob(call goja.FunctionCall, rt *goja.Runtime) goja.Value
defer func() { defer func() {
if err := bucket.Close(); err != nil { if err := bucket.Close(); err != nil {
logger.Error(ctx, "could not close bucket", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close bucket", logger.E(errors.WithStack(err)))
} }
}() }()
@ -106,7 +106,7 @@ func (m *Module) writeBlob(call goja.FunctionCall, rt *goja.Runtime) goja.Value
defer func() { defer func() {
if err := writer.Close(); err != nil && !errors.Is(err, os.ErrClosed) { if err := writer.Close(); err != nil && !errors.Is(err, os.ErrClosed) {
logger.Error(ctx, "could not close blob writer", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close blob writer", logger.E(errors.WithStack(err)))
} }
}() }()
@ -129,7 +129,7 @@ func (m *Module) getBlobInfo(call goja.FunctionCall, rt *goja.Runtime) goja.Valu
defer func() { defer func() {
if err := bucket.Close(); err != nil { if err := bucket.Close(); err != nil {
logger.Error(ctx, "could not close bucket", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close bucket", logger.E(errors.WithStack(err)))
} }
}() }()
@ -153,7 +153,7 @@ func (m *Module) readBlob(call goja.FunctionCall, rt *goja.Runtime) goja.Value {
defer func() { defer func() {
if err := reader.Close(); err != nil && !errors.Is(err, os.ErrClosed) { if err := reader.Close(); err != nil && !errors.Is(err, os.ErrClosed) {
logger.Error(ctx, "could not close blob reader", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close blob reader", logger.E(errors.WithStack(err)))
} }
}() }()
@ -245,7 +245,7 @@ func (m *Module) handleMessages() {
res, err := m.handleUploadRequest(uploadRequest) res, err := m.handleUploadRequest(uploadRequest)
if err != nil { if err != nil {
logger.Error(ctx, "could not handle upload request", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not handle upload request", logger.E(errors.WithStack(err)))
return nil, errors.WithStack(err) return nil, errors.WithStack(err)
} }
@ -267,7 +267,7 @@ func (m *Module) handleMessages() {
res, err := m.handleDownloadRequest(downloadRequest) res, err := m.handleDownloadRequest(downloadRequest)
if err != nil { if err != nil {
logger.Error(ctx, "could not handle download request", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not handle download request", logger.E(errors.WithStack(err)))
return nil, errors.WithStack(err) return nil, errors.WithStack(err)
} }
@ -354,7 +354,7 @@ func (m *Module) saveBlob(ctx context.Context, bucketName string, blobID storage
defer func() { defer func() {
if err := file.Close(); err != nil { if err := file.Close(); err != nil {
logger.Error(ctx, "could not close file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close file", logger.E(errors.WithStack(err)))
} }
}() }()
@ -365,7 +365,7 @@ func (m *Module) saveBlob(ctx context.Context, bucketName string, blobID storage
defer func() { defer func() {
if err := bucket.Close(); err != nil { if err := bucket.Close(); err != nil {
logger.Error(ctx, "could not close bucket", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close bucket", logger.E(errors.WithStack(err)))
} }
}() }()
@ -376,13 +376,13 @@ func (m *Module) saveBlob(ctx context.Context, bucketName string, blobID storage
defer func() { defer func() {
if err := file.Close(); err != nil { if err := file.Close(); err != nil {
logger.Error(ctx, "could not close file", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close file", logger.E(errors.WithStack(err)))
} }
}() }()
defer func() { defer func() {
if err := writer.Close(); err != nil { if err := writer.Close(); err != nil {
logger.Error(ctx, "could not close writer", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close writer", logger.E(errors.WithStack(err)))
} }
}() }()
@ -453,7 +453,7 @@ func (m *Module) openBlob(ctx context.Context, bucketName string, blobID storage
defer func() { defer func() {
if err := bucket.Close(); err != nil { if err := bucket.Close(); err != nil {
logger.Error(ctx, "could not close bucket", logger.CapturedE(errors.WithStack(err)), logger.F("bucket", bucket)) logger.Error(ctx, "could not close bucket", logger.E(errors.WithStack(err)), logger.F("bucket", bucket))
} }
}() }()

View File

@ -1,7 +1,6 @@
package blob package blob
import ( import (
"context"
"os" "os"
"testing" "testing"
@ -39,8 +38,7 @@ func TestBlobModule(t *testing.T) {
defer server.Stop() defer server.Stop()
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
} }

View File

@ -148,7 +148,7 @@ func SearchDevices(ctx context.Context) (chan Device, error) {
defer searchDevicesMutex.Unlock() defer searchDevicesMutex.Unlock()
if err := service.Run(ctx, serviceDiscoveryPollingInterval); err != nil && !errors.Is(err, context.DeadlineExceeded) { if err := service.Run(ctx, serviceDiscoveryPollingInterval); err != nil && !errors.Is(err, context.DeadlineExceeded) {
logger.Error(ctx, "error while running cast service discovery", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error while running cast service discovery", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -71,7 +71,7 @@ func (d *Service) Run(ctx context.Context, interval time.Duration) error {
logger.Error( logger.Error(
ctx, "could not poll interface", ctx, "could not poll interface",
logger.CapturedE(errors.WithStack(err)), logger.F("iface", iface.Name), logger.E(errors.WithStack(err)), logger.F("iface", iface.Name),
) )
} }
}(pollCtx, iface) }(pollCtx, iface)

View File

@ -60,7 +60,7 @@ func (m *Module) refreshDevices(call goja.FunctionCall, rt *goja.Runtime) goja.V
devices, err := ListDevices(ctx, true) devices, err := ListDevices(ctx, true)
if err != nil { if err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
logger.Error(ctx, "error refreshing casting devices list", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error refreshing casting devices list", logger.E(errors.WithStack(err)))
promise.Reject(err) promise.Reject(err)
@ -108,7 +108,7 @@ func (m *Module) loadUrl(call goja.FunctionCall, rt *goja.Runtime) goja.Value {
err := LoadURL(ctx, deviceUUID, url) err := LoadURL(ctx, deviceUUID, url)
if err != nil { if err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
logger.Error(ctx, "error while casting url", logger.CapturedE(err)) logger.Error(ctx, "error while casting url", logger.E(err))
promise.Reject(err) promise.Reject(err)
@ -143,7 +143,7 @@ func (m *Module) stopCast(call goja.FunctionCall, rt *goja.Runtime) goja.Value {
err := StopCast(ctx, deviceUUID) err := StopCast(ctx, deviceUUID)
if err != nil { if err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
logger.Error(ctx, "error while quitting casting device app", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "error while quitting casting device app", logger.E(errors.WithStack(err)))
promise.Reject(err) promise.Reject(err)
@ -178,7 +178,7 @@ func (m *Module) getStatus(call goja.FunctionCall, rt *goja.Runtime) goja.Value
status, err := getStatus(ctx, deviceUUID) status, err := getStatus(ctx, deviceUUID)
if err != nil { if err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
logger.Error(ctx, "error while getting casting device status", logger.CapturedE(err)) logger.Error(ctx, "error while getting casting device status", logger.E(err))
promise.Reject(err) promise.Reject(err)

View File

@ -40,8 +40,7 @@ func TestCastModule(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
@ -75,8 +74,7 @@ func TestCastModuleRefreshDevices(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }

View File

@ -48,7 +48,7 @@ func (m *Module) handleMessages() {
res, err := m.handleFetchRequest(fetchRequest) res, err := m.handleFetchRequest(fetchRequest)
if err != nil { if err != nil {
logger.Error(ctx, "could not handle fetch request", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not handle fetch request", logger.E(errors.WithStack(err)))
return nil, errors.WithStack(err) return nil, errors.WithStack(err)
} }

View File

@ -39,8 +39,7 @@ func TestFetchModule(t *testing.T) {
defer server.Stop() defer server.Stop()
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }

View File

@ -18,10 +18,10 @@ func (m *LifecycleModule) Name() string {
func (m *LifecycleModule) Export(export *goja.Object) { func (m *LifecycleModule) Export(export *goja.Object) {
} }
func (m *LifecycleModule) OnInit(ctx context.Context, rt *goja.Runtime) (err error) { func (m *LifecycleModule) OnInit(rt *goja.Runtime) (err error) {
call, ok := goja.AssertFunction(rt.Get("onInit")) call, ok := goja.AssertFunction(rt.Get("onInit"))
if !ok { if !ok {
logger.Warn(ctx, "could not find onInit() function") logger.Warn(context.Background(), "could not find onInit() function")
return nil return nil
} }
@ -30,9 +30,9 @@ func (m *LifecycleModule) OnInit(ctx context.Context, rt *goja.Runtime) (err err
if recovered := recover(); recovered != nil { if recovered := recover(); recovered != nil {
revoveredErr, ok := recovered.(error) revoveredErr, ok := recovered.(error)
if ok { if ok {
logger.Error(ctx, "recovered runtime error", logger.CapturedE(errors.WithStack(revoveredErr))) logger.Error(context.Background(), "recovered runtime error", logger.E(errors.WithStack(revoveredErr)))
err = errors.WithStack(app.ErrUnknownError) err = errors.WithStack(app.ErUnknownError)
return return
} }

View File

@ -138,7 +138,7 @@ func (m *Module) handleClientMessages() {
logger.Error( logger.Error(
ctx, ctx,
"on client message error", "on client message error",
logger.CapturedE(errors.WithStack(err)), logger.E(err),
) )
} }
} }

View File

@ -51,8 +51,8 @@ func (m *RPCModule) Export(export *goja.Object) {
} }
} }
func (m *RPCModule) OnInit(ctx context.Context, rt *goja.Runtime) error { func (m *RPCModule) OnInit(rt *goja.Runtime) error {
go m.handleMessages(ctx) go m.handleMessages()
return nil return nil
} }
@ -92,7 +92,9 @@ func (m *RPCModule) unregister(call goja.FunctionCall, rt *goja.Runtime) goja.Va
return nil return nil
} }
func (m *RPCModule) handleMessages(ctx context.Context) { func (m *RPCModule) handleMessages() {
ctx := context.Background()
clientMessages, err := m.bus.Subscribe(ctx, MessageNamespaceClient) clientMessages, err := m.bus.Subscribe(ctx, MessageNamespaceClient)
if err != nil { if err != nil {
panic(errors.WithStack(err)) panic(errors.WithStack(err))
@ -113,7 +115,7 @@ func (m *RPCModule) handleMessages(ctx context.Context) {
if err := m.sendResponse(ctx, res); err != nil { if err := m.sendResponse(ctx, res); err != nil {
logger.Error( logger.Error(
ctx, "could not send response", ctx, "could not send response",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("response", res), logger.F("response", res),
logger.F("request", req), logger.F("request", req),
) )
@ -147,7 +149,7 @@ func (m *RPCModule) handleMessage(ctx context.Context, msg bus.Message, sendRes
if err := m.sendMethodNotFoundResponse(clientMessage.Context, req); err != nil { if err := m.sendMethodNotFoundResponse(clientMessage.Context, req); err != nil {
logger.Error( logger.Error(
ctx, "could not send method not found response", ctx, "could not send method not found response",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("request", req), logger.F("request", req),
) )
} }
@ -162,7 +164,7 @@ func (m *RPCModule) handleMessage(ctx context.Context, msg bus.Message, sendRes
if err := m.sendMethodNotFoundResponse(clientMessage.Context, req); err != nil { if err := m.sendMethodNotFoundResponse(clientMessage.Context, req); err != nil {
logger.Error( logger.Error(
ctx, "could not send method not found response", ctx, "could not send method not found response",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("request", req), logger.F("request", req),
) )
} }
@ -174,14 +176,14 @@ func (m *RPCModule) handleMessage(ctx context.Context, msg bus.Message, sendRes
if err != nil { if err != nil {
logger.Error( logger.Error(
ctx, "rpc call error", ctx, "rpc call error",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("request", req), logger.F("request", req),
) )
if err := m.sendErrorResponse(clientMessage.Context, req, err); err != nil { if err := m.sendErrorResponse(clientMessage.Context, req, err); err != nil {
logger.Error( logger.Error(
ctx, "could not send error response", ctx, "could not send error response",
logger.CapturedE(errors.WithStack(err)), logger.E(errors.WithStack(err)),
logger.F("originalError", err), logger.F("originalError", err),
logger.F("request", req), logger.F("request", req),
) )

View File

@ -37,8 +37,7 @@ func TestModule(t *testing.T) {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }

View File

@ -31,8 +31,7 @@ func TestStoreModule(t *testing.T) {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }
ctx := context.Background() if err := server.Start(); err != nil {
if err := server.Start(ctx); err != nil {
t.Fatalf("%+v", errors.WithStack(err)) t.Fatalf("%+v", errors.WithStack(err))
} }

View File

@ -83,7 +83,7 @@ func (s *BlobStore) withClient(ctx context.Context, fn func(ctx context.Context,
defer func() { defer func() {
if err := client.Close(); err != nil { if err := client.Close(); err != nil {
logger.Error(ctx, "could not close rpc client", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rpc client", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -116,7 +116,7 @@ func (s *DocumentStore) withClient(ctx context.Context, fn func(ctx context.Cont
defer func() { defer func() {
if err := client.Close(); err != nil { if err := client.Close(); err != nil {
logger.Error(ctx, "could not close rpc client", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rpc client", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -132,7 +132,7 @@ func (s *ShareStore) withClient(ctx context.Context, fn func(ctx context.Context
defer func() { defer func() {
if err := client.Close(); err != nil { if err := client.Close(); err != nil {
logger.Error(ctx, "could not close rpc client", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rpc client", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -153,7 +153,7 @@ func (b *BlobBucket) List(ctx context.Context) ([]storage.BlobInfo, error) {
defer func() { defer func() {
if err := rows.Close(); err != nil { if err := rows.Close(); err != nil {
logger.Error(ctx, "could not close rows", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rows", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -44,7 +44,7 @@ func (s *BlobStore) ListBuckets(ctx context.Context) ([]string, error) {
defer func() { defer func() {
if err := rows.Close(); err != nil { if err := rows.Close(); err != nil {
logger.Error(ctx, "could not close rows", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rows", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -162,7 +162,7 @@ func (s *DocumentStore) Query(ctx context.Context, collection string, filter *fi
defer func() { defer func() {
if err := rows.Close(); err != nil { if err := rows.Close(); err != nil {
logger.Error(ctx, "could not close rows", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rows", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -162,7 +162,7 @@ func (s *ShareStore) FindResources(ctx context.Context, funcs ...share.FindResou
defer func() { defer func() {
if err := rows.Close(); err != nil { if err := rows.Close(); err != nil {
logger.Error(ctx, "could not close rows", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rows", logger.E(errors.WithStack(err)))
} }
}() }()
@ -264,7 +264,7 @@ func (s *ShareStore) UpdateAttributes(ctx context.Context, origin app.ID, resour
defer func() { defer func() {
if err := stmt.Close(); err != nil { if err := stmt.Close(); err != nil {
logger.Error(ctx, "could not close statement", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close statement", logger.E(errors.WithStack(err)))
} }
}() }()
@ -316,7 +316,7 @@ func (s *ShareStore) getResourceWithinTx(ctx context.Context, tx *sql.Tx, origin
defer func() { defer func() {
if err := rows.Close(); err != nil { if err := rows.Close(); err != nil {
logger.Error(ctx, "could not close rows", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not close rows", logger.E(errors.WithStack(err)))
} }
}() }()

View File

@ -48,7 +48,7 @@ func WithTx(ctx context.Context, db *sql.DB, fn func(tx *sql.Tx) error) error {
logger.Warn(ctx, "database busy, retrying transaction") logger.Warn(ctx, "database busy, retrying transaction")
if err := ctx.Err(); err != nil { if err := ctx.Err(); err != nil {
logger.Error(ctx, "could not execute transaction", logger.CapturedE(errors.WithStack(err))) logger.Error(ctx, "could not execute transaction", logger.E(errors.WithStack(err)))
return errors.WithStack(err) return errors.WithStack(err)
} }

View File

@ -1,37 +0,0 @@
package filter
import (
"encoding/json"
"os"
"path/filepath"
"testing"
"github.com/pkg/errors"
)
func TestFilterFromJSON(t *testing.T) {
files, err := filepath.Glob("testdata/json/*.json")
if err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
for _, f := range files {
testName := filepath.Base(f)
t.Run(testName, func(t *testing.T) {
data, err := os.ReadFile(f)
if err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
var rawFilter map[string]any
if err := json.Unmarshal(data, &rawFilter); err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
if _, err := NewFrom(rawFilter); err != nil {
t.Fatalf("%+v", errors.WithStack(err))
}
})
}
}

View File

@ -1,52 +0,0 @@
{
"and": [
{
"and": [
{
"gt": {
"dateEnd": "2023-10-11T09:07:02.598Z"
}
},
{
"lt": {
"dateStart": "2023-10-11T09:07:02.598Z"
}
},
{
"eq": {
"enabled": true
}
}
]
},
{
"or": [
{
"eq": {
"_id": "01GV0WXF6BADGWGNWVDVXPP8WF"
}
},
{
"eq": {
"_id": "01HAVB47GM41XK2XRW1M2T3216"
}
},
{
"eq": {
"_id": "01GV0WXF6BADGWGNWVDVXPP8WF"
}
},
{
"eq": {
"_id": "01HAVB47GM41XK2XRW1M2T3216"
}
},
{
"eq": {
"_id": "01HC1X2K5F726F8FWZFB1WCAM4"
}
}
]
}
]
}