From 086d69fc408cb0645d8f2f1401593608b0749662 Mon Sep 17 00:00:00 2001
From: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Date: Tue, 7 Jan 2025 13:54:28 -0500
Subject: [PATCH] Remove unused notarize-apple-binaries tooling (#50824)
---
.../notarize-apple-binaries/gon_wrapper.go | 134 ----------
.../notarize-apple-binaries/logger_config.go | 48 ----
.../cmd/notarize-apple-binaries/main.go | 135 ----------
build.assets/tooling/go.mod | 11 +-
build.assets/tooling/go.sum | 55 -----
.../lib/logging/hashicorpLoggerAdapter.go | 232 ------------------
6 files changed, 1 insertion(+), 614 deletions(-)
delete mode 100644 build.assets/tooling/cmd/notarize-apple-binaries/gon_wrapper.go
delete mode 100644 build.assets/tooling/cmd/notarize-apple-binaries/logger_config.go
delete mode 100644 build.assets/tooling/cmd/notarize-apple-binaries/main.go
delete mode 100644 build.assets/tooling/lib/logging/hashicorpLoggerAdapter.go
diff --git a/build.assets/tooling/cmd/notarize-apple-binaries/gon_wrapper.go b/build.assets/tooling/cmd/notarize-apple-binaries/gon_wrapper.go
deleted file mode 100644
index 8cfe475976392..0000000000000
--- a/build.assets/tooling/cmd/notarize-apple-binaries/gon_wrapper.go
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Teleport
- * Copyright (C) 2023 Gravitational, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package main
-
-import (
- "context"
- "os"
- "path/filepath"
-
- "github.com/gravitational/trace"
- "github.com/hashicorp/go-hclog"
- "github.com/mitchellh/gon/notarize"
- "github.com/mitchellh/gon/package/zip"
- "github.com/mitchellh/gon/sign"
- "github.com/sirupsen/logrus"
-
- "github.com/gravitational/teleport/build.assets/tooling/lib/logging"
-)
-
-type GonWrapper struct {
- ctx context.Context
- logger hclog.Logger
- AppleUsername string
- ApplePassword string
- DeveloperID string
- BundleID string
- BinaryPaths []string
-}
-
-func NewGonWrapper(appleUsername, applePassword, developerID, bundleID string, BinaryPaths []string) *GonWrapper {
- return &GonWrapper{
- ctx: context.Background(),
- logger: logging.NewHCLogLogrusAdapter(logrus.StandardLogger()),
- AppleUsername: appleUsername,
- ApplePassword: applePassword,
- DeveloperID: developerID,
- BundleID: bundleID,
- BinaryPaths: BinaryPaths,
- }
-}
-
-func (gw *GonWrapper) SignAndNotarizeBinaries() error {
- err := gw.SignBinaries()
- if err != nil {
- return trace.Wrap(err, "failed to sign binaries")
- }
-
- zipPath, err := gw.ZipBinaries()
- if err != nil {
- return trace.Wrap(err, "failed to zip binaries for notarization")
- }
- defer os.RemoveAll(filepath.Dir(zipPath))
-
- err = gw.NotarizeBinaries(zipPath)
- if err != nil {
- return trace.Wrap(err, "failed to notarize binaries")
- }
-
- gw.logger.Info("Signing and notarization complete!")
- return nil
-}
-
-func (gw *GonWrapper) SignBinaries() error {
- gw.logger.Info("Signing binaries %v...", gw.BinaryPaths)
- err := sign.Sign(gw.ctx, &sign.Options{
- Files: gw.BinaryPaths,
- Identity: gw.DeveloperID,
- Logger: gw.logger,
- })
-
- if err != nil {
- return trace.Wrap(err, "gon failed to sign binaries %v", gw.BinaryPaths)
- }
-
- return nil
-}
-
-func (gw *GonWrapper) ZipBinaries() (string, error) {
- zipFileName := "notarization.zip"
- gw.logger.Info("Zipping binaries into %q for notarization upload...", zipFileName)
- tmpDir, err := os.MkdirTemp("", "gon-zip-directory-*")
- if err != nil {
- return "", trace.Wrap(err, "failed to create temporary directory for binary zipping")
- }
-
- outputPath := filepath.Join(tmpDir, zipFileName)
- gw.logger.Debug("Using binary zip path %q", outputPath)
-
- err = zip.Zip(gw.ctx, &zip.Options{
- Files: gw.BinaryPaths,
- OutputPath: outputPath,
- Logger: gw.logger,
- })
-
- if err != nil {
- os.RemoveAll(tmpDir)
- return "", trace.Wrap(err, "gon failed to zip binaries %v to zip %q", gw.BinaryPaths, outputPath)
- }
-
- return outputPath, nil
-}
-
-func (gw *GonWrapper) NotarizeBinaries(zipPath string) error {
- gw.logger.Info("Uploading %q to Apple for notarization ticket issuance. This may take awhile...", zipPath)
- notarizationInfo, err := notarize.Notarize(gw.ctx, ¬arize.Options{
- File: zipPath,
- BundleId: gw.BundleID,
- Username: gw.AppleUsername,
- Password: gw.ApplePassword,
- Logger: gw.logger,
- })
- if err != nil {
- return trace.Wrap(err, "gon failed to notarize binaries %v in zip %q with notarization info %+v",
- gw.BinaryPaths, zipPath, notarizationInfo)
- }
-
- return nil
-}
diff --git a/build.assets/tooling/cmd/notarize-apple-binaries/logger_config.go b/build.assets/tooling/cmd/notarize-apple-binaries/logger_config.go
deleted file mode 100644
index b24c1adfb9c4c..0000000000000
--- a/build.assets/tooling/cmd/notarize-apple-binaries/logger_config.go
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Teleport
- * Copyright (C) 2023 Gravitational, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package main
-
-import (
- "os"
-
- "github.com/sirupsen/logrus"
-)
-
-type LoggerConfig struct {
- logLevel logrus.Level
- logJSON bool
-}
-
-func NewLoggerConfig(logLevel logrus.Level, logJSON bool) *LoggerConfig {
- return &LoggerConfig{
- logLevel: logLevel,
- logJSON: logJSON,
- }
-}
-
-func (lc *LoggerConfig) setupLogger() {
- if lc.logJSON {
- logrus.SetFormatter(&logrus.JSONFormatter{})
- } else {
- logrus.SetFormatter(&logrus.TextFormatter{})
- }
- logrus.SetOutput(os.Stdout)
- logrus.SetLevel(lc.logLevel)
- logrus.Debugf("Setup logger with config: %+v", lc)
-}
diff --git a/build.assets/tooling/cmd/notarize-apple-binaries/main.go b/build.assets/tooling/cmd/notarize-apple-binaries/main.go
deleted file mode 100644
index 44dc5fc071e4c..0000000000000
--- a/build.assets/tooling/cmd/notarize-apple-binaries/main.go
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Teleport
- * Copyright (C) 2023 Gravitational, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package main
-
-import (
- "debug/macho"
- "fmt"
-
- "github.com/alecthomas/kingpin/v2"
- "github.com/gravitational/trace"
- "github.com/sirupsen/logrus"
-)
-
-const binaryArgName string = "binaries"
-
-// Default values for flags.
-// TODO(camh): Remove when all call sites pass the correct values.
-const (
- DeveloperIdentity string = "0FFD3E3413AB4C599C53FBB1D8CA690915E33D83"
- BundleID string = "com.gravitational.teleport"
-)
-
-type Config struct {
- LogLevel string
- LogJSON bool
- AppleUsername string
- ApplePassword string
- DeveloperID string
- BundleID string
- BinaryPaths []string
-}
-
-func main() {
- var config Config
- kingpin.Flag("log-level", "Output logging level").Default(logrus.InfoLevel.String()).EnumVar(&config.LogLevel, getLogLevelStrings()...)
- kingpin.Flag("log-json", "Enable JSON logging").Default(fmt.Sprintf("%v", false)).BoolVar(&config.LogJSON)
- kingpin.Flag("apple-username", "Apple Connect username used for notarization").Required().Envar("APPLE_USERNAME").StringVar(&config.AppleUsername)
- kingpin.Flag("apple-password", "Apple Connect password used for notarization").Required().Envar("APPLE_PASSWORD").StringVar(&config.ApplePassword)
- kingpin.Flag("developer-id", "Key ID for signing binaries").Default(DeveloperIdentity).StringVar(&config.DeveloperID)
- kingpin.Flag("bundle-id", "Bundle ID of application").Default(BundleID).StringVar(&config.BundleID)
- kingpin.Arg(binaryArgName, "Path to Apple binaries for signing and notarization").Required().Action(binaryArgValidatiorAction).ExistingFilesVar(&config.BinaryPaths)
- kingpin.Parse()
-
- err := run(&config)
-
- if err != nil {
- logrus.Fatal(err.Error())
- }
-}
-
-func getLogLevelStrings() []string {
- logLevelStrings := make([]string, 0, len(logrus.AllLevels))
- for _, level := range logrus.AllLevels {
- logLevelStrings = append(logLevelStrings, level.String())
- }
-
- return logLevelStrings
-}
-
-func binaryArgValidatiorAction(pc *kingpin.ParseContext) error {
- for _, element := range pc.Elements {
- if clause, ok := element.Clause.(*kingpin.ArgClause); !ok || clause.Model().Name != binaryArgName {
- continue
- }
-
- binaryPath := *element.Value
- err := verifyFileIsAppleBinary(binaryPath)
- if err != nil {
- return trace.Wrap(err, "failed to verify that %q is a valid Apple binary for signing", binaryPath)
- }
- }
- return nil
-}
-
-// Returns an error if the file is not a valid Apple binary
-// Effectively does `file $BINARY | grep -ic 'mach-o'`
-func verifyFileIsAppleBinary(filePath string) error {
- // First check to see if the binary is a typical mach-o binary.
- // If it's not, it could still be a multiarch "fat" mach-o binary,
- // so we try that next. If both fail then the file is not an Apple
- // binary.
- fileHandle, err := macho.Open(filePath)
- if err != nil {
- fatFileHandle, err := macho.OpenFat(filePath)
- if err != nil {
- return trace.Wrap(err, "the provided file %q is neither a normal or multiarch mach-o binary.", filePath)
- }
-
- err = fatFileHandle.Close()
- if err != nil {
- return trace.Wrap(err, "identified %q as a multiarch mach-o binary but failed to close the file handle", filePath)
- }
- } else {
- err := fileHandle.Close()
- if err != nil {
- return trace.Wrap(err, "identified %q as a mach-o binary but failed to close the file handle", filePath)
- }
- }
-
- return nil
-}
-
-func run(config *Config) error {
- // This needs to be called as soon as possible so that the logger can
- // be used when checking args
- parsedLogLevel, err := logrus.ParseLevel(config.LogLevel)
- if err != nil {
- // This should never be hit if kingpin is configured correctly
- return trace.Wrap(err, "failed to parse logrus log level")
- }
- NewLoggerConfig(parsedLogLevel, config.LogJSON).setupLogger()
-
- err = NewGonWrapper(config.AppleUsername, config.ApplePassword, config.DeveloperID, config.BundleID, config.BinaryPaths).SignAndNotarizeBinaries()
- if err != nil {
- return trace.Wrap(err, "failed to sign and notarize binaries")
- }
-
- return nil
-}
diff --git a/build.assets/tooling/go.mod b/build.assets/tooling/go.mod
index 480bab224df3e..e87bf5d8680d4 100644
--- a/build.assets/tooling/go.mod
+++ b/build.assets/tooling/go.mod
@@ -9,10 +9,7 @@ require (
github.com/bmatcuk/doublestar/v4 v4.7.1
github.com/gogo/protobuf v1.3.2
github.com/google/go-github/v41 v41.0.0
- github.com/google/uuid v1.6.0 // indirect
github.com/gravitational/trace v1.4.0
- github.com/hashicorp/go-hclog v1.6.3
- github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.10.0
github.com/waigani/diffparser v0.0.0-20190828052634-7391f219313d
@@ -30,21 +27,15 @@ require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
- github.com/fatih/color v1.16.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
- github.com/hashicorp/errwrap v1.1.0 // indirect
- github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
- github.com/hashicorp/go-multierror v1.1.1 // indirect
+ github.com/google/uuid v1.6.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
- github.com/mattn/go-colorable v0.1.13 // indirect
- github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
- github.com/mitchellh/gon v0.2.5
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
diff --git a/build.assets/tooling/go.sum b/build.assets/tooling/go.sum
index 23ef44081f583..7e613ad03bde2 100644
--- a/build.assets/tooling/go.sum
+++ b/build.assets/tooling/go.sum
@@ -607,7 +607,6 @@ github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lpr
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
@@ -619,8 +618,6 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0=
github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI=
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
-github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
-github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
github.com/awalterschulze/goderive v0.0.0-20240309134105-e3f2fdff7d5e h1:TYSqnryBG3AFaENyJANGRYzIVWJjZUvuIwOmk/pqjHM=
github.com/awalterschulze/goderive v0.0.0-20240309134105-e3f2fdff7d5e/go.mod h1:rXccmDQDJN/4aGqWxWhq+UmBJeQEkFV/2/rkluP+ipA=
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
@@ -672,10 +669,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo=
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
-github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
-github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
@@ -697,7 +690,6 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
-github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
@@ -717,7 +709,6 @@ github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
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.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
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=
@@ -815,25 +806,8 @@ github.com/gravitational/trace v1.4.0/go.mod h1:g79NZzwCjWS/VVubYowaFAQsTjVTohGi
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
-github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
-github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
-github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
-github.com/hashicorp/go-hclog v0.9.3-0.20191025211905-234833755cb2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
-github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
-github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
-github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
-github.com/hashicorp/go-retryablehttp v0.6.3/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
-github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
-github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
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/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90=
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
@@ -863,30 +837,16 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-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.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.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.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
-github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
-github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
-github.com/mitchellh/gon v0.2.5 h1:mVWtqTzV03W0avJqmqjk9M0qls3TDUXfc9ETJaPIOWY=
-github.com/mitchellh/gon v0.2.5/go.mod h1:Ua18ZhqjZHg8VyqZo8kNHAY331ntV6nNJ9mT3s2mIo8=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -919,9 +879,6 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
-github.com/sebdah/goldie v1.0.0 h1:9GNhIat69MSlz/ndaBg48vl9dF5fI+NBB6kfOxgfkMc=
-github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
-github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -932,7 +889,6 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
-github.com/spf13/pflag v1.0.2/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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -945,13 +901,11 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/waigani/diffparser v0.0.0-20190828052634-7391f219313d h1:xQcF7b7cZLWZG/+7A4G7un1qmEDYHIvId9qxRS1mZMs=
github.com/waigani/diffparser v0.0.0-20190828052634-7391f219313d/go.mod h1:BzSc3WEF8R+lCaP5iGFRxd5kIXy4JKOZAwNe1w0cdc0=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
@@ -965,7 +919,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
@@ -980,7 +933,6 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
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=
@@ -1055,7 +1007,6 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180811021610-c39426892332/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1167,17 +1118,14 @@ golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/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-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-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=
@@ -1219,7 +1167,6 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc
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-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -1632,7 +1579,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
-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.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -1648,7 +1594,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
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=
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
-howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
k8s.io/apiextensions-apiserver v0.32.0 h1:S0Xlqt51qzzqjKPxfgX1xh4HBZE+p8KKBq+k2SWNOE0=
diff --git a/build.assets/tooling/lib/logging/hashicorpLoggerAdapter.go b/build.assets/tooling/lib/logging/hashicorpLoggerAdapter.go
deleted file mode 100644
index bcb26306cae32..0000000000000
--- a/build.assets/tooling/lib/logging/hashicorpLoggerAdapter.go
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Teleport
- * Copyright (C) 2023 Gravitational, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package logging
-
-import (
- "fmt"
- "io"
- "log"
- "os"
- "strings"
-
- "github.com/hashicorp/go-hclog"
- "github.com/sirupsen/logrus"
-)
-
-// All of our other tools use logrus for logging, but the gon package
-// uses https://pkg.go.dev/github.com/hashicorp/go-hclog. This is an
-// adapter that will send hclog output to logrus.
-type HCLogLogrusAdapter struct {
- name string
- logger *logrus.Logger
- impliedArgs []interface{}
-}
-
-func NewHCLogLogrusAdapter(logrusLogger *logrus.Logger) *HCLogLogrusAdapter {
- return &HCLogLogrusAdapter{
- logger: logrusLogger,
- }
-}
-
-// Args are alternating key, val pairs
-// keys must be strings
-// vals can be any type, but display is implementation specific
-// Emit a message and key/value pairs at a provided log level
-func (h *HCLogLogrusAdapter) Log(level hclog.Level, msg string, args ...interface{}) {
- logrusLevel := hclogLevelToLogrusLevel(level)
- msgWithImpliedArgs := fmt.Sprintf("%s %%s", msg)
- argsWithImpliedArgsString := append(args, h.createImpliedArgsString())
- h.logger.Logf(logrusLevel, msgWithImpliedArgs, argsWithImpliedArgsString)
-}
-
-// Emit a message and key/value pairs at the TRACE level
-func (h *HCLogLogrusAdapter) Trace(msg string, args ...interface{}) {
- h.Log(hclog.Trace, msg, args)
-}
-
-// Emit a message and key/value pairs at the DEBUG level
-func (h *HCLogLogrusAdapter) Debug(msg string, args ...interface{}) {
- h.Log(hclog.Debug, msg, args)
-}
-
-// Emit a message and key/value pairs at the INFO level
-func (h *HCLogLogrusAdapter) Info(msg string, args ...interface{}) {
- h.Log(hclog.Info, msg, args)
-}
-
-// Emit a message and key/value pairs at the WARN level
-func (h *HCLogLogrusAdapter) Warn(msg string, args ...interface{}) {
- h.Log(hclog.Warn, msg, args)
-}
-
-// Emit a message and key/value pairs at the ERROR level
-func (h *HCLogLogrusAdapter) Error(msg string, args ...interface{}) {
- h.Log(hclog.Error, msg, args)
-}
-
-// Indicate if TRACE logs would be emitted. This and the other Is* guards
-// are used to elide expensive logging code based on the current level.
-func (h *HCLogLogrusAdapter) IsTrace() bool {
- return h.logger.IsLevelEnabled(logrus.TraceLevel)
-}
-
-// Indicate if DEBUG logs would be emitted. This and the other Is* guards
-func (h *HCLogLogrusAdapter) IsDebug() bool {
- return h.logger.IsLevelEnabled(logrus.DebugLevel)
-}
-
-// Indicate if INFO logs would be emitted. This and the other Is* guards
-func (h *HCLogLogrusAdapter) IsInfo() bool {
- return h.logger.IsLevelEnabled(logrus.InfoLevel)
-}
-
-// Indicate if WARN logs would be emitted. This and the other Is* guards
-func (h *HCLogLogrusAdapter) IsWarn() bool {
- return h.logger.IsLevelEnabled(logrus.WarnLevel)
-}
-
-// Indicate if ERROR logs would be emitted. This and the other Is* guards
-func (h *HCLogLogrusAdapter) IsError() bool {
- return h.logger.IsLevelEnabled(logrus.ErrorLevel)
-}
-
-// ImpliedArgs returns With key/value pairs
-func (h *HCLogLogrusAdapter) ImpliedArgs() []interface{} {
- return h.impliedArgs
-}
-
-// Creates a sublogger that will always have the given key/value pairs
-func (h *HCLogLogrusAdapter) With(args ...interface{}) hclog.Logger {
- // Ensure that there is a key for every value
- if len(args)%2 != 0 {
- extraValue := args[len(args)-1]
- // Pulled from https://github.com/hashicorp/go-hclog/blob/main/intlogger.go#L731
- args[len(args)-1] = "EXTRA_VALUE_AT_END"
- args = append(args, extraValue)
- }
-
- newLogger := NewHCLogLogrusAdapter(h.logger)
- newLogger.impliedArgs = append(newLogger.impliedArgs, args)
- return newLogger
-}
-
-// Returns the Name of the logger
-func (h *HCLogLogrusAdapter) Name() string {
- return h.name
-}
-
-// Create a logger that will prepend the name string on the front of all messages.
-// If the logger already has a name, the new value will be appended to the current
-// name. That way, a major subsystem can use this to decorate all its own logs
-// without losing context.
-func (h *HCLogLogrusAdapter) Named(name string) hclog.Logger {
- if h.name != "" {
- name = fmt.Sprintf("%s.%s", name, h.name)
- }
-
- return h.ResetNamed(name)
-}
-
-// Create a logger that will prepend the name string on the front of all messages.
-// This sets the name of the logger to the value directly, unlike Named which honor
-// the current name as well.
-func (h *HCLogLogrusAdapter) ResetNamed(name string) hclog.Logger {
- newLogger := NewHCLogLogrusAdapter(h.logger)
- newLogger.name = name
-
- return newLogger
-}
-
-// Updates the level. This should affect all related loggers as well,
-// unless they were created with IndependentLevels. If an
-// implementation cannot update the level on the fly, it should no-op.
-func (h *HCLogLogrusAdapter) SetLevel(level hclog.Level) {
- h.logger.SetLevel(hclogLevelToLogrusLevel(level))
-}
-
-// Returns the current level
-func (h *HCLogLogrusAdapter) GetLevel() hclog.Level {
- switch h.logger.GetLevel() {
- case logrus.FatalLevel, logrus.PanicLevel, logrus.ErrorLevel:
- return hclog.Error
- case logrus.WarnLevel:
- return hclog.Warn
- case logrus.InfoLevel:
- return hclog.Info
- case logrus.DebugLevel:
- return hclog.Debug
- case logrus.TraceLevel:
- return hclog.Trace
- }
-
- return hclog.NoLevel
-}
-
-// Return a value that conforms to the stdlib log.Logger interface
-// Options are ignored as it's not currently worth the time to implement them
-func (h *HCLogLogrusAdapter) StandardLogger(options *hclog.StandardLoggerOptions) *log.Logger {
- return log.New(h.StandardWriter(options), "", 0)
-}
-
-// Return a value that conforms to io.Writer, which can be passed into log.SetOutput()
-// Options are ignored as it's not currently worth the time to implement them
-func (h *HCLogLogrusAdapter) StandardWriter(_ *hclog.StandardLoggerOptions) io.Writer {
- logrusOut := h.logger.Out
- if logrusOut != nil {
- return logrusOut
- }
-
- return os.Stderr
-}
-
-func hclogLevelToLogrusLevel(level hclog.Level) logrus.Level {
- // The docs for hclog also list a "Off" level, but it's not defined in the version of hclog used by gon.
- switch level {
- case hclog.Error:
- return logrus.ErrorLevel
- case hclog.Warn:
- return logrus.WarnLevel
- case hclog.Info:
- return logrus.InfoLevel
- case hclog.Debug:
- return logrus.DebugLevel
- case hclog.Trace:
- return logrus.TraceLevel
- case hclog.NoLevel:
- return logrus.InfoLevel
- }
-
- return logrus.InfoLevel
-}
-
-func (h *HCLogLogrusAdapter) createImpliedArgsString() string {
- keyPairCount := len(h.impliedArgs) / 2
- var argsStringBuilder strings.Builder
- for keyPairNumber := 0; keyPairNumber < keyPairCount; keyPairNumber++ {
- if argsStringBuilder.Len() != 0 {
- fmt.Fprint(&argsStringBuilder, ", ")
- }
- keyPairPosition := 2 * keyPairNumber
- key := h.impliedArgs[keyPairPosition]
- value := h.impliedArgs[keyPairPosition+1]
- fmt.Fprintf(&argsStringBuilder, "%+v=%+v", key, value)
- }
-
- return argsStringBuilder.String()
-}