diff --git a/.gitignore b/.gitignore index 185696d..4e29ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ coverprofile.out # Development postgres data postgres-data + +# SRO config files +cmd/**/config.yaml diff --git a/Makefile b/Makefile index 6b33168..456b3be 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,8 @@ PROTO_FILES = $(shell find $(PROTO_DIR) -name '*.proto') MOCK_INTERFACES = $(shell egrep -rl --include="*.go" "type (\w*) interface {" $(ROOT_DIR)/pkg | sed "s/.go$$//") -CMDS = $(shell find $(ROOT_DIR)/cmd -maxdepth 1 -mindepth 1 -type d | sed "s/^.*\///") +ALL_CMDS = $(shell find $(ROOT_DIR)/cmd -maxdepth 1 -mindepth 1 -type d | sed "s/^.*\///") +CMDS = $(filter-out stressy, $(ALL_CMDS)) # _____ _ # |_ _| | | @@ -53,7 +54,11 @@ CMDS = $(shell find $(ROOT_DIR)/cmd -maxdepth 1 -mindepth 1 -type d | sed "s/^.* .PHONY: test report mocks clean-mocks report-watch test: - ginkgo --race -p --cover -covermode atomic -coverprofile=coverage.out --output-dir $(ROOT_DIR)/ $(ROOT_DIR)/... + ginkgo --race -p --cover -covermode atomic -coverprofile=coverage.out --output-dir $(ROOT_DIR)/ $(ROOT_DIR)/pkg/... + +test-e2e: + @echo "Starting e2e integration tests" + ginkgo --race -p $(ROOT_DIR)/test/e2e/... test-watch: ginkgo watch --race -p --cover -covermode atomic -output-dir=$(ROOT_DIR) $(ROOT_DIR)/... @@ -79,9 +84,11 @@ mocks: clean-mocks clean-mocks: rm -rf $(ROOT_DIR)/pkg/mocks -build: $(addprefix build-, $(CMDS)) +build: $(addprefix build-, $(CMDS)) buildclis build-%: go build -ldflags="-X 'github.com/ShatteredRealms/go-backend/pkg/config/default.Version=$(BASE_VERSION)'" -o $(ROOT_DIR)/bin/$* $(ROOT_DIR)/cmd/$* +buildclis: + go build -o $(ROOT_DIR)/bin/stressy $(ROOT_DIR)/cmd/stressy run: $(addprefix run-, $(CMDS)) run-%: diff --git a/build/character.Dockerfile b/build/character.Dockerfile index 7657533..ff9e1be 100644 --- a/build/character.Dockerfile +++ b/build/character.Dockerfile @@ -2,8 +2,10 @@ FROM golang:1.22 AS build WORKDIR /src ENV CGO_ENABLED=0 -COPY ./ ./ +COPY go.mod . +COPY go.sum . RUN go mod download +COPY . . ARG APP_VERSION=v0.0.1 RUN go build \ -ldflags="-X 'github.com/ShatteredRealms/go-backend/pkg/config/default.Version=${APP_VERSION}'" \ diff --git a/build/chat.Dockerfile b/build/chat.Dockerfile index 07bdf38..9d34542 100644 --- a/build/chat.Dockerfile +++ b/build/chat.Dockerfile @@ -2,8 +2,10 @@ FROM golang:1.22 AS build WORKDIR /src ENV CGO_ENABLED=0 -COPY ./ ./ +COPY go.mod . +COPY go.sum . RUN go mod download +COPY . . ARG APP_VERSION=v0.0.1 RUN go build \ -ldflags="-X 'github.com/ShatteredRealms/go-backend/pkg/config/default.Version=${APP_VERSION}'" \ diff --git a/build/gamebackend.Dockerfile b/build/gamebackend.Dockerfile index 77eb3bc..0a037e2 100644 --- a/build/gamebackend.Dockerfile +++ b/build/gamebackend.Dockerfile @@ -2,8 +2,10 @@ FROM golang:1.22 AS build WORKDIR /src ENV CGO_ENABLED=0 -COPY ./ ./ +COPY go.mod . +COPY go.sum . RUN go mod download +COPY . . ARG APP_VERSION=v0.0.1 RUN go build \ -ldflags="-X 'github.com/ShatteredRealms/go-backend/pkg/config/default.Version=${APP_VERSION}'" \ diff --git a/cmd/character/app/server.go b/cmd/character/app/server.go index e8a2c30..86a63f6 100644 --- a/cmd/character/app/server.go +++ b/cmd/character/app/server.go @@ -10,12 +10,13 @@ import ( "github.com/ShatteredRealms/go-backend/pkg/service" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" + "go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/trace" ) var ( - ServiceName = "characters" + ServiceName = "character" ) type CharactersServerContext struct { @@ -30,18 +31,22 @@ func NewServerContext(ctx context.Context, conf *config.GlobalConfig) *Character server := &CharactersServerContext{ GlobalConfig: conf, Tracer: otel.Tracer("CharactersService"), - KeycloakClient: gocloak.NewClient(conf.GameBackend.Keycloak.BaseURL), + KeycloakClient: gocloak.NewClient(conf.Keycloak.BaseURL), } postgres, err := repository.ConnectDB(server.GlobalConfig.Character.Postgres) helpers.Check(ctx, err, "connecting to postgres database") - characterRepo := repository.NewCharacterRepository(postgres) + characterRepo, err := repository.NewCharacterRepository(postgres) + helpers.Check(ctx, err, "character repo") characterService, err := service.NewCharacterService(ctx, characterRepo) helpers.Check(ctx, err, "character serivce") server.CharacterService = characterService - mongoDb, err := mongo.Connect(ctx, options.Client().ApplyURI(server.GlobalConfig.Character.Mongo.Master.MongoDSN())) + opts := options.Client() + opts.Monitor = otelmongo.NewMonitor() + opts.ApplyURI(server.GlobalConfig.Character.Mongo.Master.MongoDSN()) + mongoDb, err := mongo.Connect(ctx, opts) helpers.Check(ctx, err, "connecting to mongo database") invRepo := repository.NewInventoryRepository(mongoDb.Database(server.GlobalConfig.Character.Mongo.Master.Name)) server.InventoryService = service.NewInventoryService(invRepo) diff --git a/cmd/character/main.go b/cmd/character/main.go index 490fa59..7d473cc 100644 --- a/cmd/character/main.go +++ b/cmd/character/main.go @@ -2,15 +2,18 @@ package main import ( "context" + "errors" + "os" + "os/signal" "github.com/ShatteredRealms/go-backend/pkg/helpers" + "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/pb" "github.com/ShatteredRealms/go-backend/pkg/srv" - "github.com/uptrace/uptrace-go/uptrace" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/ShatteredRealms/go-backend/cmd/character/app" + character "github.com/ShatteredRealms/go-backend/cmd/character/app" "github.com/ShatteredRealms/go-backend/pkg/config" ) @@ -24,12 +27,20 @@ func init() { } func main() { - ctx := context.Background() - uptrace.ConfigureOpentelemetry( - uptrace.WithDSN(conf.Uptrace.DSN), - uptrace.WithServiceName(character.ServiceName), - uptrace.WithServiceVersion(conf.Version), - ) + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) + defer stop() + + otelShutdown, err := helpers.SetupOTelSDK(ctx, character.ServiceName, config.Version, conf.OpenTelemetry.Addr) + defer func() { + err = errors.Join(err, otelShutdown(context.Background())) + if err != nil { + log.Logger.Infof("Error shutting down: %v", err) + } + }() + + if err != nil { + log.Logger.Fatal(err) + } server := character.NewServerContext(ctx, conf) grpcServer, gwmux := helpers.InitServerDefaults() @@ -37,7 +48,7 @@ func main() { opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} pb.RegisterHealthServiceServer(grpcServer, srv.NewHealthServiceServer()) - err := pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) + err = pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "register health service handler endpoint") css, err := srv.NewCharacterServiceServer(ctx, server) @@ -46,9 +57,18 @@ func main() { err = pb.RegisterCharacterServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "registering characters service handler endpoint") - helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.Character.Local.Address()) + srvErr := make(chan error, 1) + go func() { + srvErr <- helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.Character.Local.Address()) + }() - for { + select { + case err = <-srvErr: + log.Logger.Fatalf("listen server: %v", err) + case <-ctx.Done(): + log.Logger.Info("Server canceled by user input.") + stop() } + } diff --git a/cmd/chat/app/server.go b/cmd/chat/app/server.go index 3330c22..a48b645 100644 --- a/cmd/chat/app/server.go +++ b/cmd/chat/app/server.go @@ -2,6 +2,7 @@ package chat import ( "context" + "github.com/Nerzal/gocloak/v13" "github.com/ShatteredRealms/go-backend/pkg/config" "github.com/ShatteredRealms/go-backend/pkg/helpers" @@ -28,7 +29,7 @@ func NewServerContext(ctx context.Context, conf *config.GlobalConfig) *ChatServe server := &ChatServerContext{ GlobalConfig: conf, Tracer: otel.Tracer("ChatService"), - KeycloakClient: gocloak.NewClient(conf.GameBackend.Keycloak.BaseURL), + KeycloakClient: gocloak.NewClient(conf.Keycloak.BaseURL), } db, err := repository.ConnectDB(conf.Chat.Postgres) diff --git a/cmd/chat/main.go b/cmd/chat/main.go index 00af5a5..345e284 100644 --- a/cmd/chat/main.go +++ b/cmd/chat/main.go @@ -2,15 +2,20 @@ package main import ( "context" + "errors" + "os" + "os/signal" + + character "github.com/ShatteredRealms/go-backend/cmd/character/app" chat "github.com/ShatteredRealms/go-backend/cmd/chat/app" "github.com/ShatteredRealms/go-backend/pkg/helpers" + "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/pb" "github.com/ShatteredRealms/go-backend/pkg/srv" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "github.com/ShatteredRealms/go-backend/pkg/config" - "github.com/uptrace/uptrace-go/uptrace" ) var ( @@ -23,12 +28,20 @@ func init() { } func main() { - ctx := context.Background() - uptrace.ConfigureOpentelemetry( - uptrace.WithDSN(conf.Uptrace.DSN), - uptrace.WithServiceName(chat.ServiceName), - uptrace.WithServiceVersion(conf.Version), - ) + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) + defer stop() + + otelShutdown, err := helpers.SetupOTelSDK(ctx, character.ServiceName, config.Version, conf.OpenTelemetry.Addr) + defer func() { + err = errors.Join(err, otelShutdown(context.Background())) + if err != nil { + log.Logger.Infof("Error shutting down: %v", err) + } + }() + + if err != nil { + log.Logger.Fatal(err) + } server := chat.NewServerContext(ctx, conf) grpcServer, gwmux := helpers.InitServerDefaults() @@ -36,7 +49,7 @@ func main() { opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} pb.RegisterHealthServiceServer(grpcServer, srv.NewHealthServiceServer()) - err := pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) + err = pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "register health service handler endpoint") srvService, err := srv.NewChatServiceServer(ctx, server) @@ -45,9 +58,17 @@ func main() { err = pb.RegisterChatServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "register chat service handler endpoint") - helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.Chat.Local.Address()) + srvErr := make(chan error, 1) + go func() { + srvErr <- helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.Chat.Local.Address()) + }() - for { + select { + case err = <-srvErr: + log.Logger.Fatalf("listen server: %v", err) + case <-ctx.Done(): + log.Logger.Info("Server canceled by user input.") + stop() } } diff --git a/cmd/gamebackend/app/server.go b/cmd/gamebackend/app/server.go index 2446dc3..8898bfb 100644 --- a/cmd/gamebackend/app/server.go +++ b/cmd/gamebackend/app/server.go @@ -39,7 +39,7 @@ func NewServerContext(ctx context.Context, conf *config.GlobalConfig) *GameBacke server := &GameBackendServerContext{ GlobalConfig: conf, Tracer: otel.Tracer("GameBackendService"), - KeycloakClient: gocloak.NewClient(conf.GameBackend.Keycloak.BaseURL), + KeycloakClient: gocloak.NewClient(conf.Keycloak.BaseURL), } charactersService, err := helpers.GrpcClientWithOtel(conf.Character.Remote.Address()) diff --git a/cmd/gamebackend/main.go b/cmd/gamebackend/main.go index 76aed9e..d59589c 100644 --- a/cmd/gamebackend/main.go +++ b/cmd/gamebackend/main.go @@ -2,15 +2,20 @@ package main import ( "context" + "errors" + "os" + "os/signal" + + character "github.com/ShatteredRealms/go-backend/cmd/character/app" gamebackend "github.com/ShatteredRealms/go-backend/cmd/gamebackend/app" "github.com/ShatteredRealms/go-backend/pkg/helpers" + "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/pb" "github.com/ShatteredRealms/go-backend/pkg/srv" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "github.com/ShatteredRealms/go-backend/pkg/config" - "github.com/uptrace/uptrace-go/uptrace" ) var ( @@ -23,20 +28,27 @@ func init() { } func main() { - ctx := context.Background() - uptrace.ConfigureOpentelemetry( - uptrace.WithDSN(conf.Uptrace.DSN), - uptrace.WithServiceName(gamebackend.ServiceName), - uptrace.WithServiceVersion(conf.Version), - ) + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) + defer stop() + + otelShutdown, err := helpers.SetupOTelSDK(ctx, character.ServiceName, config.Version, conf.OpenTelemetry.Addr) + defer func() { + err = errors.Join(err, otelShutdown(context.Background())) + if err != nil { + log.Logger.Infof("Error shutting down: %v", err) + } + }() + if err != nil { + log.Logger.Fatal(err) + } server := gamebackend.NewServerContext(ctx, conf) grpcServer, gwmux := helpers.InitServerDefaults() address := server.GlobalConfig.GameBackend.Local.Address() opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} pb.RegisterHealthServiceServer(grpcServer, srv.NewHealthServiceServer()) - err := pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) + err = pb.RegisterHealthServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "register health service handler endpoint") connServer, err := srv.NewConnectionServiceServer(ctx, server) @@ -51,9 +63,17 @@ func main() { err = pb.RegisterServerManagerServiceHandlerFromEndpoint(ctx, gwmux, address, opts) helpers.Check(ctx, err, "register server manager service handler endpoint") - helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.GameBackend.Local.Address()) + srvErr := make(chan error, 1) + go func() { + srvErr <- helpers.StartServer(ctx, grpcServer, gwmux, server.GlobalConfig.GameBackend.Local.Address()) + }() - for { + select { + case err = <-srvErr: + log.Logger.Fatalf("listen server: %v", err) + case <-ctx.Done(): + log.Logger.Info("Server canceled by user input.") + stop() } } diff --git a/cmd/stressy/cmd/root.go b/cmd/stressy/cmd/root.go new file mode 100644 index 0000000..38b2a0b --- /dev/null +++ b/cmd/stressy/cmd/root.go @@ -0,0 +1,116 @@ +package cmd + +import ( + "context" + "encoding/json" + "fmt" + "os" + "os/signal" + + "github.com/ShatteredRealms/go-backend/cmd/stressy/internal" + "github.com/ShatteredRealms/go-backend/pkg/config" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +var ( + cfgFile string + conf *config.GlobalConfig + showCfg bool + stop context.CancelFunc + k *internal.KeycloakManager + + numAdmins int + numUsers int + + rootCmd = &cobra.Command{ + Use: "stressy", + Short: "Stress tests SRO applications", + Long: `A stress test cli tool for stress testing Shattered Realms Online. + +Tasks: +* Create temporary users of all authroziation levels +* Make valid, and invalid, requests to specified SRO services`, + Run: func(cmd *cobra.Command, args []string) { + ctx := context.Background() + ctx, stop = signal.NotifyContext(ctx, os.Interrupt) + defer stop() + + conf = config.NewGlobalConfig(context.Background()) + b, err := json.MarshalIndent(conf, "", " ") + if err != nil { + fmt.Print("Error: unable to decode config") + os.Exit(1) + } + + if showCfg { + fmt.Printf("Using config:\n%s", string(b)) + } + + go func() { + k = internal.NewKeycloakManager(ctx, conf, numAdmins, numUsers, 1) + fmt.Printf("Setting up test accounts: %d admins and %d users\n", numAdmins, numUsers) + err = k.Setup(ctx) + if err != nil { + fmt.Printf("error setting up keycloak: %v\n", err) + return + } + fmt.Println("Finished up test accounts") + }() + + <-ctx.Done() + shutdown() + }, + } +) + +func Execute() { + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } +} + +func init() { + cobra.OnInitialize(initConfig) + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default $HOME/.config/stresy/config.yaml)") + rootCmd.PersistentFlags().BoolVarP(&showCfg, "showConfig", "c", false, "show the SRO config being used") + rootCmd.PersistentFlags().IntVarP(&numAdmins, "admins", "a", 2, "number of admins to simulate") + rootCmd.PersistentFlags().IntVarP(&numUsers, "users", "u", 50, "number of users to simulate") +} + +func initConfig() { + if cfgFile != "" { + viper.SetConfigFile(cfgFile) + } else { + home, err := os.UserHomeDir() + cobra.CheckErr(err) + + viper.AddConfigPath(home + "/.config/stressy") + viper.SetConfigType("yaml") + viper.SetConfigName("config.yaml") + } + + viper.AutomaticEnv() + + if err := viper.ReadInConfig(); err == nil { + fmt.Println("Using config file:", viper.ConfigFileUsed()) + } +} + +func shutdown() { + fmt.Println("\nExiting...") + + if k != nil { + fmt.Println("Removing temp accounts") + err := k.Shutdown(context.Background()) + if err != nil { + fmt.Printf("Errors encountered shutting down: %v", err) + } else { + fmt.Println("Temp accounts removed") + } + } + + fmt.Println("Finish exiting") + stop() +} diff --git a/cmd/stressy/internal/keycloak.go b/cmd/stressy/internal/keycloak.go new file mode 100644 index 0000000..f370d43 --- /dev/null +++ b/cmd/stressy/internal/keycloak.go @@ -0,0 +1,142 @@ +package internal + +import ( + "context" + "errors" + "fmt" + "strconv" + "strings" + "time" + + "github.com/Nerzal/gocloak/v13" + "github.com/ShatteredRealms/go-backend/pkg/config" +) + +type KeycloakManager struct { + Config *config.GlobalConfig + Admins []*gocloak.User + Users []*gocloak.User + GuestCount int + + keycloak *gocloak.GoCloak + token *gocloak.JWT +} + +func NewKeycloakManager( + ctx context.Context, + conf *config.GlobalConfig, + numAdmins, numUsers, numGuests int, +) *KeycloakManager { + return &KeycloakManager{ + Config: conf, + Admins: make([]*gocloak.User, numAdmins), + Users: make([]*gocloak.User, numUsers), + GuestCount: numGuests, + keycloak: gocloak.NewClient(conf.Keycloak.BaseURL), + } +} + +func (km *KeycloakManager) Setup(ctx context.Context) error { + err := km.newToken(ctx) + if err != nil { + return fmt.Errorf("login keycloak: %v", err) + } + + saRole, err := km.keycloak.GetRealmRole(context.Background(), km.token.AccessToken, km.Config.Keycloak.Realm, "super admin") + if err != nil { + return fmt.Errorf("getting sa role: %w", err) + } + + userRole, err := km.keycloak.GetRealmRole(context.Background(), km.token.AccessToken, km.Config.Keycloak.Realm, "user") + if err != nil { + return fmt.Errorf("getting user role: %w", err) + } + + for idx := range km.Admins { + km.Admins[idx], err = km.createUserWithRole(ctx, idx, saRole) + if err != nil { + return fmt.Errorf("create admin: %w", err) + } + } + + for idx := range km.Users { + km.Users[idx], err = km.createUserWithRole(ctx, idx, userRole) + if err != nil { + return fmt.Errorf("create user: %w", err) + } + } + + return nil +} + +func (km *KeycloakManager) createUserWithRole(ctx context.Context, count int, role *gocloak.Role) (user *gocloak.User, err error) { + name := "st" + strings.ReplaceAll(*role.Name, " ", "") + strconv.Itoa(count) + user = &gocloak.User{ + ID: new(string), + Username: gocloak.StringP(name), + Enabled: gocloak.BoolP(true), + Totp: gocloak.BoolP(true), + EmailVerified: gocloak.BoolP(true), + FirstName: gocloak.StringP(name), + LastName: gocloak.StringP(""), + Email: gocloak.StringP("stresstest@shatteredrealms.online"), + Credentials: &[]gocloak.CredentialRepresentation{ + { + Temporary: gocloak.BoolP(false), + Type: gocloak.StringP("password"), + Value: gocloak.StringP("Password1!"), + }, + }, + } + + *user.ID, err = km.keycloak.CreateUser(ctx, km.token.AccessToken, km.Config.Keycloak.Realm, *user) + if err != nil { + return nil, err + } + + return user, km.keycloak.AddRealmRoleToUser( + ctx, + km.token.AccessToken, + km.Config.Keycloak.Realm, + *user.ID, + []gocloak.Role{*role}, + ) +} + +func (km *KeycloakManager) newToken(ctx context.Context) (err error) { + km.token, err = km.keycloak.LoginClient( + ctx, + km.Config.Character.Keycloak.ClientId, + km.Config.Character.Keycloak.ClientSecret, + km.Config.Keycloak.Realm, + ) + + return err +} + +func (km *KeycloakManager) Shutdown(ctx context.Context) error { + err := km.newToken(ctx) + if err != nil { + return fmt.Errorf("login keycloak: %v", err) + } + + fmt.Println("Waiting 1 second for users to syncronize") + time.Sleep(time.Second) + + // Need to search since there could be a disconnect if cancelation happens during setup + users, err := km.keycloak.GetUsers(ctx, km.token.AccessToken, km.Config.Keycloak.Realm, gocloak.GetUsersParams{ + Email: gocloak.StringP("stresstest@shatteredrealms.online"), + Max: gocloak.IntP(len(km.Admins) + len(km.Users)), + }) + if err != nil { + return fmt.Errorf("unable to get stress test users: %w", err) + } + + for _, user := range users { + if user != nil { + err = errors.Join(err, km.keycloak.DeleteUser(ctx, km.token.AccessToken, km.Config.Keycloak.Realm, *user.ID)) + } + } + + return err +} diff --git a/cmd/stressy/internal/stresser.go b/cmd/stressy/internal/stresser.go new file mode 100644 index 0000000..de0d4f6 --- /dev/null +++ b/cmd/stressy/internal/stresser.go @@ -0,0 +1,8 @@ +package internal + +import "context" + +type Stresser interface { + Start(ctx context.Context) error + Shutdown() error +} diff --git a/cmd/stressy/main.go b/cmd/stressy/main.go new file mode 100644 index 0000000..0ba14de --- /dev/null +++ b/cmd/stressy/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/ShatteredRealms/go-backend/cmd/stressy/cmd" + +func main() { + cmd.Execute() +} diff --git a/coverage.out b/coverage.out index dfa7e0b..f6ed762 100644 --- a/coverage.out +++ b/coverage.out @@ -1,4 +1,558 @@ mode: atomic +github.com/ShatteredRealms/go-backend/pkg/config/db.go:20.37,29.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/config/db.go:31.40,40.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/config/db.go:42.37,50.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:33.57,159.45 7 6 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:159.45,160.48 1 6 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:160.48,162.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:162.9,162.62 1 6 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:162.62,164.4 1 6 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:164.9,166.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:169.2,174.49 3 6 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:174.49,176.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/config/global.go:178.2,178.15 1 6 +github.com/ShatteredRealms/go-backend/pkg/config/server.go:48.42,50.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/auth.go:14.79,16.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/auth.go:18.85,26.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/auth.go:28.59,33.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:16.17,17.19 1 5 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:17.19,19.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:21.2,22.33 2 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:23.32,25.17 2 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:25.17,27.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:28.3,28.42 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:30.30,31.33 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:33.10,35.41 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:38.2,38.31 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:45.19,46.19 1 5 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:46.19,48.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:50.2,51.33 2 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:52.32,53.31 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:55.30,57.17 2 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:57.17,59.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:60.3,60.40 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:62.10,64.42 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/character.go:68.2,68.33 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:10.40,14.55 3 6 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:14.55,16.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:18.2,18.38 1 6 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:18.38,21.22 3 18 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:21.22,23.4 1 6 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:24.3,24.35 1 18 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:28.51,29.34 1 30 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:29.34,33.3 3 18 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:35.2,35.38 1 12 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:35.38,38.22 3 12 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:38.22,40.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:40.9,40.23 1 12 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:40.23,42.4 1 6 +github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:44.3,44.42 1 12 +github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:3.48,5.28 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:5.28,7.3 1 12 +github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:9.2,9.13 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/errors.go:8.63,9.16 1 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/errors.go:9.16,11.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:17.87,18.86 1 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:18.86,19.94 1 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:19.94,21.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:21.9,26.29 4 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:26.29,28.5 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:30.4,30.32 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/grpc.go:40.9,51.2 5 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/logging.go:12.38,27.2 4 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:23.145,29.45 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:29.45,31.36 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:31.36,33.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:34.3,35.13 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:39.2,39.33 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:39.33,41.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:43.2,56.16 5 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:56.16,59.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:62.2,67.16 4 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:67.16,70.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:71.2,76.16 4 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:76.16,79.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:80.2,83.8 3 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:86.52,91.2 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:93.122,98.16 4 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:98.16,100.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:102.2,108.27 3 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:111.122,116.16 4 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:116.16,118.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/opentelemetry.go:120.2,125.27 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:36.39,41.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:43.67,45.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:47.61,62.2 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:64.56,65.16 1 13 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:65.16,67.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:69.2,70.15 2 11 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:70.15,72.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:74.2,74.50 1 8 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:74.50,76.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:78.2,78.44 1 7 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:81.67,82.16 1 5 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:82.16,84.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:86.2,87.16 2 4 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:87.16,89.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:91.2,92.16 2 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:92.16,95.3 2 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:97.2,98.20 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:101.121,102.19 1 7 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:102.19,104.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:106.2,107.16 2 5 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:107.16,109.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:111.2,119.16 3 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:119.16,122.3 2 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:124.2,124.18 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:124.18,126.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:128.2,134.28 3 1 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:139.61,140.98 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:140.98,143.16 3 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:143.16,146.4 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:147.3,149.14 2 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:150.27,151.16 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:152.26,153.15 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:154.26,155.15 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:156.27,157.16 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:158.11,159.37 1 0 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:9.59,11.39 2 3 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:11.39,13.17 2 29 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:13.17,15.4 1 2 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:16.3,16.17 1 27 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:19.2,19.17 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:49.38,50.43 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:50.43,52.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:54.2,54.42 1 9 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:54.42,56.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:58.2,58.25 1 8 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:61.42,62.42 1 8 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:62.42,64.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:66.2,66.42 1 7 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:66.42,68.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:70.2,70.45 1 6 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:70.45,72.3 1 4 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:74.2,74.30 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:74.30,76.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:78.2,78.12 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:81.44,83.24 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:83.24,85.3 1 9 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:87.2,87.25 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:90.43,92.23 1 9 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:92.23,94.3 1 8 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:96.2,96.24 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:99.49,109.2 1 11 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:111.50,113.32 2 1 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:113.32,115.3 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/character.go:117.2,117.13 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/chat.go:21.46,27.2 1 11 +github.com/ShatteredRealms/go-backend/pkg/model/chat.go:29.47,31.30 2 1 +github.com/ShatteredRealms/go-backend/pkg/model/chat.go:31.30,33.3 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/chat.go:35.2,35.13 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:30.78,31.52 1 3 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:31.52,32.44 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:32.44,33.31 1 4 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:33.31,35.5 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:39.2,39.14 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:42.53,43.47 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:43.47,44.30 1 4 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:44.30,46.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/claims.go:49.2,49.14 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:36.46,37.46 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:37.46,39.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:41.2,41.33 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:44.50,45.50 1 3 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:45.50,47.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:49.2,49.50 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:49.50,51.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:53.2,53.12 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:56.50,58.37 2 11 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:58.37,60.3 1 11 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:62.2,68.3 1 11 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:71.52,73.33 2 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:73.33,75.3 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:77.2,79.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:82.51,84.29 2 2 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:84.29,86.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/dimension.go:88.2,88.89 1 2 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:19.53,25.2 1 15 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:27.56,29.31 2 3 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:29.31,31.3 1 12 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:33.2,33.12 1 3 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:36.59,41.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:43.65,49.2 1 11 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:51.69,53.31 2 1 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:53.31,55.3 1 10 +github.com/ShatteredRealms/go-backend/pkg/model/inventory.go:57.2,57.12 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/location.go:15.39,25.2 1 12 +github.com/ShatteredRealms/go-backend/pkg/model/location.go:27.54,37.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/model/map.go:16.30,24.2 1 33 +github.com/ShatteredRealms/go-backend/pkg/model/map.go:26.35,28.27 2 12 +github.com/ShatteredRealms/go-backend/pkg/model/map.go:28.27,30.3 1 21 +github.com/ShatteredRealms/go-backend/pkg/model/map.go:32.2,32.12 1 12 +github.com/ShatteredRealms/go-backend/pkg/model/model.go:17.34,19.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:13.31,14.20 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:14.20,16.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:19.111,22.9 3 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:22.9,24.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:26.2,26.50 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:26.50,28.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:30.2,30.15 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:33.93,36.16 3 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:36.16,38.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:40.2,41.12 2 0 +github.com/ShatteredRealms/go-backend/pkg/repository/cacher.go:44.62,47.2 2 0 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:42.80,50.2 3 32 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:52.101,55.25 3 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:55.25,58.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:60.2,60.30 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:60.30,63.3 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:65.2,72.23 4 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:75.112,80.16 3 16 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:80.16,83.3 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:85.2,90.23 3 15 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:93.110,95.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:95.16,97.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:99.2,104.23 3 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:107.92,108.22 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:108.22,110.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:111.2,111.85 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:114.95,117.25 3 8 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:117.25,119.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:121.2,121.30 1 7 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:121.30,123.3 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:125.2,130.23 3 3 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:133.87,136.2 2 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:138.106,141.2 2 4 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:143.72,144.16 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:144.16,146.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:148.2,149.10 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/character_r.go:152.65,154.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:32.135,33.13 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:33.13,35.33 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:35.33,39.25 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:39.25,42.5 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:45.3,46.13 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:49.2,54.123 3 2 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:57.123,71.2 5 4 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:73.116,76.2 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:78.86,82.2 3 2 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:84.116,87.2 2 17 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:89.94,92.2 2 6 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:94.98,97.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:99.60,101.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:103.99,106.25 3 10 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:106.25,108.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:110.2,110.30 1 9 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:110.30,112.3 1 8 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:114.2,115.21 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:118.107,121.25 3 3 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:121.25,123.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:125.2,125.30 1 3 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:125.30,127.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:129.2,130.21 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/chat_r.go:133.52,135.2 1 32 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:20.60,22.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:22.16,24.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:25.2,44.16 6 2 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:44.16,46.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:48.2,48.26 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:48.26,50.37 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:50.37,52.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:54.3,57.6 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:60.2,60.90 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:60.90,62.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/db.go:64.2,64.16 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:68.66,72.2 1 32 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:79.37,80.21 1 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:80.21,82.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:84.2,89.16 3 25 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:89.16,91.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:93.2,93.16 1 25 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:97.99,98.15 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:98.15,100.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:102.2,102.75 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:106.116,107.15 1 6 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:107.15,109.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:111.2,113.25 3 5 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:113.25,116.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:118.2,118.30 1 5 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:118.30,121.3 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:123.2,124.26 2 4 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:134.29,136.16 2 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:136.16,138.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:140.2,147.100 2 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:147.100,149.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:151.2,151.23 1 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:161.23,169.68 2 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:169.68,171.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:173.2,173.20 1 25 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:177.91,179.2 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:182.95,184.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:187.95,189.2 1 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:192.89,194.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:197.89,199.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:205.29,206.22 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:206.22,208.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:209.2,211.16 3 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:211.16,213.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:215.2,216.16 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:216.16,218.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:220.2,220.23 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:224.96,226.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:226.16,228.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:230.2,230.15 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:234.98,237.2 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:240.86,243.2 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:246.113,249.25 3 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:249.25,251.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:253.2,253.30 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:253.30,255.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:257.2,257.23 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:261.113,264.25 3 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:264.25,266.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:268.2,268.30 1 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:268.30,270.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:272.2,272.23 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:276.101,277.15 1 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:277.15,279.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:280.2,282.25 3 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:282.25,284.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:286.2,286.30 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:286.30,288.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:290.2,290.15 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:294.101,297.25 3 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:297.25,299.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:301.2,301.30 1 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:301.30,303.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:305.2,305.15 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:309.118,312.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:315.118,318.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:321.106,324.2 2 26 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:327.106,330.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:333.123,344.2 2 3 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:347.77,348.16 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:348.16,350.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:352.2,353.10 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/gamebackend_r.go:357.68,363.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:21.69,25.2 1 31 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:28.132,30.16 2 6 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:30.16,32.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:34.2,34.23 1 4 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:38.111,41.2 2 5 +github.com/ShatteredRealms/go-backend/pkg/repository/inventory_r.go:43.71,45.2 1 11 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:21.70,22.24 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:22.24,24.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:25.2,25.27 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:25.27,27.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:28.2,30.27 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:30.27,33.3 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:34.2,34.16 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:34.16,36.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:38.2,39.16 2 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:39.16,40.29 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:40.29,42.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:43.3,43.48 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:46.2,46.27 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:46.27,49.3 2 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:50.2,50.16 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:50.16,52.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:54.2,54.28 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:57.35,61.46 4 1 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:61.46,62.39 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:62.39,64.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:66.3,66.13 1 0 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:69.2,69.12 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:32.98,34.2 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:39.29,42.16 2 18 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:42.16,44.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:46.2,48.8 1 17 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:51.139,60.45 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:60.45,62.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:64.2,64.39 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:67.92,69.2 1 8 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:71.115,75.48 3 5 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:76.30,77.59 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:78.32,79.57 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:80.10,82.43 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:86.2,86.16 1 4 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:86.16,88.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:90.2,91.32 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:91.32,93.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:94.2,95.32 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:95.32,97.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:99.2,99.39 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:99.39,101.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:103.2,104.31 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:104.31,106.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:108.2,109.30 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:109.30,111.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:113.2,114.39 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:114.39,116.3 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:118.2,119.16 2 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:119.16,121.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:123.2,123.43 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:126.70,128.16 2 3 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:128.16,130.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:132.2,132.22 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:132.22,134.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:136.2,136.38 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:139.82,141.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:143.103,145.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:147.119,149.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:149.16,151.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/character_s.go:153.2,156.23 3 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:53.132,55.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:57.120,59.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:61.123,66.16 4 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:66.16,68.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:70.2,70.33 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:70.33,72.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:74.2,74.38 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:74.38,76.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:78.2,78.47 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:81.91,83.2 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:85.95,98.2 5 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:100.100,113.2 5 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:114.122,118.23 3 3 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:118.23,120.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:122.2,129.3 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:132.133,136.23 3 7 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:136.23,138.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:139.2,146.3 2 6 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:149.83,151.2 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:153.113,155.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:155.16,157.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:159.2,160.24 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:163.91,165.16 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:165.16,167.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:169.2,171.12 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:174.134,179.16 4 4 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:179.16,181.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:183.2,184.16 2 3 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:184.16,186.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:188.2,196.16 3 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:196.16,198.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:200.2,202.37 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:202.37,204.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:206.2,207.16 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:207.16,209.3 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:211.2,211.21 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:215.99,217.2 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:219.81,225.2 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:227.68,233.2 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:235.50,237.2 1 6 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:239.49,241.2 1 8 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:243.97,247.47 3 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:247.47,254.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:256.2,256.43 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:259.96,263.41 3 6 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:263.41,270.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/chat_s.go:272.2,272.37 1 6 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:80.119,81.35 1 14 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:82.32,83.60 1 8 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:85.30,87.17 2 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:87.17,89.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:90.3,90.55 1 4 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:92.10,94.43 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:100.101,101.35 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:102.26,103.54 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:105.24,107.17 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:107.17,109.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:110.3,110.49 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:112.10,114.43 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:120.137,122.16 2 6 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:122.16,124.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:125.2,125.22 1 4 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:125.22,128.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:130.2,131.35 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:131.35,133.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:135.2,135.97 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:141.31,143.16 2 43 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:143.16,145.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:147.2,149.8 1 42 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:157.37,159.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:162.141,164.15 2 4 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:164.15,166.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:168.2,168.33 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:168.33,171.3 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:174.2,175.43 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:175.43,179.3 3 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:181.2,182.16 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:186.160,188.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:191.142,193.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:196.92,198.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:201.92,203.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:206.86,208.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:211.86,213.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:216.125,219.16 2 8 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:219.16,221.3 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:223.2,223.29 1 6 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:223.29,226.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:228.2,228.33 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:228.33,230.3 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:232.2,232.36 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:232.36,234.3 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:236.2,236.37 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:236.37,238.3 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:240.2,240.22 1 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:240.22,242.17 2 5 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:242.17,244.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:246.3,247.17 2 4 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:247.17,249.4 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:251.3,251.28 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:251.28,255.36 4 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:255.36,257.5 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:258.4,258.27 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:258.27,259.35 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:259.35,262.6 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:264.4,264.68 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:267.3,267.31 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:270.2,270.63 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:274.107,278.48 3 4 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:279.24,281.17 2 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:281.17,283.4 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:284.3,284.44 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:285.26,286.54 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:287.10,289.37 2 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:293.2,293.16 1 3 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:293.16,295.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:297.2,297.23 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:297.23,300.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:302.2,302.33 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:302.33,304.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:306.2,306.33 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:306.33,308.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:310.2,310.39 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:310.39,312.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:314.2,314.38 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:314.38,316.3 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:318.2,318.51 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:322.95,324.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:327.83,329.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:332.110,334.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:337.110,339.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:342.115,344.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:347.115,349.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:352.120,354.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:357.98,359.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:362.98,364.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:367.103,369.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:372.103,374.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:377.101,378.35 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:379.32,380.46 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:382.30,384.17 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:384.17,386.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:387.3,387.41 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:389.10,391.38 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:397.89,398.35 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:399.26,400.40 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:402.24,404.17 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:404.17,406.4 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:407.3,407.35 1 0 +github.com/ShatteredRealms/go-backend/pkg/service/gamebackend_s.go:409.10,411.38 2 0 +github.com/ShatteredRealms/go-backend/pkg/service/inventory_s.go:19.80,23.2 1 2 +github.com/ShatteredRealms/go-backend/pkg/service/inventory_s.go:26.115,28.2 1 1 +github.com/ShatteredRealms/go-backend/pkg/service/inventory_s.go:31.108,33.2 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:50.62,53.2 2 124 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:59.33,61.16 2 6 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:61.16,64.3 2 1 @@ -8,7 +562,7 @@ github.com/ShatteredRealms/go-backend/pkg/srv/character.go:71.2,72.16 2 4 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:72.16,74.3 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:77.2,78.16 2 3 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:78.16,80.3 1 1 -github.com/ShatteredRealms/go-backend/pkg/srv/character.go:82.2,82.46 1 2 +github.com/ShatteredRealms/go-backend/pkg/srv/character.go:82.2,82.60 1 2 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:89.33,91.16 2 12 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:91.16,94.3 2 1 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:97.2,97.80 1 11 @@ -112,14 +666,14 @@ github.com/ShatteredRealms/go-backend/pkg/srv/character.go:431.17,434.4 2 1 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:435.3,435.18 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:435.18,437.4 1 0 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:439.3,439.24 1 1 -github.com/ShatteredRealms/go-backend/pkg/srv/character.go:440.10,442.35 2 0 +github.com/ShatteredRealms/go-backend/pkg/srv/character.go:440.10,442.41 2 0 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:445.2,445.25 1 3 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:451.29,455.43 3 23 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:455.43,457.3 1 0 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:459.2,459.39 1 23 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:460.30,461.76 1 19 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:463.32,464.74 1 4 -github.com/ShatteredRealms/go-backend/pkg/srv/character.go:466.10,468.37 2 0 +github.com/ShatteredRealms/go-backend/pkg/srv/character.go:466.10,468.43 2 0 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:471.2,471.16 1 23 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:471.16,474.3 2 3 github.com/ShatteredRealms/go-backend/pkg/srv/character.go:476.2,476.22 1 20 @@ -290,7 +844,7 @@ github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:560.17,563.4 2 1 github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:565.3,565.36 1 2 github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:565.36,566.31 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:566.31,568.5 1 1 -github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:572.2,572.30 1 1 +github.com/ShatteredRealms/go-backend/pkg/srv/chat.go:572.2,572.36 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/connection.go:39.63,42.2 2 62 github.com/ShatteredRealms/go-backend/pkg/srv/connection.go:53.42,55.16 2 8 github.com/ShatteredRealms/go-backend/pkg/srv/connection.go:55.16,58.3 2 2 @@ -541,7 +1095,7 @@ github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:734.24,736.17 2 6 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:736.17,738.4 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:739.3,739.63 1 5 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:741.26,742.73 1 3 -github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:744.10,746.37 2 1 +github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:744.10,746.43 2 1 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:749.2,749.16 1 8 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:749.16,751.3 1 1 github.com/ShatteredRealms/go-backend/pkg/srv/servermanager.go:752.2,752.16 1 7 diff --git a/docker-compose.yaml b/docker-compose.yaml index 0817242..f45a549 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -26,42 +26,39 @@ services: networks: - backend - clickhouse: - image: clickhouse/clickhouse-server:22.7 - restart: on-failure + jaeger: + image: jaegertracing/all-in-one:latest + restart: always + ports: + - "16686:16686" + - "14268" + - "14250" + networks: + - backend + + zipkin: + image: openzipkin/zipkin:latest environment: - CLICKHOUSE_DB: uptrace - healthcheck: - test: ['CMD', 'wget', '--spider', '-q', 'localhost:8123/ping'] - interval: 1s - timeout: 1s - retries: 30 - volumes: - - ch_data_2:/var/lib/clickhouse + - JAVA_OPTS=-Xms1024m -Xmx1024m -XX:+ExitOnOutOfMemoryError + restart: always ports: - - '8123:8123' - - '9000:9000' + - "9411:9411" networks: - backend - uptrace: - image: 'uptrace/uptrace-dev:latest' - restart: on-failure + + prometheus: + image: prom/prometheus:latest + restart: always volumes: - - uptrace_data:/var/lib/uptrace - - ./test/uptrace.yml:/etc/uptrace/uptrace.yml - #environment: - # - DEBUG=2 + - ./test/prometheus.yaml:/etc/prometheus/prometheus.yml ports: - - '14317:14317' - - '14318:14318' - depends_on: - - clickhouse + - "9090:9090" networks: - backend otel-collector: - image: otel/opentelemetry-collector-contrib:0.70.0 + image: otel/opentelemetry-collector-contrib:0.97.0 restart: on-failure user: '0:0' # required for logs volumes: @@ -69,8 +66,15 @@ services: - /var/lib/docker/containers:/var/lib/docker/containers:ro - /var/log:/var/log:ro ports: - - '4317:4317' - - '4318:4318' + - "1888:1888" # pprof extension + - "8888:8888" # Prometheus metrics exposed by the collector + - "8889:8889" # Prometheus exporter metrics + - "13133:13133" # health_check extension + - "4317:4317" # OTLP gRPC receiver + - "55679:55679" # zpages extension + depends_on: + - zipkin + - prometheus networks: - backend @@ -96,13 +100,6 @@ services: networks: - backend - vector: - image: timberio/vector:0.24.X-alpine - volumes: - - ./test/vector.toml:/etc/vector/vector.toml:ro - networks: - - backend - postgres: image: postgres restart: always @@ -152,19 +149,11 @@ services: - 8080:8080 depends_on: - postgres - - keycloak-fix networks: - backend volumes: - keycloak:/opt/keycloak/data/h2 - keycloak-fix: - image: ubuntu - user: root - command: chmod 777 /opt/keycloak/data/h2 - volumes: - - keycloak:/opt/keycloak/data/h2 - # sro-characters: # build: # context: . diff --git a/go.mod b/go.mod index 0625350..80668fa 100644 --- a/go.mod +++ b/go.mod @@ -37,25 +37,37 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-gorm/caches/v4 v4.0.0 // indirect github.com/go-openapi/spec v0.19.5 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra-cli v1.3.0 // indirect github.com/stretchr/testify v1.8.4 // indirect + github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect + go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.16.0 // indirect @@ -130,7 +142,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.mongodb.org/mongo-driver v1.12.0 + go.mongodb.org/mongo-driver v1.13.1 go.opentelemetry.io/contrib/instrumentation/runtime v0.42.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect diff --git a/go.sum b/go.sum index 92a6e7b..3ca28fc 100644 --- a/go.sum +++ b/go.sum @@ -3,30 +3,116 @@ agones.dev/agones v1.30.0/go.mod h1:vkKAtL3sm2Sj2/+Y0uAKW1YE02H0+fBgie2ruiKgSdM= agones.dev/agones v1.39.0 h1:oCwJohhcZQzfz1pQ8OxQSkZ12V0imTlEBZez78bYspo= agones.dev/agones v1.39.0/go.mod h1:n0gTMgxYrvxvEHK8Hfr/epa95BM7W3QuYdlZ1EAG/IQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nerzal/gocloak/v13 v13.1.0 h1:ret4pZTIsSQGZHURDMJ4jXnUmHyEoRykBqDTsAKoj8c= github.com/Nerzal/gocloak/v13 v13.1.0/go.mod h1:rRBtEdh5N0+JlZZEsrfZcB2sRMZWbgSxI2EIv9jpJp4= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/TwiN/go-away v1.6.10 h1:ScxGvhyJPu7VqLJJCpVx9vXBlQXi4wme3Vwx4z1WeC4= github.com/TwiN/go-away v1.6.10/go.mod h1:e0adzvKFM6LIbU+K8pczlqYMaoH/6OwdvQEqg9wSRSU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bxcodec/faker/v4 v4.0.0-beta.3 h1:gqYNBvN72QtzKkYohNDKQlm+pg+uwBDVMN28nWHS18k= github.com/bxcodec/faker/v4 v4.0.0-beta.3/go.mod h1:m6+Ch1Lj3fqW/unZmvkXIdxWS5+XQWPWxcbbQW2X+Ho= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -48,16 +134,35 @@ github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gorm/caches/v4 v4.0.0 h1:3nfNy1ya6f9s0RjpJ6lFMOfeyOzQjPoaXuLMmagFL8k= github.com/go-gorm/caches/v4 v4.0.0/go.mod h1:Ms8LnWVoW4GkTofpDzFH8OfDGNTjLxQDyxBmRN67Ujw= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -91,58 +196,149 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 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.2/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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/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.3/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.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= @@ -166,8 +362,14 @@ github.com/joonix/log v0.0.0-20180502111528-d2d3f2f4a806 h1:wsKuVfz+KNbe4mfcFENC github.com/joonix/log v0.0.0-20180502111528-d2d3f2f4a806/go.mod h1:9alna084PKap49x3Dl7QTGUXiS37acLi8ryAexT1SJc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -175,6 +377,7 @@ github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHU github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -188,6 +391,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -197,10 +402,38 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a h1:+J2gw7Bw77w/fbK7wnNJJDKmw1IbWft2Ul5BzrG1Qm8= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +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.3/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.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +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.3 h1:j7a/xn1U6TKA/PHHxqZuzh64CdtRc7rU9M+AvkOl5bA= github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= @@ -208,12 +441,15 @@ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXy github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= @@ -230,40 +466,78 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +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.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/kafka-go v0.4.39 h1:75smaomhvkYRwtuOwqLsdhgCG30B82NsbdkdDfFbvrw= github.com/segmentio/kafka-go v0.4.39/go.mod h1:T0MLgygYvmqmBvC+s8aCcbVNfJN4znVne5j0Pzowp/Q= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra-cli v1.3.0 h1:Y/qy0X40kDT+k7PCyBQrsjh/qOf9t/ZVScbn0OyZD84= +github.com/spf13/cobra-cli v1.3.0/go.mod h1:zq1KeHo/9SQm1tNdbJhwVDd9bVpokbQwuG6MR0TFCdE= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -282,10 +556,12 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk= github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816/go.mod h1:tzym/CEb5jnFI+Q0k4Qq3+LvRF4gO3E2pxS8fHP8jcA= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uptrace/opentelemetry-go-extra/otelgorm v0.2.3 h1:girTS67d1m8+XUJLbNBDjCSH8BtujWFoI93W1OUjFIc= github.com/uptrace/opentelemetry-go-extra/otelgorm v0.2.3/go.mod h1:kjsn/ilDe5TABXwTy7Dg/Lfr2pRAjrCD+yPV+pbhOMY= github.com/uptrace/opentelemetry-go-extra/otellogrus v0.2.3 h1:m5eNyOhch/7tyK6aN6eRRpNoD1vM8PNh64dA05X22Js= @@ -296,6 +572,8 @@ github.com/uptrace/opentelemetry-go-extra/otelutil v0.2.3 h1:LyGS9cIZV0YVhE81zwf github.com/uptrace/opentelemetry-go-extra/otelutil v0.2.3/go.mod h1:RvCYhPchLhvQ9l9C9goblbgO7BaKt597kBMf5mgKyo0= github.com/uptrace/uptrace-go v1.16.0 h1:yB9vt1hBYYoXWExNx0okubLOjd339d7lH+/5o+Lp+MY= github.com/uptrace/uptrace-go v1.16.0/go.mod h1:Ssc5wLpoL+9V0qkT5FtrIiru9SY4xb7q1UVLjSpxpCg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -315,13 +593,32 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/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.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= +go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= +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.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.49.0 h1:qF3LdpkD3Kbaw0Smsh+SVcJI/mtYGz9ZdCmu0YF2Lo4= +go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.49.0/go.mod h1:eqNF9g7W06ubrU7jk6M6UW9OTrcSPZvVY10cw9DUJ7c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/contrib/instrumentation/runtime v0.42.0 h1:EbmAUG9hEAMXyfWEasIt2kmh/WmXUznUksChApTgBGc= go.opentelemetry.io/contrib/instrumentation/runtime v0.42.0/go.mod h1:rD9feqRYP24P14t5kmhNMqsqm1jvKmpx2H2rKVw52V8= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= @@ -332,6 +629,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= @@ -342,47 +641,119 @@ go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9os go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/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-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -391,29 +762,110 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -422,26 +874,79 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/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.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= @@ -451,26 +956,148 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78 h1:SzXBGiWM1LNVYLCRP3e0/Gsze804l4jGoJ5lYysEO5I= google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -479,12 +1106,16 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.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.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -496,16 +1127,21 @@ gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.4.3 h1:/JhWJhO2v17d8hjApTltKNADm7K7YI2ogkR7avJUL3k= @@ -533,7 +1169,12 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/api v0.27.6 h1:PBWu/lywJe2qQcshMjubzcBg7+XDZOo7O8JJAWuYtUo= @@ -556,6 +1197,9 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +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/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/pkg/config/global.go b/pkg/config/global.go index 96dfb00..09eb729 100644 --- a/pkg/config/global.go +++ b/pkg/config/global.go @@ -18,9 +18,16 @@ type GlobalConfig struct { Character CharacterServer `yaml:"character"` GameBackend GamebackendServer `yaml:"gamebackend"` Chat ChatServer `json:"chat" yaml:"chat"` - Uptrace UptraceConfig `json:"uptrace" yaml:"uptrace"` - Agones AgonesConfig `json:"agones"` - Version string + // Uptrace UptraceConfig `json:"uptrace" yaml:"uptrace"` + OpenTelemetry OpenTelemetryConfig `json:"otel" yaml:"otel"` + Agones AgonesConfig `json:"agones"` + Keycloak KeycloakGlobal `yaml:"keycloak"` + Version string +} + +type KeycloakGlobal struct { + BaseURL string `yaml:"baseURL"` + Realm string `yaml:"realm"` } func NewGlobalConfig(ctx context.Context) *GlobalConfig { @@ -38,8 +45,6 @@ func NewGlobalConfig(ctx context.Context) *GlobalConfig { Mode: LocalMode, LogLevel: logrus.InfoLevel, Keycloak: KeycloakClientConfig{ - Realm: "default", - BaseURL: "http://localhost:8080", ClientId: model.CharactersClientId, ClientSecret: "**********", Id: "738a426a-da91-4b16-b5fc-92d63a22eb76", @@ -77,8 +82,6 @@ func NewGlobalConfig(ctx context.Context) *GlobalConfig { Mode: LocalMode, LogLevel: logrus.InfoLevel, Keycloak: KeycloakClientConfig{ - Realm: "default", - BaseURL: "http://localhost:8080", ClientId: model.GamebackendClientId, ClientSecret: "**********", Id: "c3cacba8-cd16-4a4f-bc86-367274cb7cb5", @@ -108,8 +111,6 @@ func NewGlobalConfig(ctx context.Context) *GlobalConfig { Mode: LocalMode, LogLevel: logrus.InfoLevel, Keycloak: KeycloakClientConfig{ - Realm: "default", - BaseURL: "http://localhost:8080", ClientId: model.ChatClientId, ClientSecret: "**********", Id: "4c79d4a0-a3fd-495f-b56e-eea508bb0862", @@ -130,8 +131,8 @@ func NewGlobalConfig(ctx context.Context) *GlobalConfig { Slaves: []DBConfig{}, }, }, - Uptrace: UptraceConfig{ - DSN: "http://project2_secret_token@localhost:14317/2", + OpenTelemetry: OpenTelemetryConfig{ + Addr: "otel-collector:4317", }, Agones: AgonesConfig{ KeyFile: "/etc/sro/auth/agones/client/key", @@ -143,20 +144,29 @@ func NewGlobalConfig(ctx context.Context) *GlobalConfig { Host: "localhost", }, }, + Keycloak: KeycloakGlobal{ + BaseURL: "http://localhost:80801/", + Realm: "default", + }, Version: Version, } viper.SetConfigName("config") viper.SetConfigType("yaml") - viper.AddConfigPath("./") - viper.AddConfigPath("./test/") viper.AddConfigPath("/etc/sro/") + viper.AddConfigPath("./test/") + viper.AddConfigPath(".") if err := viper.ReadInConfig(); err != nil { if _, ok := err.(viper.ConfigParseError); ok { - log.Logger.WithContext(ctx).Fatalf("read appConfig: %v", err) + log.Logger.WithContext(ctx).Fatalf("read app config parse error: %v", err) + } else if _, ok := err.(viper.ConfigFileNotFoundError); ok { + log.Logger.WithContext(ctx).Warnf("no config found, using default: %v", err) + } else { + log.Logger.WithContext(ctx).Fatalf("unknown error prasing config : %v", err) } } + viper.SetEnvPrefix("SRO") // Read from environment variables helpers.BindEnvsToStruct(config) diff --git a/pkg/config/global_test.go b/pkg/config/global_test.go index 1bc4f38..8b67ffa 100644 --- a/pkg/config/global_test.go +++ b/pkg/config/global_test.go @@ -7,24 +7,37 @@ import ( "github.com/bxcodec/faker/v4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "github.com/sirupsen/logrus/hooks/test" "gopkg.in/yaml.v2" "github.com/ShatteredRealms/go-backend/pkg/config" + "github.com/ShatteredRealms/go-backend/pkg/log" ) var _ = Describe("Global config", func() { + BeforeEach(func() { + log.Logger, _ = test.NewNullLogger() + }) Describe("NewGlobalConfig", func() { It("should generate a valid config", func() { - Expect(config.NewGlobalConfig(nil)).NotTo(BeNil()) + Expect(config.NewGlobalConfig(context.TODO())).NotTo(BeNil()) Expect(config.NewGlobalConfig(context.Background())).NotTo(BeNil()) }) It("should read in env variables", func() { - key := "SRO_CHARACTER_LOCAL_HOST" + key := "SRO_VERSION" val := faker.Username() GinkgoT().Setenv(key, val) Expect(os.Getenv(key)).To(Equal(val)) - conf := config.NewGlobalConfig(nil) + conf := config.NewGlobalConfig(context.TODO()) + Expect(conf).NotTo(BeNil()) + Expect(conf.Version).To(Equal(val)) + + key = "SRO_CHARACTER_LOCAL_HOST" + val = faker.Username() + GinkgoT().Setenv(key, val) + Expect(os.Getenv(key)).To(Equal(val)) + conf = config.NewGlobalConfig(context.TODO()) Expect(conf).NotTo(BeNil()) Expect(conf.Character.Local.Host).To(Equal(val)) }) @@ -32,9 +45,10 @@ var _ = Describe("Global config", func() { It("should read in from config file", func() { confFromFile := &config.GlobalConfig{} yamlFile, err := os.ReadFile("../../test/config.yaml") + Expect(err).To(BeNil()) err = yaml.Unmarshal(yamlFile, confFromFile) Expect(err).To(BeNil()) - conf := config.NewGlobalConfig(nil) + conf := config.NewGlobalConfig(context.TODO()) Expect(conf).NotTo(BeNil()) Expect(conf.Character.Keycloak.ClientSecret).To(Equal(confFromFile.Character.Keycloak.ClientSecret)) }) diff --git a/pkg/config/keycloak.go b/pkg/config/keycloak.go index a97ad2a..a8b7162 100644 --- a/pkg/config/keycloak.go +++ b/pkg/config/keycloak.go @@ -3,8 +3,6 @@ package config // KeycloakClientConfig oidc client for keycloak type KeycloakClientConfig struct { Id string `yaml:"id"` - Realm string `yaml:"realm"` ClientId string `yaml:"clientId"` ClientSecret string `yaml:"clientSecret"` - BaseURL string `yaml:"baseURL"` } diff --git a/pkg/config/opentelemetry.go b/pkg/config/opentelemetry.go new file mode 100644 index 0000000..99eaf33 --- /dev/null +++ b/pkg/config/opentelemetry.go @@ -0,0 +1,5 @@ +package config + +type OpenTelemetryConfig struct { + Addr string +} diff --git a/pkg/config/server.go b/pkg/config/server.go index 6b432d8..7d8b23d 100644 --- a/pkg/config/server.go +++ b/pkg/config/server.go @@ -24,18 +24,18 @@ type SROServer struct { } type CharacterServer struct { - SROServer `yaml:",inline"` + SROServer `yaml:",inline" mapstructure:",squash"` Postgres DBPoolConfig `yaml:"postgres"` Mongo DBPoolConfig `yaml:"mongo"` } type GamebackendServer struct { - SROServer `yaml:",inline"` + SROServer `yaml:",inline" mapstructure:",squash"` Postgres DBPoolConfig `yaml:"postgres"` } type ChatServer struct { - SROServer `yaml:",inline"` + SROServer `yaml:",inline" mapstructure:",squash"` Postgres DBPoolConfig `yaml:"postgres"` Kafka ServerAddress `yaml:"kafka"` } diff --git a/pkg/config/server_test.go b/pkg/config/server_test.go index f70f95c..e140242 100644 --- a/pkg/config/server_test.go +++ b/pkg/config/server_test.go @@ -7,13 +7,16 @@ import ( "github.com/bxcodec/faker/v4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "github.com/sirupsen/logrus/hooks/test" "github.com/ShatteredRealms/go-backend/pkg/config" + "github.com/ShatteredRealms/go-backend/pkg/log" ) var _ = Describe("Server config", func() { Describe("ServerAddress Address", func() { It("should generate an address", func() { + log.Logger, _ = test.NewNullLogger() config := config.NewGlobalConfig(context.TODO()) Expect(config).NotTo(BeNil()) Expect(config.Character.Local.Address()).To(Equal(fmt.Sprintf("%s:%d", config.Character.Local.Host, config.Character.Local.Port))) diff --git a/pkg/helpers/character.go b/pkg/helpers/character.go index d1ca1f1..ad5d5dd 100644 --- a/pkg/helpers/character.go +++ b/pkg/helpers/character.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/model" "github.com/ShatteredRealms/go-backend/pkg/pb" - "github.com/ShatteredRealms/go-backend/pkg/log" ) func GetCharacterIdFromTarget( @@ -32,7 +32,7 @@ func GetCharacterIdFromTarget( default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return 0, model.ErrHandleRequest + return 0, model.ErrHandleRequest.Err() } return targetCharacterId, nil @@ -61,7 +61,8 @@ func GetCharacterNameFromTarget( default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return "", model.ErrHandleRequest + return "", model.ErrHandleRequest.Err() + } return targetCharacterName, nil diff --git a/pkg/helpers/character_test.go b/pkg/helpers/character_test.go index 377052a..3ab0f60 100644 --- a/pkg/helpers/character_test.go +++ b/pkg/helpers/character_test.go @@ -55,7 +55,7 @@ var _ = Describe("Character helpers", func() { It("should error on invalid target", func() { id, err := helpers.GetCharacterIdFromTarget(ctx, mockCSC, target) - Expect(err).Should(MatchError(model.ErrHandleRequest)) + Expect(err).Should(MatchError(model.ErrHandleRequest.Err())) Expect(id).NotTo(Equal(uint(characterDetails.Id))) Expect(hook.AllEntries()).To(HaveLen(1)) Expect(hook.LastEntry().String()).To(ContainSubstring("target type unknown")) @@ -107,7 +107,7 @@ var _ = Describe("Character helpers", func() { It("should error on invalid target", func() { name, err := helpers.GetCharacterNameFromTarget(ctx, mockCSC, target) - Expect(err).Should(MatchError(model.ErrHandleRequest)) + Expect(err).Should(MatchError(model.ErrHandleRequest.Err())) Expect(name).NotTo(Equal(characterDetails.Name)) Expect(hook.AllEntries()).To(HaveLen(1)) Expect(hook.LastEntry().String()).To(ContainSubstring("target type unknown")) diff --git a/pkg/helpers/config.go b/pkg/helpers/config.go index ce418f2..502ea37 100644 --- a/pkg/helpers/config.go +++ b/pkg/helpers/config.go @@ -18,34 +18,29 @@ func BindEnvsToStruct(obj interface{}) { for i := 0; i < val.NumField(); i++ { field := val.Type().Field(i) key := field.Name - env := field.Name if field.Anonymous { - env = "" + key = "" } - bindRecursive(key, env, val.Field(i)) + bindRecursive(key, val.Field(i)) } } -func bindRecursive(key, env string, val reflect.Value) { +func bindRecursive(key string, val reflect.Value) { if val.Kind() != reflect.Struct { - env = "SRO_" + strings.ToUpper(env) - _ = viper.BindEnv(key, env) + env := "SRO_" + strings.ReplaceAll(strings.ToUpper(key), ".", "_") + viper.MustBindEnv(key, env) return } for i := 0; i < val.NumField(); i++ { field := val.Type().Field(i) newKey := field.Name - newEnv := field.Name - if key != "" { - newKey = "." + newKey - } if field.Anonymous { - newEnv = "" - } else if env != "" { - newEnv = "_" + newEnv + newKey = "" + } else if key != "" { + newKey = "." + newKey } - bindRecursive(key+newKey, env+newEnv, val.Field(i)) + bindRecursive(key+newKey, val.Field(i)) } } diff --git a/pkg/helpers/config_test.go b/pkg/helpers/config_test.go index dea1aa8..30dbd3c 100644 --- a/pkg/helpers/config_test.go +++ b/pkg/helpers/config_test.go @@ -17,7 +17,8 @@ const ( ) type TestStruct struct { - EmbeddedStruct + EmbeddedStruct `yaml:",inline" mapstructure:",squash"` + Foo string Bar TestInnerStruct } diff --git a/pkg/helpers/grpc.go b/pkg/helpers/grpc.go index 0a77948..56820dc 100644 --- a/pkg/helpers/grpc.go +++ b/pkg/helpers/grpc.go @@ -2,17 +2,20 @@ package helpers import ( "context" - "github.com/ShatteredRealms/go-backend/pkg/log" - "golang.org/x/net/http2" - "golang.org/x/net/http2/h2c" "net" "net/http" "strings" + + "github.com/ShatteredRealms/go-backend/pkg/log" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "google.golang.org/grpc" ) func GRPCHandlerFunc(grpcServer http.Handler, otherHandler http.Handler) http.Handler { return h2c.NewHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.ProtoMajor == 2 && strings.Contains(r.Header.Get("Content-Type"), "application/grpc") { grpcServer.ServeHTTP(w, r) } else { @@ -31,23 +34,18 @@ func GRPCHandlerFunc(grpcServer http.Handler, otherHandler http.Handler) http.Ha func StartServer( ctx context.Context, - grpcServer http.Handler, - gwmux http.Handler, + grpcServer *grpc.Server, + gwmux *runtime.ServeMux, address string, -) net.Listener { +) error { log.Logger.WithContext(ctx).Info("Starting server") listen, err := net.Listen("tcp", address) Check(ctx, err, "listen server") httpSrv := &http.Server{ Addr: address, - Handler: GRPCHandlerFunc(grpcServer, gwmux), + Handler: GRPCHandlerFunc(grpcServer, otelhttp.NewHandler(gwmux, "/")), } - go func() { - err := httpSrv.Serve(listen) - Check(context.Background(), err, "server stopped") - }() - - return listen + return httpSrv.Serve(listen) } diff --git a/pkg/helpers/logging.go b/pkg/helpers/logging.go index 613f017..3159952 100644 --- a/pkg/helpers/logging.go +++ b/pkg/helpers/logging.go @@ -1,13 +1,12 @@ package helpers import ( - "fmt" "os" "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/sirupsen/logrus" - easy "github.com/t-tomalak/logrus-easy-formatter" "github.com/uptrace/opentelemetry-go-extra/otellogrus" + prefixed "github.com/x-cray/logrus-prefixed-formatter" ) func SetupLogger(serviceName string) { @@ -20,8 +19,9 @@ func SetupLogger(serviceName string) { log.Logger.SetOutput(os.Stdout) log.Logger.SetLevel(logrus.TraceLevel) - log.Logger.SetFormatter(&easy.Formatter{ - TimestampFormat: "2006-01-02 15:04:05", - LogFormat: fmt.Sprintf("%%time%% %s [%%lvl%%]: %%msg%%\n", serviceName), - }) + log.Logger.Formatter = new(prefixed.TextFormatter) + // log.Logger.SetFormatter(&easy.Formatter{ + // TimestampFormat: "2006-01-02 15:04:05", + // LogFormat: fmt.Sprintf("%%time%% %s [%%lvl%%]: %%msg%%\n", serviceName), + // }) } diff --git a/pkg/helpers/opentelemetry.go b/pkg/helpers/opentelemetry.go new file mode 100644 index 0000000..aa7153e --- /dev/null +++ b/pkg/helpers/opentelemetry.go @@ -0,0 +1,127 @@ +package helpers + +import ( + "context" + "errors" + "fmt" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/resource" + "go.opentelemetry.io/otel/sdk/trace" + semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" +) + +// setupOTelSDK bootstraps the OpenTelemetry pipeline. +// If it does not return an error, make sure to call shutdown for proper cleanup. +func SetupOTelSDK(ctx context.Context, serviceName, serviceVersion, otelCollectorHost string) (shutdown func(context.Context) error, err error) { + var shutdownFuncs []func(context.Context) error + + // shutdown calls cleanup functions registered via shutdownFuncs. + // The errors from the calls are joined. + // Each registered cleanup will be invoked once. + shutdown = func(ctx context.Context) error { + var err error + for _, fn := range shutdownFuncs { + err = errors.Join(err, fn(ctx)) + } + shutdownFuncs = nil + return err + } + + // handleErr calls shutdown for cleanup and makes sure that all errors are returned. + handleErr := func(inErr error) { + err = errors.Join(inErr, shutdown(ctx)) + } + + res, err := resource.New(ctx, + resource.WithAttributes( + semconv.ServiceName(serviceName), + semconv.ServiceVersion(serviceVersion), + ), + ) + + timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + conn, err := grpc.DialContext(timeoutCtx, otelCollectorHost, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithBlock(), + ) + if err != nil { + handleErr(fmt.Errorf("dialing otel collector at %s: %w", otelCollectorHost, err)) + return + } + + // Set up propagator. + prop := newPropagator() + otel.SetTextMapPropagator(prop) + + // Set up trace provider. + tracerProvider, err := newTraceProvider(ctx, res, conn) + if err != nil { + handleErr(err) + return + } + shutdownFuncs = append(shutdownFuncs, tracerProvider.Shutdown) + otel.SetTracerProvider(tracerProvider) + + // Set up meter provider. + meterProvider, err := newMeterProvider(ctx, res, conn) + if err != nil { + handleErr(err) + return + } + shutdownFuncs = append(shutdownFuncs, meterProvider.Shutdown) + otel.SetMeterProvider(meterProvider) + + return +} + +func newPropagator() propagation.TextMapPropagator { + return propagation.NewCompositeTextMapPropagator( + propagation.TraceContext{}, + propagation.Baggage{}, + ) +} + +func newTraceProvider(ctx context.Context, res *resource.Resource, conn *grpc.ClientConn) (*trace.TracerProvider, error) { + timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + traceExporter, err := otlptracegrpc.New(timeoutCtx, otlptracegrpc.WithGRPCConn(conn)) + if err != nil { + return nil, err + } + + bsp := trace.NewBatchSpanProcessor(traceExporter) + traceProvider := trace.NewTracerProvider( + trace.WithSampler(trace.AlwaysSample()), + trace.WithResource(res), + trace.WithSpanProcessor(bsp), + ) + return traceProvider, nil +} + +func newMeterProvider(ctx context.Context, res *resource.Resource, conn *grpc.ClientConn) (*metric.MeterProvider, error) { + timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + metricExporter, err := otlpmetricgrpc.New(timeoutCtx, otlpmetricgrpc.WithGRPCConn(conn)) + if err != nil { + return nil, err + } + + meterProvider := metric.NewMeterProvider( + metric.WithReader(metric.NewPeriodicReader(metricExporter, + metric.WithInterval(10*time.Second))), + metric.WithResource(res), + ) + return meterProvider, nil +} + diff --git a/pkg/helpers/srv.go b/pkg/helpers/srv.go index 0db2a64..35912ba 100644 --- a/pkg/helpers/srv.go +++ b/pkg/helpers/srv.go @@ -6,10 +6,14 @@ import ( "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/model" + "github.com/ShatteredRealms/go-backend/pkg/srospan" "github.com/golang-jwt/jwt/v4" "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/sirupsen/logrus" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.opentelemetry.io/otel/trace" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" @@ -29,33 +33,9 @@ var ( jwtParser = jwt.NewParser() ) -func UnaryLogRequest() grpc.UnaryServerInterceptor { - return func( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (interface{}, error) { - log.Logger.WithContext(ctx).Info(info.FullMethod) - return handler(ctx, req) - } -} -func StreamLogRequest() grpc.StreamServerInterceptor { - return func( - srv interface{}, - stream grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, - ) error { - log.Logger.WithContext(stream.Context()).Info(info.FullMethod) - return handler(srv, stream) - } -} - func GrpcDialOpts() []grpc.DialOption { return []grpc.DialOption{ - grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()), - grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()), + grpc.WithStatsHandler(otelgrpc.NewClientHandler()), grpc.WithTransportCredentials(insecure.NewCredentials()), } } @@ -65,30 +45,34 @@ func GrpcClientWithOtel(address string) (*grpc.ClientConn, error) { } func InitServerDefaults() (*grpc.Server, *runtime.ServeMux) { + opts := []logging.Option{ + logging.WithLogOnEvents(logging.StartCall), + logging.WithCodes(logging.DefaultErrorToCode), + } + return grpc.NewServer( + grpc.StatsHandler(otelgrpc.NewServerHandler()), grpc.ChainUnaryInterceptor( - UnaryLogRequest(), - otelgrpc.UnaryServerInterceptor(), + logging.UnaryServerInterceptor(interceptorLogger(log.Logger), opts...), ), grpc.ChainStreamInterceptor( - StreamLogRequest(), - otelgrpc.StreamServerInterceptor(), + logging.StreamServerInterceptor(interceptorLogger(log.Logger), opts...), )), runtime.NewServeMux() } func ExtractToken(ctx context.Context) (string, error) { if ctx == nil { - return "", status.Errorf(codes.Internal, "context is missing") + return "", model.ErrMissingContext } val := metautils.ExtractIncoming(ctx).Get(AuthorizationHeader) if val == "" { - return "", status.Errorf(codes.Unauthenticated, "request missing authorization") + return "", model.ErrMissingAuthorization } if !strings.HasPrefix(val, AuthorizationScheme) { - return "", status.Errorf(codes.Unauthenticated, "invalid authorization scheme. Expected %s.", AuthorizationScheme) + return "", model.ErrInvalidAuthorization } return val[len(AuthorizationScheme):], nil @@ -96,7 +80,7 @@ func ExtractToken(ctx context.Context) (string, error) { func ExtractClaims(ctx context.Context) (*model.SROClaims, error) { if ctx == nil { - return nil, status.Errorf(codes.Internal, "context is missing") + return nil, model.ErrMissingContext } token, err := ExtractToken(ctx) @@ -115,17 +99,13 @@ func ExtractClaims(ctx context.Context) (*model.SROClaims, error) { } func VerifyClaims(ctx context.Context, client model.KeycloakClient, realm string) (*jwt.Token, *model.SROClaims, error) { - if ctx == nil { - return nil, nil, status.Errorf(codes.Internal, "context is missing") - } - if client == nil { - return nil, nil, status.Errorf(codes.Internal, "gocloak is missing") + return nil, nil, status.Errorf(codes.Internal, model.ErrMissingGocloak.Error()) } tokenString, err := ExtractToken(ctx) if err != nil { - return nil, nil, err + return nil, nil, status.Errorf(codes.Unauthenticated, "invalid authentication") } var claims model.SROClaims @@ -137,13 +117,46 @@ func VerifyClaims(ctx context.Context, client model.KeycloakClient, realm string ) if err != nil { - log.Logger.WithContext(ctx).Errorf("extract claims: %v", err) - return nil, nil, model.ErrUnauthorized + log.Logger.WithContext(ctx).Infof("issues extracting claims: %v", err) + return nil, nil, model.ErrUnauthorized.Err() } if !token.Valid { - return nil, nil, model.ErrUnauthorized + return nil, nil, model.ErrUnauthorized.Err() } + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.SourceOwnerId(claims.Subject), + srospan.SourceOwnerUsername(claims.Username), + ) + return token, &claims, nil } + +// InterceptorLogger adapts logrus logger to interceptor logger. +// This code is simple enough to be copied and not imported. +func interceptorLogger(l logrus.FieldLogger) logging.Logger { + return logging.LoggerFunc(func(_ context.Context, lvl logging.Level, msg string, fields ...any) { + f := make(map[string]any, len(fields)/2) + i := logging.Fields(fields).Iterator() + for i.Next() { + k, v := i.At() + f[k] = v + } + l := l.WithFields(f) + + switch lvl { + case logging.LevelDebug: + l.Debug(msg) + case logging.LevelInfo: + l.Info(msg) + case logging.LevelWarn: + l.Warn(msg) + case logging.LevelError: + l.Error(msg) + default: + l.Fatalf("unknown level %v", lvl) + } + }) +} diff --git a/pkg/helpers/srv_test.go b/pkg/helpers/srv_test.go index 59f9ec1..c67f204 100644 --- a/pkg/helpers/srv_test.go +++ b/pkg/helpers/srv_test.go @@ -28,28 +28,7 @@ var _ = Describe("Srv helpers", func() { BeforeEach(func() { log.Logger, hook = test.NewNullLogger() - }) - - Describe("UnaryLogRequest", func() { - It("should handle requests", func() { - method := faker.Username() - fakeHandler := &mockHandler{} - testFunc := helpers.UnaryLogRequest() - testFunc(nil, nil, &grpc.UnaryServerInfo{FullMethod: method}, fakeHandler.UnaryHandler) - Expect(fakeHandler.WasCalled).To(BeTrue()) - Expect(hook.LastEntry().Message).To(ContainSubstring(method)) - }) - }) - - Describe("StreamLogRequest", func() { - It("should handle requests", func() { - method := faker.Username() - fakeHandler := &mockHandler{} - testFunc := helpers.StreamLogRequest() - testFunc(nil, mockServerStream{}, &grpc.StreamServerInfo{FullMethod: method}, fakeHandler.StreamHandler) - Expect(fakeHandler.WasCalled).To(BeTrue()) - Expect(hook.LastEntry().Message).To(ContainSubstring(method)) - }) + hook.Reset() }) Describe("GrpcDialOpts", func() { @@ -236,7 +215,7 @@ var _ = Describe("Srv helpers", func() { jwtToken, outClaims, err := helpers.VerifyClaims(ctx, mockKeycloak, realm) Expect(jwtToken).To(BeNil()) Expect(outClaims).To(BeNil()) - Expect(err).To(MatchError(model.ErrUnauthorized)) + Expect(err).To(MatchError(model.ErrUnauthorized.Err())) }) }) diff --git a/pkg/mocks/character_s_mock.go b/pkg/mocks/character_s_mock.go index 6518d33..dd065a4 100644 --- a/pkg/mocks/character_s_mock.go +++ b/pkg/mocks/character_s_mock.go @@ -42,10 +42,10 @@ func (m *MockCharacterService) EXPECT() *MockCharacterServiceMockRecorder { } // AddPlayTime mocks base method. -func (m *MockCharacterService) AddPlayTime(ctx context.Context, characterId uint, amount uint64) (uint64, error) { +func (m *MockCharacterService) AddPlayTime(ctx context.Context, characterId uint, amount uint64) (*model.Character, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddPlayTime", ctx, characterId, amount) - ret0, _ := ret[0].(uint64) + ret0, _ := ret[0].(*model.Character) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/pkg/mocks/gamebackend_r_mock.go b/pkg/mocks/gamebackend_r_mock.go index c80c553..2b5d820 100644 --- a/pkg/mocks/gamebackend_r_mock.go +++ b/pkg/mocks/gamebackend_r_mock.go @@ -86,21 +86,6 @@ func (mr *MockdimensionRepositoryMockRecorder) DeleteDimensionByName(ctx, name a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDimensionByName", reflect.TypeOf((*MockdimensionRepository)(nil).DeleteDimensionByName), ctx, name) } -// DuplicateDimension mocks base method. -func (m *MockdimensionRepository) DuplicateDimension(ctx context.Context, refId *uuid.UUID, name string) (*model.Dimension, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DuplicateDimension", ctx, refId, name) - ret0, _ := ret[0].(*model.Dimension) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DuplicateDimension indicates an expected call of DuplicateDimension. -func (mr *MockdimensionRepositoryMockRecorder) DuplicateDimension(ctx, refId, name any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DuplicateDimension", reflect.TypeOf((*MockdimensionRepository)(nil).DuplicateDimension), ctx, refId, name) -} - // FindAllDimensions mocks base method. func (m *MockdimensionRepository) FindAllDimensions(ctx context.Context) (model.Dimensions, error) { m.ctrl.T.Helper() @@ -500,21 +485,6 @@ func (mr *MockGamebackendRepositoryMockRecorder) DeletePendingConnection(ctx, id return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePendingConnection", reflect.TypeOf((*MockGamebackendRepository)(nil).DeletePendingConnection), ctx, id) } -// DuplicateDimension mocks base method. -func (m *MockGamebackendRepository) DuplicateDimension(ctx context.Context, refId *uuid.UUID, name string) (*model.Dimension, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DuplicateDimension", ctx, refId, name) - ret0, _ := ret[0].(*model.Dimension) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DuplicateDimension indicates an expected call of DuplicateDimension. -func (mr *MockGamebackendRepositoryMockRecorder) DuplicateDimension(ctx, refId, name any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DuplicateDimension", reflect.TypeOf((*MockGamebackendRepository)(nil).DuplicateDimension), ctx, refId, name) -} - // FindAllDimensions mocks base method. func (m *MockGamebackendRepository) FindAllDimensions(ctx context.Context) (model.Dimensions, error) { m.ctrl.T.Helper() diff --git a/pkg/model/errors.go b/pkg/model/errors.go index 9563a31..0e2d72a 100644 --- a/pkg/model/errors.go +++ b/pkg/model/errors.go @@ -23,9 +23,18 @@ var ( // ErrInvalidServerLocation thrown when a server location is unknown ErrInvalidServerLocation = errors.New("invalid server location") + // ErrNotOwner thrown when the requester is not the owner of the target + // and doesn't have additional priviledges ErrNotOwner = errors.New("not owner") - ErrUnauthorized = status.Error(codes.Unauthenticated, "not authorized") - ErrDoesNotExist = status.Error(codes.InvalidArgument, "does not exist") - ErrHandleRequest = status.Error(codes.Internal, "unable to handle request") + ErrMissingContext = errors.New("missing valid context") + + ErrMissingAuthorization = errors.New("missing authorization") + ErrInvalidAuthorization = errors.New("invalid authorization scheme") + ErrInvalidAuth = errors.New("invalid auth") + ErrMissingGocloak = errors.New("error A01") + + ErrUnauthorized = status.New(codes.Unauthenticated, "not authorized") + ErrDoesNotExist = status.New(codes.InvalidArgument, "does not exist") + ErrHandleRequest = status.New(codes.Internal, "unable to handle request") ) diff --git a/pkg/repository/character_r.go b/pkg/repository/character_r.go index 06ce5de..548aa9e 100644 --- a/pkg/repository/character_r.go +++ b/pkg/repository/character_r.go @@ -6,9 +6,19 @@ import ( "github.com/ShatteredRealms/go-backend/pkg/log" "github.com/ShatteredRealms/go-backend/pkg/model" + "github.com/ShatteredRealms/go-backend/pkg/srospan" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" "gorm.io/gorm" ) +var ( + tracer = otel.Tracer("character-repo") + meter = otel.Meter("character-repo") + createCnt metric.Int64Counter +) + type CharacterRepository interface { Create(ctx context.Context, character *model.Character) (*model.Character, error) Save(ctx context.Context, character *model.Character) (*model.Character, error) @@ -29,14 +39,18 @@ type characterRepository struct { DB *gorm.DB } -func NewCharacterRepository(db *gorm.DB) CharacterRepository { - return characterRepository{ +func NewCharacterRepository(db *gorm.DB) (repo CharacterRepository, err error) { + repo = characterRepository{ DB: db, } + createCnt, err = meter.Int64Counter("sro.character.create", + metric.WithDescription("The number of created characters by creator"), + metric.WithUnit("{ownerId}")) + return } func (r characterRepository) FindByName(ctx context.Context, name string) (*model.Character, error) { - var character *model.Character = nil + var character *model.Character result := r.DB.WithContext(ctx).Where("name = ?", name).Find(&character) if result.Error != nil { log.Logger.WithContext(ctx).Debugf("find by name err: %v", result.Error) @@ -49,6 +63,12 @@ func (r characterRepository) FindByName(ctx context.Context, name string) (*mode } log.Logger.WithContext(ctx).Debugf("character name %s found", name) + + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(character.ID)), + srospan.TargetCharacterName(character.Name), + ) return character, nil } @@ -62,6 +82,11 @@ func (r characterRepository) Create(ctx context.Context, character *model.Charac return nil, err } + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(character.ID)), + srospan.TargetCharacterName(character.Name), + ) return character, nil } @@ -71,6 +96,11 @@ func (r characterRepository) Save(ctx context.Context, character *model.Characte return nil, err } + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(character.ID)), + srospan.TargetCharacterName(character.Name), + ) return character, nil } @@ -92,6 +122,11 @@ func (r characterRepository) FindById(ctx context.Context, id uint) (*model.Char return nil, nil } + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(character.ID)), + srospan.TargetCharacterName(character.Name), + ) return character, nil } diff --git a/pkg/repository/chat_r.go b/pkg/repository/chat_r.go index a04fd16..623b1ee 100644 --- a/pkg/repository/chat_r.go +++ b/pkg/repository/chat_r.go @@ -2,7 +2,10 @@ package repository import ( "context" + "github.com/ShatteredRealms/go-backend/pkg/model" + "github.com/ShatteredRealms/go-backend/pkg/srospan" + "go.opentelemetry.io/otel/trace" "gorm.io/gorm" ) @@ -43,6 +46,11 @@ func (r chatRepository) ChangeAuthorizationForCharacter(ctx context.Context, cha return nil } + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(characterId)), + ) + return r.DB.Delete(&model.ChatChannelPermission{}, "character_id = ? AND channel_id IN ?", characterId, channelIds).Error } @@ -53,10 +61,17 @@ func (r chatRepository) AuthorizedChannelsForCharacter(ctx context.Context, char Joins("JOIN chat_channel_permissions ON chat_channels.id = chat_channel_permissions.channel_id"). Where("chat_channel_permissions.character_id = ?", characterId). Find(&channels) + + span := trace.SpanFromContext(ctx) + span.SetAttributes( + srospan.TargetCharacterId(int(characterId)), + ) + return channels, r.DB.Error } func (r chatRepository) UpdateChannel(ctx context.Context, channel *model.ChatChannel) (*model.ChatChannel, error) { + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return channel, r.DB.WithContext(ctx).Save(&channel).Error } @@ -67,14 +82,17 @@ func (r chatRepository) AllChannels(ctx context.Context) (model.ChatChannels, er } func (r chatRepository) CreateChannel(ctx context.Context, channel *model.ChatChannel) (*model.ChatChannel, error) { + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return channel, r.DB.WithContext(ctx).Create(&channel).Error } func (r chatRepository) DeleteChannel(ctx context.Context, channel *model.ChatChannel) error { + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return r.DB.WithContext(ctx).Delete(channel).Error } func (r chatRepository) FullDeleteChannel(ctx context.Context, channel *model.ChatChannel) error { + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return r.DB.WithContext(ctx).Unscoped().Delete(channel).Error } @@ -93,6 +111,7 @@ func (r chatRepository) FindChannelById(ctx context.Context, id uint) (*model.Ch return nil, nil } + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return channel, nil } @@ -107,6 +126,7 @@ func (r chatRepository) FindDeletedWithName(ctx context.Context, name string) (* return nil, nil } + trace.SpanFromContext(ctx).SetAttributes(srospan.ChatChannelAttributes(channel)...) return channel, nil } diff --git a/pkg/repository/db.go b/pkg/repository/db.go index 59503bc..a83bb19 100644 --- a/pkg/repository/db.go +++ b/pkg/repository/db.go @@ -33,11 +33,10 @@ func ConnectDB(pool config.DBPoolConfig) (*gorm.DB, error) { Logger: logger.New( log.Logger, logger.Config{ - SlowThreshold: 0, + SlowThreshold: time.Millisecond * 500, Colorful: true, IgnoreRecordNotFoundError: true, ParameterizedQueries: true, - LogLevel: logger.Info, }, ), }) diff --git a/pkg/repository/repository_suite_test.go b/pkg/repository/repository_suite_test.go index c712ea5..62b215e 100644 --- a/pkg/repository/repository_suite_test.go +++ b/pkg/repository/repository_suite_test.go @@ -49,7 +49,9 @@ func TestRepository(t *testing.T) { mdb = testdb.ConnectMongoDocker(mdbConnStr) Expect(mdb).NotTo(BeNil()) - characterRepo = repository.NewCharacterRepository(gdb) + var err error + characterRepo, err = repository.NewCharacterRepository(gdb) + Expect(err).NotTo(HaveOccurred()) Expect(characterRepo).NotTo(BeNil()) Expect(characterRepo.Migrate(context.Background())).NotTo(HaveOccurred()) @@ -87,7 +89,9 @@ func TestRepository(t *testing.T) { mdb = testdb.ConnectMongoDocker(hosts[1]) Expect(mdb).NotTo(BeNil()) - characterRepo = repository.NewCharacterRepository(gdb) + var err error + characterRepo, err = repository.NewCharacterRepository(gdb) + Expect(err).NotTo(HaveOccurred()) Expect(characterRepo).NotTo(BeNil()) chatRepo = repository.NewChatRepository(gdb) Expect(chatRepo).NotTo(BeNil()) diff --git a/pkg/service/character_s.go b/pkg/service/character_s.go index a21628e..f6f3f37 100644 --- a/pkg/service/character_s.go +++ b/pkg/service/character_s.go @@ -22,7 +22,7 @@ type CharacterService interface { FindAll(context.Context) (model.Characters, error) - AddPlayTime(ctx context.Context, characterId uint, amount uint64) (uint64, error) + AddPlayTime(ctx context.Context, characterId uint, amount uint64) (*model.Character, error) } type characterService struct { @@ -79,7 +79,8 @@ func (s characterService) Edit(ctx context.Context, character *pb.EditCharacterR currentCharacter, err = s.FindByName(ctx, target.Name) default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() + } if err != nil { @@ -143,14 +144,14 @@ func (s characterService) FindAllByOwner(ctx context.Context, owner string) (mod return s.repo.FindAllByOwner(ctx, owner) } -func (s characterService) AddPlayTime(ctx context.Context, characterId uint, amount uint64) (uint64, error) { +func (s characterService) AddPlayTime(ctx context.Context, characterId uint, amount uint64) (*model.Character, error) { character, err := s.FindById(ctx, characterId) if err != nil { - return 0, err + return nil, err } character.PlayTime += amount character, err = s.repo.Save(ctx, character) - return character.PlayTime, err + return character, err } diff --git a/pkg/service/character_s_test.go b/pkg/service/character_s_test.go index e0369d4..9d0e9ab 100644 --- a/pkg/service/character_s_test.go +++ b/pkg/service/character_s_test.go @@ -321,7 +321,7 @@ var _ = Describe("Character service", func() { Target: &pb.CharacterTarget{}, } out, err := charService.Edit(ctx, editReq) - Expect(err).To(MatchError(model.ErrHandleRequest)) + Expect(err).To(MatchError(model.ErrHandleRequest.Err())) Expect(out).To(BeNil()) }) }) @@ -390,7 +390,7 @@ var _ = Describe("Character service", func() { mockRepository.EXPECT().Save(ctx, gomock.Any()).Return(charOut, fakeError) out, err := charService.AddPlayTime(ctx, character.ID, amount) Expect(err).To(MatchError(fakeError)) - Expect(out).To(BeEquivalentTo(charOut.PlayTime)) + Expect(out.PlayTime).To(BeEquivalentTo(charOut.PlayTime)) }) }) @@ -399,7 +399,7 @@ var _ = Describe("Character service", func() { mockRepository.EXPECT().FindById(ctx, character.ID).Return(nil, fakeError) out, err := charService.AddPlayTime(ctx, character.ID, amount) Expect(err).To(MatchError(fakeError)) - Expect(out).To(BeEquivalentTo(0)) + Expect(out).To(BeNil()) }) }) }) diff --git a/pkg/service/gamebackend_s.go b/pkg/service/gamebackend_s.go index 617bf30..240de48 100644 --- a/pkg/service/gamebackend_s.go +++ b/pkg/service/gamebackend_s.go @@ -91,7 +91,8 @@ func (s *gamebackendService) FindDimension(ctx context.Context, target *pb.Dimen default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() + } } @@ -110,7 +111,8 @@ func (s *gamebackendService) FindMap(ctx context.Context, target *pb.MapTarget) default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() + } } @@ -121,7 +123,8 @@ func (s *gamebackendService) DuplicateDimension(ctx context.Context, target *pb. return nil, err } if dimension == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() + } ids := make([]*uuid.UUID, len(dimension.Maps)) @@ -218,7 +221,8 @@ func (s *gamebackendService) EditDimension(ctx context.Context, request *pb.Edit } if currentDimension == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() + } if request.OptionalName != nil { @@ -282,7 +286,8 @@ func (s *gamebackendService) EditMap(ctx context.Context, request *pb.EditMapReq currentMap, err = s.FindMapByName(ctx, target.Name) default: log.Logger.WithContext(ctx).Errorf("map target type unknown: %+v", request.Target) - err = model.ErrHandleRequest + err = model.ErrHandleRequest.Err() + } if err != nil { @@ -290,7 +295,8 @@ func (s *gamebackendService) EditMap(ctx context.Context, request *pb.EditMapReq } if currentMap == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() + } if request.OptionalName != nil { @@ -382,7 +388,8 @@ func (s *gamebackendService) DeleteDimension(ctx context.Context, target *pb.Dim default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return model.ErrHandleRequest + return model.ErrHandleRequest.Err() + } } @@ -401,6 +408,7 @@ func (s *gamebackendService) DeleteMap(ctx context.Context, target *pb.MapTarget default: log.Logger.WithContext(ctx).Errorf("target type unknown: %+v", target) - return model.ErrHandleRequest + return model.ErrHandleRequest.Err() + } } diff --git a/pkg/srospan/attributes.go b/pkg/srospan/attributes.go new file mode 100644 index 0000000..c6f6a74 --- /dev/null +++ b/pkg/srospan/attributes.go @@ -0,0 +1,46 @@ +package srospan + +import ( + "github.com/ShatteredRealms/go-backend/pkg/model" + "go.opentelemetry.io/otel/attribute" +) + +func SourceOwnerId(val string) attribute.KeyValue { + return attribute.String("sro.source.owner.id", val) +} + +func SourceOwnerUsername(val string) attribute.KeyValue { + return attribute.String("sro.source.owner.username", val) +} + +func SourceCharacterId(val int) attribute.KeyValue { + return attribute.Int("sro.source.character.id", val) +} + +func SourceCharacterName(val string) attribute.KeyValue { + return attribute.String("sro.source.character.username", val) +} + +func TargetOwnerId(val string) attribute.KeyValue { + return attribute.String("sro.target.owner.id", val) +} + +func TargetOwnerUsername(val string) attribute.KeyValue { + return attribute.String("sro.target.owner.username", val) +} + +func TargetCharacterId(val int) attribute.KeyValue { + return attribute.Int("sro.target.character.id", val) +} + +func TargetCharacterName(val string) attribute.KeyValue { + return attribute.String("sro.target.character.username", val) +} + +func ChatChannelAttributes(channel *model.ChatChannel) []attribute.KeyValue { + return []attribute.KeyValue{ + attribute.Int("sro.chat.id", int(channel.ID)), + attribute.String("sro.chat.name", channel.Name), + attribute.String("sro.chat.dimension", channel.Dimension), + } +} diff --git a/pkg/srv/character.go b/pkg/srv/character.go index 99f57a9..886bc4f 100644 --- a/pkg/srv/character.go +++ b/pkg/srv/character.go @@ -57,15 +57,15 @@ func (s *charactersServiceServer) AddCharacterPlayTime( ctx context.Context, request *pb.AddPlayTimeRequest, ) (*pb.PlayTimeResponse, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleAddCharacterPlayTime, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } characterId, err := s.getCharacterTargetId(ctx, request.Character) @@ -74,12 +74,12 @@ func (s *charactersServiceServer) AddCharacterPlayTime( } // Add playtime - time, err := s.server.CharacterService.AddPlayTime(ctx, characterId, request.Time) + character, err := s.server.CharacterService.AddPlayTime(ctx, characterId, request.Time) if err != nil { return nil, status.Error(codes.Internal, "could not update playtime") } - return &pb.PlayTimeResponse{Time: time}, nil + return &pb.PlayTimeResponse{Time: character.PlayTime}, nil } // CreateCharacter implements pb.CharacterServiceServer @@ -87,15 +87,15 @@ func (s *charactersServiceServer) CreateCharacter( ctx context.Context, request *pb.CreateCharacterRequest, ) (*pb.CharacterDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagement, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } ownerId, err := s.getUserIdFromTarget(ctx, request.Owner) @@ -105,7 +105,7 @@ func (s *charactersServiceServer) CreateCharacter( // If not requesting to create character for self, verify requester has permission for other if claims.Subject != ownerId && !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Create new character @@ -131,15 +131,15 @@ func (s *charactersServiceServer) DeleteCharacter( ctx context.Context, request *pb.CharacterTarget, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagement, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.getCharacterFromTarget(ctx, request) @@ -148,12 +148,12 @@ func (s *charactersServiceServer) DeleteCharacter( } if character == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } // If not requesting to delete requester own character, verify it has permission to delete others if claims.Subject != character.OwnerId && !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } err = s.server.CharacterService.Delete(ctx, character.ID) @@ -170,15 +170,15 @@ func (s *charactersServiceServer) EditCharacter( ctx context.Context, request *pb.EditCharacterRequest, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission to change playtime otherwise don't allow changing @@ -200,16 +200,16 @@ func (s *charactersServiceServer) GetCharacter( ctx context.Context, request *pb.CharacterTarget, ) (*pb.CharacterDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagement, model.CharactersClientId) { log.Logger.WithContext(ctx).Error("no permission") - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.getCharacterFromTarget(ctx, request) @@ -219,12 +219,12 @@ func (s *charactersServiceServer) GetCharacter( } if character == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } if character.OwnerId != claims.Subject && !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { log.Logger.WithContext(ctx).Infof("user %s requested character %s without %s", claims.Subject, character.Name, *RoleCharacterManagementOther.Name) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } return character.ToPb(), nil @@ -235,27 +235,27 @@ func (s *charactersServiceServer) GetAllCharactersForUser( ctx context.Context, request *pb.UserTarget, ) (*pb.CharactersDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagement, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } id, err := s.getUserIdFromTarget(ctx, request) if err != nil { log.Logger.WithContext(ctx).Errorf("get user id from target: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if id != claims.Subject && !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } chars, err := s.server.CharacterService.FindAllByOwner(ctx, id) @@ -272,15 +272,15 @@ func (s *charactersServiceServer) GetCharacters( ctx context.Context, msg *emptypb.Empty, ) (*pb.CharactersDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleCharacterManagementOther, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } chars, err := s.server.CharacterService.FindAll(ctx) @@ -297,15 +297,15 @@ func (s *charactersServiceServer) GetInventory( ctx context.Context, request *pb.CharacterTarget, ) (*pb.Inventory, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleInventoryManagement, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.getCharacterFromTarget(ctx, request) @@ -314,7 +314,7 @@ func (s *charactersServiceServer) GetInventory( } if character == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } inv, err := s.server.InventoryService.GetInventory(ctx, character.ID) @@ -334,15 +334,15 @@ func (s *charactersServiceServer) SetInventory( ctx context.Context, request *pb.UpdateInventoryRequest, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Character.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleInventoryManagement, model.CharactersClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.getCharacterFromTarget(ctx, request.Target) @@ -351,7 +351,7 @@ func (s *charactersServiceServer) SetInventory( } if character == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } newInv := &model.CharacterInventory{ @@ -379,7 +379,7 @@ func NewCharacterServiceServer( ctx, server.GlobalConfig.Character.Keycloak.ClientId, server.GlobalConfig.Character.Keycloak.ClientSecret, - server.GlobalConfig.Character.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, fmt.Errorf("login keycloak: %v", err) @@ -388,7 +388,7 @@ func NewCharacterServiceServer( err = createRoles(ctx, server.KeycloakClient, token.AccessToken, - server.GlobalConfig.Character.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, server.GlobalConfig.Character.Keycloak.Id, &CharacterRoles, ) @@ -404,9 +404,9 @@ func NewCharacterServiceServer( func (s charactersServiceServer) serverContext(ctx context.Context) (context.Context, error) { token, err := s.server.KeycloakClient.LoginClient( ctx, - s.server.GlobalConfig.Chat.Keycloak.ClientId, - s.server.GlobalConfig.Chat.Keycloak.ClientSecret, - s.server.GlobalConfig.Chat.Keycloak.Realm, + s.server.GlobalConfig.Character.Keycloak.ClientId, + s.server.GlobalConfig.Character.Keycloak.ClientSecret, + s.server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, err @@ -439,7 +439,7 @@ func (s charactersServiceServer) getCharacterTargetId( characterId = char.ID default: log.Logger.WithContext(ctx).Errorf("target type unknown: %s", reflect.TypeOf(target).Name()) - return 0, model.ErrHandleRequest + return 0, model.ErrHandleRequest.Err() } return characterId, nil @@ -465,17 +465,17 @@ func (s charactersServiceServer) getCharacterFromTarget( default: log.Logger.WithContext(ctx).Errorf("target type unknown: %s", reflect.TypeOf(target).Name()) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } if err != nil { log.Logger.WithContext(ctx).Debugf("err: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } if character == nil { log.Logger.WithContext(ctx).Debugf("character not found") - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } return character, nil @@ -489,11 +489,11 @@ func (s charactersServiceServer) getUserIdFromTarget( ctx, s.server.GlobalConfig.Character.Keycloak.ClientId, s.server.GlobalConfig.Character.Keycloak.ClientSecret, - s.server.GlobalConfig.Character.Keycloak.Realm, + s.server.GlobalConfig.Keycloak.Realm, ) if err != nil { log.Logger.WithContext(ctx).Errorf("login keycloak: %v", err) - return "", model.ErrHandleRequest + return "", model.ErrHandleRequest.Err() } ownerId := request.GetId() @@ -501,7 +501,7 @@ func (s charactersServiceServer) getUserIdFromTarget( resp, err := s.server.KeycloakClient.GetUsers( ctx, token.AccessToken, - s.server.GlobalConfig.Character.Keycloak.Realm, + s.server.GlobalConfig.Keycloak.Realm, gocloak.GetUsersParams{ Exact: gocloak.BoolP(true), Username: gocloak.StringP(val.Username), @@ -509,10 +509,10 @@ func (s charactersServiceServer) getUserIdFromTarget( ) if err != nil { log.Logger.WithContext(ctx).Errorf("keycloak get users: %v", err) - return "", model.ErrHandleRequest + return "", model.ErrHandleRequest.Err() } if len(resp) == 0 || len(resp) > 1 { - return "", model.ErrDoesNotExist + return "", model.ErrDoesNotExist.Err() } ownerId = *resp[0].ID diff --git a/pkg/srv/character_test.go b/pkg/srv/character_test.go index 1b24c8f..b6b2553 100644 --- a/pkg/srv/character_test.go +++ b/pkg/srv/character_test.go @@ -88,10 +88,10 @@ var _ = Describe("Character server", func() { Time: 100, } mockCharService.EXPECT().FindByName(gomock.Any(), character.Name).Return(character, nil) - mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(uint64(200), nil) + mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(character, nil) out, err := server.AddCharacterPlayTime(incAdminCtx, req) Expect(err).NotTo(HaveOccurred()) - Expect(out.Time).To(BeEquivalentTo(200)) + Expect(out.Time).To(BeEquivalentTo(character.PlayTime)) }) It("should work given character id", func() { req := &pb.AddPlayTimeRequest{ @@ -100,10 +100,10 @@ var _ = Describe("Character server", func() { }, Time: 100, } - mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(uint64(200), nil) + mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(character, nil) out, err := server.AddCharacterPlayTime(incAdminCtx, req) Expect(err).NotTo(HaveOccurred()) - Expect(out.Time).To(BeEquivalentTo(200)) + Expect(out.Time).To(BeEquivalentTo(character.PlayTime)) }) }) When("given invalid input", func() { @@ -114,7 +114,7 @@ var _ = Describe("Character server", func() { }, Time: 100, } - mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(uint64(200), fakeErr) + mockCharService.EXPECT().AddPlayTime(gomock.Any(), character.ID, req.Time).Return(character, fakeErr) out, err := server.AddCharacterPlayTime(incAdminCtx, req) Expect(err).To(HaveOccurred()) Expect(out).To(BeNil()) diff --git a/pkg/srv/chat.go b/pkg/srv/chat.go index 53ff13a..5fd3b94 100644 --- a/pkg/srv/chat.go +++ b/pkg/srv/chat.go @@ -45,15 +45,15 @@ func (s chatServiceServer) ConnectChannel( request *pb.ChatChannelTarget, server pb.ChatService_ConnectChannelServer, ) error { - _, claims, err := helpers.VerifyClaims(server.Context(), s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(server.Context(), s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(server.Context()).Errorf("verify claims: %v", err) - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChat, model.ChatClientId) { - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } // Validate requester has chat channel permissions @@ -90,24 +90,24 @@ func (s chatServiceServer) ConnectDirectMessage( request *pb.CharacterTarget, server pb.ChatService_ConnectDirectMessageServer, ) error { - _, claims, err := helpers.VerifyClaims(server.Context(), s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(server.Context(), s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(server.Context()).Errorf("verify claims: %v", err) - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChat, model.ChatClientId) { - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } char, err := s.verifyUserOwnsCharacter(server.Context(), request) if err == model.ErrNotOwner { if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } } else if err != nil { - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } r := s.server.ChatService.DirectMessagesReader(server.Context(), char.Name) @@ -134,16 +134,16 @@ func (s chatServiceServer) SendChatMessage( ctx context.Context, request *pb.SendChatMessageRequest, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChat, model.ChatClientId) { log.Logger.WithContext(ctx).Infof("unauthorized request") - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.verifyUserOwnsCharacter( ctx, @@ -160,7 +160,7 @@ func (s chatServiceServer) SendChatMessage( serverCtx, err := s.serverContext(ctx) if err != nil { log.Logger.WithContext(ctx).Infof("creating server context: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } channels, err := s.server.ChatService.AuthorizedChannelsForCharacter(serverCtx, uint(character.Id)) @@ -178,7 +178,7 @@ func (s chatServiceServer) SendChatMessage( } if !canSend { log.Logger.WithContext(ctx).Infof("%s attempted sending message to chat channel %d without permission", character.Name, request.ChannelId) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } } @@ -200,15 +200,15 @@ func (s chatServiceServer) SendDirectMessage( ctx context.Context, request *pb.SendDirectMessageRequest, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChat, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } if _, err = s.verifyUserOwnsCharacter( @@ -221,7 +221,7 @@ func (s chatServiceServer) SendDirectMessage( srvCtx, err := s.serverContext(ctx) if err != nil { log.Logger.WithContext(ctx).Errorf("create server context: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } targetCharacterName, err := helpers.GetCharacterNameFromTarget(srvCtx, s.server.CharacterService, request.Target) if err != nil { @@ -245,15 +245,15 @@ func (s chatServiceServer) GetChannel( ctx context.Context, request *pb.ChatChannelTarget, ) (*pb.ChatChannel, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } c, err := s.server.ChatService.GetChannel(ctx, uint(request.Id)) @@ -263,7 +263,7 @@ func (s chatServiceServer) GetChannel( } if c == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } return c.ToPb(), nil @@ -273,15 +273,15 @@ func (s chatServiceServer) CreateChannel( ctx context.Context, request *pb.CreateChannelMessage, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } _, err = s.server.ChatService.CreateChannel( @@ -308,15 +308,15 @@ func (s chatServiceServer) DeleteChannel( ctx context.Context, request *pb.ChatChannelTarget, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } err = s.server.ChatService.DeleteChannel(ctx, &model.ChatChannel{ @@ -324,7 +324,7 @@ func (s chatServiceServer) DeleteChannel( }) if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } log.Logger.WithContext(ctx).Errorf("delete channel: %v", err) @@ -338,21 +338,21 @@ func (s chatServiceServer) EditChannel( ctx context.Context, request *pb.UpdateChatChannelRequest, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } _, err = s.server.ChatService.UpdateChannel(ctx, request) if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } log.Logger.WithContext(ctx).Errorf("edit channel: %v", err) @@ -366,15 +366,15 @@ func (s chatServiceServer) AllChatChannels( ctx context.Context, _ *emptypb.Empty, ) (*pb.ChatChannels, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } channels, err := s.server.ChatService.AllChannels(ctx) @@ -390,15 +390,15 @@ func (s chatServiceServer) GetAuthorizedChatChannels( ctx context.Context, request *pb.CharacterTarget, ) (*pb.ChatChannels, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChat, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.verifyUserOwnsCharacter(ctx, request) @@ -424,21 +424,21 @@ func (s chatServiceServer) UpdateUserChatChannelAuthorizations( ctx context.Context, request *pb.RequestChatChannelAuthChange, ) (*emptypb.Empty, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleChatChannelManage, model.ChatClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } srvCtx, err := s.serverContext(ctx) if err != nil { log.Logger.WithContext(ctx).Errorf("create server context: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } targetCharacterId, err := helpers.GetCharacterIdFromTarget(srvCtx, s.server.CharacterService, request.Character) if err != nil { @@ -471,7 +471,7 @@ func NewChatServiceServer( ctx, server.GlobalConfig.Chat.Keycloak.ClientId, server.GlobalConfig.Chat.Keycloak.ClientSecret, - server.GlobalConfig.Chat.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, fmt.Errorf("login keycloak: %v", err) @@ -480,7 +480,7 @@ func NewChatServiceServer( err = createRoles(ctx, server.KeycloakClient, token.AccessToken, - server.GlobalConfig.Chat.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, server.GlobalConfig.Chat.Keycloak.Id, &ChatRoles, ) @@ -499,7 +499,7 @@ func (s chatServiceServer) serverContext(ctx context.Context) (context.Context, ctx, s.server.GlobalConfig.Chat.Keycloak.ClientId, s.server.GlobalConfig.Chat.Keycloak.ClientSecret, - s.server.GlobalConfig.Chat.Keycloak.Realm, + s.server.GlobalConfig.Keycloak.Realm, ) if err != nil { log.Logger.WithContext(ctx).Errorf("keycloak login failure: %v", err) @@ -513,16 +513,16 @@ func (s chatServiceServer) serverContext(ctx context.Context) (context.Context, } func (s chatServiceServer) verifyUserOwnsCharacter(ctx context.Context, request *pb.CharacterTarget) (*pb.CharacterDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } srvCtx, err := s.serverContext(ctx) if err != nil { log.Logger.WithContext(ctx).Errorf("create server context: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } character, err := s.server.CharacterService.GetCharacter(srvCtx, request) @@ -545,21 +545,21 @@ func (s chatServiceServer) verifyUserOwnsCharacter(ctx context.Context, request func (s chatServiceServer) checkUserChannelAuth(ctx context.Context, userId string, channelId uint) error { serverAuthCtx, err := s.serverContext(ctx) if err != nil { - return model.ErrHandleRequest + return model.ErrHandleRequest.Err() } characters, err := s.server.CharacterService.GetAllCharactersForUser(serverAuthCtx, &pb.UserTarget{Target: &pb.UserTarget_Id{Id: userId}}) if err != nil { log.Logger.WithContext(ctx).Errorf("get characters: %v", err) - return model.ErrHandleRequest + return model.ErrHandleRequest.Err() } for _, character := range characters.Characters { channels, err := s.server.ChatService.AuthorizedChannelsForCharacter(serverAuthCtx, uint(character.Id)) if err != nil { log.Logger.WithContext(ctx).Errorf("getting authorized channels: %v", err) - return model.ErrHandleRequest + return model.ErrHandleRequest.Err() } for _, channel := range channels { @@ -569,5 +569,5 @@ func (s chatServiceServer) checkUserChannelAuth(ctx context.Context, userId stri } } - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } diff --git a/pkg/srv/chat_test.go b/pkg/srv/chat_test.go index 2e90a74..5287f47 100644 --- a/pkg/srv/chat_test.go +++ b/pkg/srv/chat_test.go @@ -188,12 +188,12 @@ var _ = Describe("Chat", func() { When("given invalid input", func() { It("should error on invalid claims", func() { mockInSrv.EXPECT().Context().Return(nil).AnyTimes() - Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error on no permissions (guest)", func() { mockInSrv.EXPECT().Context().Return(incGuestCtx).AnyTimes() - Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error on no permissions for chat channel (player)", func() { @@ -202,7 +202,7 @@ var _ = Describe("Chat", func() { Return(&pb.CharactersDetails{Characters: []*pb.CharacterDetails{character.ToPb()}}, nil) mockChatService.EXPECT().AuthorizedChannelsForCharacter(gomock.Any(), character.ID).Return(model.ChatChannels{}, nil) mockInSrv.EXPECT().Context().Return(incPlayerCtx).AnyTimes() - Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error if getting characters has errors", func() { @@ -210,7 +210,7 @@ var _ = Describe("Chat", func() { GetAllCharactersForUser(gomock.Any(), gomock.Any()). Return(nil, fakeErr) mockInSrv.EXPECT().Context().Return(incPlayerCtx).AnyTimes() - Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrHandleRequest)) + Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrHandleRequest.Err())) }) It("should error if getting authorized channels for character has errors", func() { @@ -219,7 +219,7 @@ var _ = Describe("Chat", func() { Return(&pb.CharactersDetails{Characters: []*pb.CharacterDetails{character.ToPb()}}, nil) mockChatService.EXPECT().AuthorizedChannelsForCharacter(gomock.Any(), character.ID).Return(nil, fakeErr) mockInSrv.EXPECT().Context().Return(incPlayerCtx).AnyTimes() - Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrHandleRequest)) + Expect(server.ConnectChannel(req, mockInSrv)).To(MatchError(model.ErrHandleRequest.Err())) }) }) }) @@ -259,7 +259,7 @@ var _ = Describe("Chat", func() { }) It("should work for users with chat permissions (player)", func() { - _, claims, err := helpers.VerifyClaims(incPlayerCtx, keycloak, conf.Chat.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(incPlayerCtx, keycloak, conf.Keycloak.Realm) Expect(err).NotTo(HaveOccurred()) Expect(claims.Subject).To(Equal(character.OwnerId)) mockChatService.EXPECT().DirectMessagesReader(gomock.Any(), character.Name).Return(kafka.NewReader(readerConfig)) @@ -276,12 +276,12 @@ var _ = Describe("Chat", func() { When("given invalid input", func() { It("should error on invalid claims", func() { mockInSrv.EXPECT().Context().Return(nil).AnyTimes() - Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error on no permissions (guest)", func() { mockInSrv.EXPECT().Context().Return(incGuestCtx).AnyTimes() - Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error if not owner of character (player)", func() { @@ -290,7 +290,7 @@ var _ = Describe("Chat", func() { GetCharacter(gomock.Any(), gomock.Any()). Return(character.ToPb(), nil) mockInSrv.EXPECT().Context().Return(incPlayerCtx).AnyTimes() - Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized)) + Expect(server.ConnectDirectMessage(req, mockInSrv)).To(MatchError(model.ErrUnauthorized.Err())) }) It("should error if getting characters has errors", func() { diff --git a/pkg/srv/connection.go b/pkg/srv/connection.go index cd83aac..51e776e 100644 --- a/pkg/srv/connection.go +++ b/pkg/srv/connection.go @@ -51,15 +51,15 @@ func (s connectionServiceServer) ConnectGameServer( ctx context.Context, request *pb.CharacterTarget, ) (*pb.ConnectGameServerResponse, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.GameBackend.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleConnect, model.GamebackendClientId) { - return nil, errors.Wrapf(model.ErrUnauthorized, "no role %s", *RoleConnect.Name) + return nil, errors.Wrapf(model.ErrUnauthorized.Err(), "no role %s", *RoleConnect.Name) } // If the current user can't get the character, then deny the request @@ -73,7 +73,7 @@ func (s connectionServiceServer) ConnectGameServer( } if character == nil { log.Logger.WithContext(ctx).Warnf("%s requested character %v but does not exists", claims.Username, request.Type) - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } if s.server.GlobalConfig.GameBackend.Mode == config.LocalMode { @@ -107,15 +107,15 @@ func (s connectionServiceServer) VerifyConnect( ctx context.Context, request *pb.VerifyConnectRequest, ) (*pb.CharacterDetails, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.GameBackend.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleManageConnections, model.GamebackendClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } id, err := uuid.Parse(request.ConnectionId) @@ -153,15 +153,15 @@ func (s connectionServiceServer) TransferPlayer( ctx context.Context, request *pb.TransferPlayerRequest, ) (*pb.ConnectGameServerResponse, error) { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.GameBackend.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleManageConnections, model.GamebackendClientId) { - return nil, model.ErrUnauthorized + return nil, model.ErrUnauthorized.Err() } character, err := s.server.CharacterClient.GetCharacter( @@ -212,7 +212,7 @@ func (s connectionServiceServer) requestConnection( srvCtx, err := s.serverContext(ctx) if err != nil { log.Logger.WithContext(ctx).Errorf("create server context: %v", err) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } allocatedState := v1.GameServerStateAllocated @@ -300,7 +300,7 @@ func NewConnectionServiceServer( ctx, server.GlobalConfig.GameBackend.Keycloak.ClientId, server.GlobalConfig.GameBackend.Keycloak.ClientSecret, - server.GlobalConfig.GameBackend.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, fmt.Errorf("login keycloak: %v", err) @@ -309,7 +309,7 @@ func NewConnectionServiceServer( err = createRoles(ctx, server.KeycloakClient, token.AccessToken, - server.GlobalConfig.GameBackend.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, server.GlobalConfig.GameBackend.Keycloak.Id, &ConnectionRoles, ) @@ -346,7 +346,7 @@ func (s connectionServiceServer) serverContext(ctx context.Context) (context.Con ctx, s.server.GlobalConfig.GameBackend.Keycloak.ClientId, s.server.GlobalConfig.GameBackend.Keycloak.ClientSecret, - s.server.GlobalConfig.GameBackend.Keycloak.Realm, + s.server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, err diff --git a/pkg/srv/errors.go b/pkg/srv/errors.go new file mode 100644 index 0000000..9d48470 --- /dev/null +++ b/pkg/srv/errors.go @@ -0,0 +1,3 @@ +package srv + +var () diff --git a/pkg/srv/servermanager.go b/pkg/srv/servermanager.go index 30f5bdc..4ed719f 100644 --- a/pkg/srv/servermanager.go +++ b/pkg/srv/servermanager.go @@ -127,7 +127,7 @@ func (s *serverManagerServiceServer) DeleteDimension( return nil, err } if dimension == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } err = s.server.GamebackendService.DeleteDimensionById(ctx, dimension.Id) @@ -235,7 +235,7 @@ func (s *serverManagerServiceServer) EditDimension( return nil, err } if originalDimension == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } newDimension, err := s.server.GamebackendService.EditDimension(ctx, request) @@ -323,7 +323,7 @@ func (s *serverManagerServiceServer) EditMap( return nil, err } if originalMap == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } newMap, err := s.server.GamebackendService.EditMap(ctx, request) @@ -416,7 +416,7 @@ func (s *serverManagerServiceServer) GetDimension( } if dimension == nil { - return nil, status.Error(codes.InvalidArgument, model.ErrDoesNotExist.Error()) + return nil, model.ErrDoesNotExist.Err() } return dimension.ToPb(), nil @@ -439,7 +439,7 @@ func (s *serverManagerServiceServer) GetMap( } if m == nil { - return nil, status.Error(codes.InvalidArgument, model.ErrDoesNotExist.Error()) + return nil, model.ErrDoesNotExist.Err() } return m.ToPb(), nil @@ -453,7 +453,7 @@ func NewServerManagerServiceServer( ctx, server.GlobalConfig.GameBackend.Keycloak.ClientId, server.GlobalConfig.GameBackend.Keycloak.ClientSecret, - server.GlobalConfig.GameBackend.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, fmt.Errorf("login keycloak: %v", err) @@ -462,7 +462,7 @@ func NewServerManagerServiceServer( err = createRoles(ctx, server.KeycloakClient, token.AccessToken, - server.GlobalConfig.GameBackend.Keycloak.Realm, + server.GlobalConfig.Keycloak.Realm, server.GlobalConfig.GameBackend.Keycloak.Id, &ConnectionRoles, ) @@ -480,7 +480,7 @@ func (s serverManagerServiceServer) serverContext(ctx context.Context) (context. ctx, s.server.GlobalConfig.GameBackend.Keycloak.ClientId, s.server.GlobalConfig.GameBackend.Keycloak.ClientSecret, - s.server.GlobalConfig.GameBackend.Keycloak.Realm, + s.server.GlobalConfig.Keycloak.Realm, ) if err != nil { return nil, err @@ -493,15 +493,15 @@ func (s serverManagerServiceServer) serverContext(ctx context.Context) (context. } func (s serverManagerServiceServer) hasServerManagerRole(ctx context.Context) error { - _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.GameBackend.Keycloak.Realm) + _, claims, err := helpers.VerifyClaims(ctx, s.server.KeycloakClient, s.server.GlobalConfig.Keycloak.Realm) if err != nil { log.Logger.WithContext(ctx).Errorf("verify claims: %v", err) - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } // Validate requester has correct permission if !claims.HasResourceRole(RoleServerManager, model.GamebackendClientId) { - return model.ErrUnauthorized + return model.ErrUnauthorized.Err() } return nil @@ -743,14 +743,14 @@ func (s serverManagerServiceServer) findMapByNameOrId( default: log.Logger.WithContext(ctx).Errorf("target type unknown: %v", requestTarget) - return nil, model.ErrHandleRequest + return nil, model.ErrHandleRequest.Err() } if err != nil { return nil, status.Error(codes.Internal, err.Error()) } if out == nil { - return nil, model.ErrDoesNotExist + return nil, model.ErrDoesNotExist.Err() } return out, nil diff --git a/pkg/srv/srv_suite_test.go b/pkg/srv/srv_suite_test.go index 5d6a713..9371086 100644 --- a/pkg/srv/srv_suite_test.go +++ b/pkg/srv/srv_suite_test.go @@ -9,9 +9,11 @@ import ( "github.com/Nerzal/gocloak/v13" "github.com/ShatteredRealms/go-backend/pkg/config" + "github.com/ShatteredRealms/go-backend/pkg/log" testdb "github.com/ShatteredRealms/go-backend/test/db" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "github.com/sirupsen/logrus/hooks/test" "google.golang.org/grpc/metadata" ) @@ -98,6 +100,7 @@ func TestSrv(t *testing.T) { var err error SynchronizedBeforeSuite(func() []byte { + log.Logger, _ = test.NewNullLogger() var host string keycloakCloseFunc, host = testdb.SetupKeycloakWithDocker() Expect(host).NotTo(BeNil()) @@ -109,28 +112,28 @@ func TestSrv(t *testing.T) { context.Background(), conf.Character.Keycloak.ClientId, conf.Character.Keycloak.ClientSecret, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, ) Expect(err).NotTo(HaveOccurred()) // Eventually(func() error { - *admin.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Character.Keycloak.Realm, admin) + *admin.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Keycloak.Realm, admin) Expect(err).NotTo(HaveOccurred()) // }).Within(time.Minute).ProbeEvery(time.Second).ShouldNot(HaveOccurred()) - *player.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Character.Keycloak.Realm, player) + *player.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Keycloak.Realm, player) Expect(err).NotTo(HaveOccurred()) - *guest.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Character.Keycloak.Realm, guest) + *guest.ID, err = keycloak.CreateUser(context.Background(), clientToken.AccessToken, conf.Keycloak.Realm, guest) Expect(err).NotTo(HaveOccurred()) - saRole, err := keycloak.GetRealmRole(context.Background(), clientToken.AccessToken, conf.Character.Keycloak.Realm, "super admin") + saRole, err := keycloak.GetRealmRole(context.Background(), clientToken.AccessToken, conf.Keycloak.Realm, "super admin") Expect(err).NotTo(HaveOccurred()) - userRole, err := keycloak.GetRealmRole(context.Background(), clientToken.AccessToken, conf.Character.Keycloak.Realm, "user") + userRole, err := keycloak.GetRealmRole(context.Background(), clientToken.AccessToken, conf.Keycloak.Realm, "user") Expect(err).NotTo(HaveOccurred()) err = keycloak.AddRealmRoleToUser( context.Background(), clientToken.AccessToken, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, *admin.ID, []gocloak.Role{*saRole}, ) @@ -138,7 +141,7 @@ func TestSrv(t *testing.T) { err = keycloak.AddRealmRoleToUser( context.Background(), clientToken.AccessToken, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, *player.ID, []gocloak.Role{*userRole}, ) @@ -151,6 +154,7 @@ func TestSrv(t *testing.T) { return []byte(out) }, func(data []byte) { + log.Logger, _ = test.NewNullLogger() splitData := strings.Split(string(data), "\n") Expect(splitData).To(HaveLen(2)) @@ -166,10 +170,10 @@ func TestSrv(t *testing.T) { context.Background(), conf.Character.Keycloak.ClientId, conf.Character.Keycloak.ClientSecret, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, ) Expect(err).NotTo(HaveOccurred()) - adminToken, err = keycloak.GetToken(context.Background(), conf.Character.Keycloak.Realm, gocloak.TokenOptions{ + adminToken, err = keycloak.GetToken(context.Background(), conf.Keycloak.Realm, gocloak.TokenOptions{ ClientID: &conf.Character.Keycloak.ClientId, ClientSecret: &conf.Character.Keycloak.ClientSecret, GrantType: gocloak.StringP("password"), @@ -177,7 +181,7 @@ func TestSrv(t *testing.T) { Password: gocloak.StringP("Password1!"), }) Expect(err).NotTo(HaveOccurred()) - playerToken, err = keycloak.GetToken(context.Background(), conf.Character.Keycloak.Realm, gocloak.TokenOptions{ + playerToken, err = keycloak.GetToken(context.Background(), conf.Keycloak.Realm, gocloak.TokenOptions{ ClientID: &conf.Character.Keycloak.ClientId, ClientSecret: &conf.Character.Keycloak.ClientSecret, GrantType: gocloak.StringP("password"), @@ -185,7 +189,7 @@ func TestSrv(t *testing.T) { Password: gocloak.StringP("Password1!"), }) Expect(err).NotTo(HaveOccurred()) - guestToken, err = keycloak.GetToken(context.Background(), conf.Character.Keycloak.Realm, gocloak.TokenOptions{ + guestToken, err = keycloak.GetToken(context.Background(), conf.Keycloak.Realm, gocloak.TokenOptions{ ClientID: &conf.Character.Keycloak.ClientId, ClientSecret: &conf.Character.Keycloak.ClientSecret, GrantType: gocloak.StringP("password"), @@ -197,7 +201,7 @@ func TestSrv(t *testing.T) { admins, err := keycloak.GetUsers( context.Background(), clientToken.AccessToken, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, gocloak.GetUsersParams{Username: admin.Username}, ) Expect(err).NotTo(HaveOccurred()) @@ -207,7 +211,7 @@ func TestSrv(t *testing.T) { players, err := keycloak.GetUsers( context.Background(), clientToken.AccessToken, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, gocloak.GetUsersParams{Username: player.Username}, ) Expect(err).NotTo(HaveOccurred()) @@ -217,7 +221,7 @@ func TestSrv(t *testing.T) { guests, err := keycloak.GetUsers( context.Background(), clientToken.AccessToken, - conf.Character.Keycloak.Realm, + conf.Keycloak.Realm, gocloak.GetUsersParams{Username: guest.Username}, ) Expect(err).NotTo(HaveOccurred()) diff --git a/test/config.yaml b/test/config.yaml index ed123b6..1318418 100644 --- a/test/config.yaml +++ b/test/config.yaml @@ -5,9 +5,8 @@ character: mode: 'local' logLevel: Debug keycloak: - baseUrl: 'http://localhost:8080' clientSecret: '**********' - Id: '738a426a-da91-4b16-b5fc-92d63a22eb76' + id: '738a426a-da91-4b16-b5fc-92d63a22eb76' postgres: master: host: 'localhost' @@ -23,9 +22,8 @@ gamebackend: mode: 'local' logLevel: Debug keycloak: - baseUrl: 'http://localhost:8080' clientSecret: '**********' - Id: 'c3cacba8-cd16-4a4f-bc86-367274cb7cb5' + id: 'c3cacba8-cd16-4a4f-bc86-367274cb7cb5' postgres: master: host: 'localhost' @@ -36,9 +34,8 @@ chat: mode: 'local' logLevel: Debug keycloak: - baseUrl: 'http://localhost:8080' clientSecret: '**********' - Id: '4c79d4a0-a3fd-495f-b56e-eea508bb0862' + id: '4c79d4a0-a3fd-495f-b56e-eea508bb0862' postgres: master: host: 'localhost' @@ -50,5 +47,8 @@ agones: allocator: port: 443 host: '75.61.95.171' -uptrace: - dsn: http://project2_secret_token@localhost:14317/2 +keycloak: + baseURL: 'http://localhost:8080' + realm: default +otel: + addr: otel-collector:4817 diff --git a/test/db/docker.go b/test/db/docker.go index 6108d41..67df9d2 100644 --- a/test/db/docker.go +++ b/test/db/docker.go @@ -85,7 +85,10 @@ func SetupKeycloakWithDocker() (func(), string) { return err }, time.Second*60) - _, err = http.Get(host + "/realms/default") + err = Retry(func() error { + _, err = http.Get(host + "/realms/default") + return err + }, time.Second*60) chk(err) return closeFunc, host @@ -136,7 +139,7 @@ func SetupKafkaWithDocker() (func(), uint) { } fnConfig := func(config *docker.HostConfig) { - config.AutoRemove = false + config.AutoRemove = true config.RestartPolicy = docker.NeverRestart() } @@ -154,11 +157,10 @@ func SetupKafkaWithDocker() (func(), uint) { })) fnCleanup := func() { - // err1 := kafkaResource.Close() - _ = kafkaResource + err1 := kafkaResource.Close() err2 := zookeeperResource.Close() err3 := net.Close() - // chk(err1) + chk(err1) chk(err2) chk(err3) } @@ -207,7 +209,7 @@ func ConnectMongoDocker(host string) *mongo.Database { } mdb = db.Database("testdb") return db.Ping(context.TODO(), nil) - }, time.Second*10)) + }, time.Second*30)) return mdb } diff --git a/test/e2e/character_test.go b/test/e2e/character_test.go new file mode 100644 index 0000000..3ef2dd5 --- /dev/null +++ b/test/e2e/character_test.go @@ -0,0 +1,12 @@ +package e2e_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Character e2e", func() { + It("should work", func() { + Expect(true).To(BeTrue()) + }) +}) diff --git a/test/e2e/chat_test.go b/test/e2e/chat_test.go new file mode 100644 index 0000000..c0e08ce --- /dev/null +++ b/test/e2e/chat_test.go @@ -0,0 +1,12 @@ +package e2e_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Chat e2e", func() { + It("should work", func() { + Expect(true).To(BeTrue()) + }) +}) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go new file mode 100644 index 0000000..0844500 --- /dev/null +++ b/test/e2e/e2e_suite_test.go @@ -0,0 +1,102 @@ +package e2e_test + +import ( + "bytes" + "context" + "encoding/gob" + "os" + "path/filepath" + "testing" + + "github.com/bxcodec/faker/v4" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" +) + +var ( + clientset *kubernetes.Clientset + testData *setupData +) + +func TestE2e(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "E2E Suite") +} + +type setupData struct { + // Namespace used for SRO + Namespace string + + // Namespace used for Agones + AgonesNamespace string +} + +var _ = SynchronizedBeforeSuite(func(ctx context.Context) []byte { + testData := setupData{ + Namespace: "sro-testing-" + faker.Username(), + AgonesNamespace: "agones-system-testing-" + faker.Username(), + } + setupClientSet() + + Expect(clientset.CoreV1().Namespaces().Create( + ctx, + &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: testData.Namespace, + }, + }, + metav1.CreateOptions{}, + )).To(Succeed()) + Expect(clientset.CoreV1().Namespaces().Create( + ctx, + &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: testData.AgonesNamespace, + }, + }, + metav1.CreateOptions{}, + )).To(Succeed()) + + return testData.encode() +}, func(data []byte) { + testData = decodeSetupData(data) + setupClientSet() +}) + +var _ = SynchronizedAfterSuite(func() {}, func(ctx context.Context) { + Expect(clientset.CoreV1().Namespaces().Delete(ctx, testData.Namespace, metav1.DeleteOptions{})). + NotTo(HaveOccurred()) + Expect(clientset.CoreV1().Namespaces().Delete(ctx, testData.AgonesNamespace, metav1.DeleteOptions{})). + NotTo(HaveOccurred()) +}) + +func setupClientSet() { + homeDir, err := os.UserHomeDir() + Expect(err).NotTo(HaveOccurred(), "unable to get home directory") + Expect(homeDir).NotTo(BeEmpty()) + + config, err := clientcmd.BuildConfigFromFlags("", filepath.Join(homeDir, ".kube", "config")) + Expect(err).NotTo(HaveOccurred(), "unable to get kubernetes config") + + clientset, err = kubernetes.NewForConfig(config) + Expect(err).NotTo(HaveOccurred(), "kubernetes config invalid") +} + +func (s *setupData) encode() []byte { + var buf *bytes.Buffer + enc := gob.NewEncoder(buf) + Expect(enc.Encode(s)).NotTo(HaveOccurred()) + return buf.Bytes() +} + +func decodeSetupData(in []byte) *setupData { + buf := bytes.NewBuffer(in) + out := &setupData{} + dec := gob.NewDecoder(buf) + Expect(dec.Decode(out)).NotTo(HaveOccurred()) + return out +} diff --git a/test/e2e/gamebackend_test.go b/test/e2e/gamebackend_test.go new file mode 100644 index 0000000..25c1e30 --- /dev/null +++ b/test/e2e/gamebackend_test.go @@ -0,0 +1,12 @@ +package e2e_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gamebackend e2e", func() { + It("should work", func() { + Expect(true).To(BeTrue()) + }) +}) diff --git a/test/otel-collector.yaml b/test/otel-collector.yaml index 034fb84..5f14a12 100644 --- a/test/otel-collector.yaml +++ b/test/otel-collector.yaml @@ -1,65 +1,43 @@ -extensions: - health_check: - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 - receivers: otlp: protocols: grpc: - http: - hostmetrics: - collection_interval: 10s - scrapers: - cpu: - disk: - load: - filesystem: - memory: - network: - paging: - jaeger: - protocols: - grpc: - -processors: - resourcedetection: - detectors: ['system'] - batch: - send_batch_size: 10000 - timeout: 10s exporters: - logging: - logLevel: debug - otlp/uptrace: - endpoint: uptrace:14317 + prometheus: + endpoint: "0.0.0.0:8889" + const_labels: + label1: value1 + + debug: + + zipkin: + endpoint: "http://zipkin:9411/api/v2/spans" + format: proto + + otlp: + endpoint: jaeger:4317 tls: insecure: true - headers: { 'uptrace-dsn': 'http://project1_secret_token@localhost:14317/1' } + +processors: + batch: + +extensions: + health_check: + pprof: + endpoint: :1888 + zpages: + endpoint: :55679 service: - # telemetry: - # logs: - # level: DEBUG + extensions: [pprof, zpages, health_check] pipelines: traces: - receivers: [otlp, jaeger] - processors: [batch] - exporters: [otlp/uptrace, logging] - metrics: receivers: [otlp] processors: [batch] - exporters: [otlp/uptrace] - metrics/hostmetrics: - receivers: [hostmetrics] - processors: [batch, resourcedetection] - exporters: [otlp/uptrace] - logs: + exporters: [debug, zipkin, otlp] + metrics: receivers: [otlp] processors: [batch] - exporters: [otlp/uptrace] - - extensions: [health_check, pprof, zpages] \ No newline at end of file + exporters: [debug, prometheus] diff --git a/test/prometheus.yaml b/test/prometheus.yaml new file mode 100644 index 0000000..a847754 --- /dev/null +++ b/test/prometheus.yaml @@ -0,0 +1,6 @@ +scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['otel-collector:8889'] + - targets: ['otel-collector:8888'] diff --git a/test/vector.toml b/test/vector.toml deleted file mode 100644 index e15663b..0000000 --- a/test/vector.toml +++ /dev/null @@ -1,39 +0,0 @@ -[sources.syslog_logs] -type = "demo_logs" -format = "syslog" -interval = 0.1 - -[sources.apache_common_logs] -type = "demo_logs" -format = "apache_common" -interval = 0.1 - -[sources.apache_error_logs] -type = "demo_logs" -format = "apache_error" -interval = 0.1 - -[sources.json_logs] -type = "demo_logs" -format = "json" -interval = 0.1 - -# Parse Syslog logs -# See the Vector Remap Language reference for more info: https://vrl.dev -[transforms.parse_logs] -type = "remap" -inputs = ["syslog_logs"] -source = ''' -. = parse_syslog!(string!(.message)) -''' - -# Export data to Uptrace. -[sinks.uptrace] -type = "http" -inputs = ["parse_logs", "apache_common_logs", "apache_error_logs", "json_logs"] -encoding.codec = "json" -framing.method = "newline_delimited" -compression = "gzip" -uri = "http://uptrace:14318/api/v1/vector/logs" -#uri = "https://api.uptrace.dev/api/v1/vector/logs" -headers.uptrace-dsn = "http://project1_secret_token@localhost:14317/1" \ No newline at end of file diff --git a/tools.go b/tools.go index 1f270ec..70e3233 100644 --- a/tools.go +++ b/tools.go @@ -8,6 +8,7 @@ import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" _ "github.com/mitranim/gow@latest" _ "github.com/onsi/ginkgo/v2/ginkgo" + _ "github.com/spf13/cobra-cli" _ "go.uber.org/mock/mockgen" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go"