'
+ @echo ''
+ @echo ' Targets:'
+ @echo ''
+ @awk '/^#/{ comment = substr($$0,3) } comment && /^[a-zA-Z][a-zA-Z0-9_-]+ ?:/{ print " ", $$1, comment }' $(MAKEFILE_LIST) | column -t -s ':' | grep -v 'IGNORE' | sort -u
+
+# Clean up
+clean:
+ rm -rf vendor
+ rm -rf $(BINDIR)
diff --git a/README.md b/README.md
index e690f51..678fbf8 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,79 @@
+
+
+
+
+ NeoFS is a decentralized distributed object storage integrated with the NEO Blockchain.
+
+
+---
+[![Report](https://goreportcard.com/badge/github.com/nspcc-dev/neofs-rest-gw)](https://goreportcard.com/report/github.com/nspcc-dev/neofs-rest-gw)
+![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nspcc-dev/neofs-rest-gw?sort=semver)
+![License](https://img.shields.io/github/license/nspcc-dev/neofs-rest-gw.svg?style=popout)
+
# neofs-rest-gw
+
+NeoFS REST Gateway bridges NeoFS internal protocol and REST API server.
+
+## Installation
+
+### Building
+
+Before building make sure you have the following tools:
+
+* go
+* make
+* jq
+* git
+* curl
+
+
+To build neofs-rest-gw call `make` the cloned repository (the binary will end up in `bin/neofs-rest-gw`).
+
+Notable make targets:
+
+```
+dep Check and ensure dependencies
+image Build clean docker image
+image-dirty Build dirty docker image with host-built binaries
+formats Run all code formatters
+lint Run linters
+version Show current version
+generate-server Generate boilerplate by spec
+```
+
+### Docker
+
+Or you can also use a [Docker image](https://hub.docker.com/r/nspccdev/neofs-rest-gw) provided for released
+(and occasionally unreleased) versions of gateway (`:latest` points to the latest stable release).
+
+## Execution
+
+REST gateway itself is not a NeoFS node, so to access NeoFS it uses node's gRPC interface and you need to provide some
+node that it will connect to. This can be done either via `-p` parameter or via `REST_GW_PEERS__ADDRESS` and
+`REST_GW_PEERS__WEIGHT` environment variables (the gate supports multiple NeoFS nodes with weighted load balancing).
+
+If you're launching REST gateway in bundle with [neofs-dev-env](https://github.com/nspcc-dev/neofs-dev-env), you can get
+an IP address of the node in output of `make hosts` command
+(with s0*.neofs.devenv name).
+
+These two commands are functionally equivalent, they run the gate with one backend node (and otherwise default
+settings):
+
+```
+$ neofs-rest-gw -p 192.168.130.72:8080
+$ REST_GW_PEERS_0_ADDRESS=192.168.130.72:8080 neofs-rest-gw
+```
+
+It's also possible to specify uri scheme (grpc or grpcs) when using `-p`:
+
+```
+$ neofs-rest-gw -p grpc://192.168.130.72:8080
+$ REST_GW_PEERS_0_ADDRESS=grpcs://192.168.130.72:8080 neofs-rest-gw
+```
+
+## Configuration
+
+In general, everything available as CLI parameter can also be specified via environment variables, so they're not
+specifically mentioned in most cases
+(see `--help` also). If you prefer a config file you can use it in yaml format. See config [examples](./config) for
+details.
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..b82608c
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+v0.1.0
diff --git a/cmd/neofs-rest-gw/config.go b/cmd/neofs-rest-gw/config.go
new file mode 100644
index 0000000..768da81
--- /dev/null
+++ b/cmd/neofs-rest-gw/config.go
@@ -0,0 +1,347 @@
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/nspcc-dev/neo-go/cli/flags"
+ "github.com/nspcc-dev/neo-go/cli/input"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neo-go/pkg/util"
+ "github.com/nspcc-dev/neo-go/pkg/wallet"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi"
+ "github.com/nspcc-dev/neofs-rest-gw/handlers"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+ "github.com/spf13/pflag"
+ "github.com/spf13/viper"
+ "go.uber.org/zap"
+ "go.uber.org/zap/zapcore"
+)
+
+const (
+ defaultRebalanceTimer = 15 * time.Second
+ defaultRequestTimeout = 15 * time.Second
+ defaultConnectTimeout = 30 * time.Second
+
+ // Timeouts.
+ cfgNodeDialTimeout = "node-dial-timeout"
+ cfgHealthcheckTimeout = "healthcheck-timeout"
+ cfgRebalance = "rebalance-timer"
+
+ // Logger.
+ cfgLoggerLevel = "logger.level"
+
+ // Wallet.
+ cfgWalletPath = "wallet.path"
+ cfgWalletAddress = "wallet.address"
+ cfgWalletPassphrase = "wallet.passphrase"
+
+ // Peers.
+ cfgPeers = "peers"
+
+ // Command line args.
+ cmdHelp = "help"
+ cmdVersion = "version"
+ cmdPprof = "pprof"
+ cmdMetrics = "metrics"
+ cmdWallet = "wallet"
+ cmdAddress = "address"
+ cmdConfig = "config"
+)
+
+var ignore = map[string]struct{}{
+ cfgPeers: {},
+ cmdHelp: {},
+ cmdVersion: {},
+}
+
+// Prefix is a prefix used for environment variables containing gateway
+// configuration.
+const Prefix = "REST_GW"
+
+var (
+ // Version is gateway version.
+ Version = "dev"
+)
+
+func config() *viper.Viper {
+ v := viper.New()
+ v.AutomaticEnv()
+ v.SetEnvPrefix(Prefix)
+ v.AllowEmptyEnv(true)
+ v.SetConfigType("yaml")
+ v.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
+
+ // flags setup:
+ flagSet := pflag.NewFlagSet("commandline", pflag.ExitOnError)
+ flagSet.SetOutput(os.Stdout)
+ flagSet.SortFlags = false
+
+ flagSet.Bool(cmdPprof, false, "enable pprof")
+ flagSet.Bool(cmdMetrics, false, "enable prometheus")
+
+ help := flagSet.BoolP(cmdHelp, "h", false, "show help")
+ version := flagSet.BoolP(cmdVersion, "v", false, "show version")
+
+ flagSet.StringP(cmdWallet, "w", "", `path to the wallet`)
+ flagSet.String(cmdAddress, "", `address of wallet account`)
+ config := flagSet.String(cmdConfig, "", "config path")
+ flagSet.Duration(cfgNodeDialTimeout, defaultConnectTimeout, "gRPC connect timeout")
+ flagSet.Duration(cfgHealthcheckTimeout, defaultRequestTimeout, "gRPC request timeout")
+ flagSet.Duration(cfgRebalance, defaultRebalanceTimer, "gRPC connection rebalance timer")
+
+ peers := flagSet.StringArrayP(cfgPeers, "p", nil, "NeoFS nodes")
+
+ restapi.BindDefaultFlags(flagSet)
+
+ // set defaults:
+
+ // logger:
+ v.SetDefault(cfgLoggerLevel, "debug")
+
+ if err := v.BindPFlags(flagSet); err != nil {
+ panic(err)
+ }
+
+ if err := flagSet.Parse(os.Args); err != nil {
+ panic(err)
+ }
+
+ switch {
+ case help != nil && *help:
+ fmt.Printf("NeoFS REST Gateway %s\n", Version)
+ flagSet.PrintDefaults()
+
+ fmt.Println()
+ fmt.Println("Default environments:")
+ fmt.Println()
+ cmdKeys := v.AllKeys()
+ sort.Strings(cmdKeys)
+
+ for i := range cmdKeys {
+ if _, ok := ignore[cmdKeys[i]]; ok {
+ continue
+ }
+
+ k := strings.Replace(cmdKeys[i], ".", "_", -1)
+ fmt.Printf("%s_%s = %v\n", Prefix, strings.ToUpper(k), v.Get(cmdKeys[i]))
+ }
+
+ os.Exit(0)
+ case version != nil && *version:
+ fmt.Printf("NeoFS REST Gateway %s\n", Version)
+ os.Exit(0)
+ }
+
+ if v.IsSet(cmdConfig) {
+ if cfgFile, err := os.Open(*config); err != nil {
+ panic(err)
+ } else if err := v.ReadConfig(cfgFile); err != nil {
+ panic(err)
+ }
+ }
+
+ if peers != nil && len(*peers) > 0 {
+ for i := range *peers {
+ v.SetDefault(cfgPeers+"."+strconv.Itoa(i)+".address", (*peers)[i])
+ v.SetDefault(cfgPeers+"."+strconv.Itoa(i)+".weight", 1)
+ v.SetDefault(cfgPeers+"."+strconv.Itoa(i)+".priority", 1)
+ }
+ }
+
+ return v
+}
+
+func getNeoFSKey(logger *zap.Logger, cfg *viper.Viper) (*keys.PrivateKey, error) {
+ walletPath := cfg.GetString(cmdWallet)
+ if len(walletPath) == 0 {
+ walletPath = cfg.GetString(cfgWalletPath)
+ }
+
+ if len(walletPath) == 0 {
+ logger.Info("no wallet path specified, creating ephemeral key automatically for this run")
+ return keys.NewPrivateKey()
+ }
+ w, err := wallet.NewWalletFromFile(walletPath)
+ if err != nil {
+ return nil, err
+ }
+
+ var password *string
+ if cfg.IsSet(cfgWalletPassphrase) {
+ pwd := cfg.GetString(cfgWalletPassphrase)
+ password = &pwd
+ }
+
+ address := cfg.GetString(cmdAddress)
+ if len(address) == 0 {
+ address = cfg.GetString(cfgWalletAddress)
+ }
+
+ return getKeyFromWallet(w, address, password)
+}
+
+func getKeyFromWallet(w *wallet.Wallet, addrStr string, password *string) (*keys.PrivateKey, error) {
+ var addr util.Uint160
+ var err error
+
+ if addrStr == "" {
+ addr = w.GetChangeAddress()
+ } else {
+ addr, err = flags.ParseAddress(addrStr)
+ if err != nil {
+ return nil, fmt.Errorf("invalid address")
+ }
+ }
+
+ acc := w.GetAccount(addr)
+ if acc == nil {
+ return nil, fmt.Errorf("couldn't find wallet account for %s", addrStr)
+ }
+
+ if password == nil {
+ pwd, err := input.ReadPassword("Enter password > ")
+ if err != nil {
+ return nil, fmt.Errorf("couldn't read password")
+ }
+ password = &pwd
+ }
+
+ if err := acc.Decrypt(*password, w.Scrypt); err != nil {
+ return nil, fmt.Errorf("couldn't decrypt account: %w", err)
+ }
+
+ return acc.PrivateKey(), nil
+}
+
+// newLogger constructs a zap.Logger instance for current application.
+// Panics on failure.
+//
+// Logger is built from zap's production logging configuration with:
+// * parameterized level (debug by default)
+// * console encoding
+// * ISO8601 time encoding
+//
+// Logger records a stack trace for all messages at or above fatal level.
+//
+// See also zapcore.Level, zap.NewProductionConfig, zap.AddStacktrace.
+func newLogger(v *viper.Viper) *zap.Logger {
+ var lvl zapcore.Level
+ lvlStr := v.GetString(cfgLoggerLevel)
+ err := lvl.UnmarshalText([]byte(lvlStr))
+ if err != nil {
+ panic(fmt.Sprintf("incorrect logger level configuration %s (%v), "+
+ "value should be one of %v", lvlStr, err, [...]zapcore.Level{
+ zapcore.DebugLevel,
+ zapcore.InfoLevel,
+ zapcore.WarnLevel,
+ zapcore.ErrorLevel,
+ zapcore.DPanicLevel,
+ zapcore.PanicLevel,
+ zapcore.FatalLevel,
+ }))
+ }
+
+ c := zap.NewProductionConfig()
+ c.Level = zap.NewAtomicLevelAt(lvl)
+ c.Encoding = "console"
+ c.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
+
+ l, err := c.Build(
+ zap.AddStacktrace(zap.NewAtomicLevelAt(zap.FatalLevel)),
+ )
+ if err != nil {
+ panic(fmt.Sprintf("build zap logger instance: %v", err))
+ }
+
+ return l
+}
+
+func serverConfig(v *viper.Viper) *restapi.ServerConfig {
+ return &restapi.ServerConfig{
+ EnabledListeners: v.GetStringSlice(restapi.FlagScheme),
+ CleanupTimeout: v.GetDuration(restapi.FlagCleanupTimeout),
+ GracefulTimeout: v.GetDuration(restapi.FlagGracefulTimeout),
+ MaxHeaderSize: v.GetInt(restapi.FlagMaxHeaderSize),
+
+ ListenAddress: v.GetString(restapi.FlagListenAddress),
+ ListenLimit: v.GetInt(restapi.FlagListenLimit),
+ KeepAlive: v.GetDuration(restapi.FlagKeepAlive),
+ ReadTimeout: v.GetDuration(restapi.FlagReadTimeout),
+ WriteTimeout: v.GetDuration(restapi.FlagWriteTimeout),
+
+ TLSListenAddress: v.GetString(restapi.FlagTLSListenAddress),
+ TLSListenLimit: v.GetInt(restapi.FlagTLSListenLimit),
+ TLSKeepAlive: v.GetDuration(restapi.FlagTLSKeepAlive),
+ TLSReadTimeout: v.GetDuration(restapi.FlagTLSReadTimeout),
+ TLSWriteTimeout: v.GetDuration(restapi.FlagTLSWriteTimeout),
+ }
+}
+
+func newNeofsAPI(ctx context.Context, logger *zap.Logger, v *viper.Viper) (*handlers.API, error) {
+ key, err := getNeoFSKey(logger, v)
+ if err != nil {
+ return nil, err
+ }
+
+ var prm pool.InitParameters
+ prm.SetKey(&key.PrivateKey)
+ prm.SetNodeDialTimeout(v.GetDuration(cfgNodeDialTimeout))
+ prm.SetHealthcheckTimeout(v.GetDuration(cfgHealthcheckTimeout))
+ prm.SetClientRebalanceInterval(v.GetDuration(cfgRebalance))
+
+ for _, peer := range fetchPeers(logger, v) {
+ prm.AddNode(peer)
+ }
+
+ p, err := pool.NewPool(prm)
+ if err != nil {
+ return nil, err
+ }
+
+ if err = p.Dial(ctx); err != nil {
+ return nil, err
+ }
+
+ var apiPrm handlers.PrmAPI
+ apiPrm.Pool = p
+ apiPrm.Key = key
+ apiPrm.Logger = logger
+
+ return handlers.New(&apiPrm), nil
+}
+
+func fetchPeers(l *zap.Logger, v *viper.Viper) []pool.NodeParam {
+ var nodes []pool.NodeParam
+ for i := 0; ; i++ {
+ key := cfgPeers + "." + strconv.Itoa(i) + "."
+ address := v.GetString(key + "address")
+ weight := v.GetFloat64(key + "weight")
+ priority := v.GetInt(key + "priority")
+
+ if address == "" {
+ break
+ }
+ if weight <= 0 { // unspecified or wrong
+ weight = 1
+ }
+ if priority <= 0 { // unspecified or wrong
+ priority = 1
+ }
+
+ nodes = append(nodes, pool.NewNodeParam(priority, address, weight))
+
+ l.Info("added connection peer",
+ zap.String("address", address),
+ zap.Int("priority", priority),
+ zap.Float64("weight", weight),
+ )
+ }
+
+ return nodes
+}
diff --git a/cmd/neofs-rest-gw/integration_test.go b/cmd/neofs-rest-gw/integration_test.go
new file mode 100644
index 0000000..5451a01
--- /dev/null
+++ b/cmd/neofs-rest-gw/integration_test.go
@@ -0,0 +1,461 @@
+package main
+
+import (
+ "bytes"
+ "context"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "crypto/sha512"
+ "encoding/base64"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/http"
+ "strconv"
+ "testing"
+ "time"
+
+ "github.com/go-openapi/loads"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ "github.com/nspcc-dev/neofs-rest-gw/handlers"
+ "github.com/nspcc-dev/neofs-sdk-go/container"
+ cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
+ "github.com/nspcc-dev/neofs-sdk-go/eacl"
+ "github.com/nspcc-dev/neofs-sdk-go/object"
+ "github.com/nspcc-dev/neofs-sdk-go/object/address"
+ oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
+ "github.com/nspcc-dev/neofs-sdk-go/policy"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+ "github.com/spf13/viper"
+ "github.com/stretchr/testify/require"
+ "github.com/testcontainers/testcontainers-go"
+ "github.com/testcontainers/testcontainers-go/wait"
+)
+
+const (
+ devenvPrivateKey = "1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb"
+ testListenAddress = "localhost:8082"
+ testHost = "http://" + testListenAddress
+ testNode = "localhost:8080"
+
+ // XNeofsTokenSignature header contains base64 encoded signature of the token body.
+ XNeofsTokenSignature = "X-Neofs-Token-Signature"
+ // XNeofsTokenSignatureKey header contains hex encoded public key that corresponds the signature of the token body.
+ XNeofsTokenSignatureKey = "X-Neofs-Token-Signature-Key"
+ // XNeofsTokenScope header contains operation scope for auth (bearer) token.
+ // It corresponds to 'object' or 'container' services in neofs.
+ XNeofsTokenScope = "X-Neofs-Token-Scope"
+)
+
+func TestIntegration(t *testing.T) {
+ rootCtx := context.Background()
+ aioImage := "nspccdev/neofs-aio-testcontainer:"
+ versions := []string{"0.24.0", "0.25.1", "0.27.5", "latest"}
+ key, err := keys.NewPrivateKeyFromHex(devenvPrivateKey)
+ require.NoError(t, err)
+
+ for _, version := range versions {
+ ctx, cancel2 := context.WithCancel(rootCtx)
+
+ aioContainer := createDockerContainer(ctx, t, aioImage+version)
+ cancel := runServer(ctx, t)
+ clientPool := getPool(ctx, t, key)
+ CID, err := createContainer(ctx, t, clientPool)
+ require.NoError(t, err, version)
+
+ t.Run("rest put object "+version, func(t *testing.T) { restObjectPut(ctx, t, clientPool, CID) })
+ t.Run("rest put container"+version, func(t *testing.T) { restContainerPut(ctx, t, clientPool) })
+ t.Run("rest get container"+version, func(t *testing.T) { restContainerGet(ctx, t, clientPool, CID) })
+
+ cancel()
+ err = aioContainer.Terminate(ctx)
+ require.NoError(t, err)
+ cancel2()
+ <-ctx.Done()
+ }
+}
+
+func createDockerContainer(ctx context.Context, t *testing.T, image string) testcontainers.Container {
+ req := testcontainers.ContainerRequest{
+ Image: image,
+ WaitingFor: wait.NewLogStrategy("aio container started").WithStartupTimeout(30 * time.Second),
+ Name: "aio",
+ Hostname: "aio",
+ NetworkMode: "host",
+ }
+ aioC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
+ ContainerRequest: req,
+ Started: true,
+ })
+ require.NoError(t, err)
+
+ return aioC
+}
+
+func runServer(ctx context.Context, t *testing.T) context.CancelFunc {
+ cancelCtx, cancel := context.WithCancel(ctx)
+
+ v := getDefaultConfig()
+ l := newLogger(v)
+
+ neofsAPI, err := newNeofsAPI(cancelCtx, l, v)
+ require.NoError(t, err)
+
+ swaggerSpec, err := loads.Analyzed(restapi.SwaggerJSON, "")
+ require.NoError(t, err)
+
+ api := operations.NewNeofsRestGwAPI(swaggerSpec)
+ server := restapi.NewServer(api, serverConfig(v))
+
+ server.ConfigureAPI(neofsAPI.Configure)
+
+ go func() {
+ err := server.Serve()
+ require.NoError(t, err)
+ }()
+
+ return func() {
+ cancel()
+ err := server.Shutdown()
+ require.NoError(t, err)
+ }
+}
+
+func getDefaultConfig() *viper.Viper {
+ v := config()
+ v.SetDefault(cfgPeers+".0.address", testNode)
+ v.SetDefault(cfgPeers+".0.weight", 1)
+ v.SetDefault(cfgPeers+".0.priority", 1)
+ v.SetDefault(restapi.FlagListenAddress, testListenAddress)
+
+ return v
+}
+
+func getPool(ctx context.Context, t *testing.T, key *keys.PrivateKey) *pool.Pool {
+ var prm pool.InitParameters
+ prm.AddNode(pool.NewNodeParam(1, testNode, 1))
+ prm.SetKey(&key.PrivateKey)
+ prm.SetHealthcheckTimeout(5 * time.Second)
+ prm.SetNodeDialTimeout(5 * time.Second)
+
+ clientPool, err := pool.NewPool(prm)
+ require.NoError(t, err)
+ err = clientPool.Dial(ctx)
+ require.NoError(t, err)
+
+ return clientPool
+}
+
+func restObjectPut(ctx context.Context, t *testing.T, clientPool *pool.Pool, cnrID *cid.ID) {
+ restrictByEACL(ctx, t, clientPool, cnrID)
+
+ key, err := keys.NewPrivateKeyFromHex(devenvPrivateKey)
+ require.NoError(t, err)
+
+ b := models.Bearer{
+ Object: []*models.Record{{
+ Operation: models.NewOperation(models.OperationPUT),
+ Action: models.NewAction(models.ActionALLOW),
+ Filters: []*models.Filter{},
+ Targets: []*models.Target{{
+ Role: models.NewRole(models.RoleOTHERS),
+ Keys: []string{},
+ }},
+ }},
+ }
+
+ data, err := json.Marshal(&b)
+ require.NoError(t, err)
+
+ request0, err := http.NewRequest(http.MethodPost, testHost+"/v1/auth", bytes.NewReader(data))
+ require.NoError(t, err)
+ request0.Header.Add("Content-Type", "application/json")
+ request0.Header.Add(XNeofsTokenScope, string(models.TokenTypeObject))
+ request0.Header.Add(XNeofsTokenSignatureKey, hex.EncodeToString(key.PublicKey().Bytes()))
+
+ httpClient := http.Client{
+ Timeout: 5 * time.Second,
+ }
+
+ resp, err := httpClient.Do(request0)
+ require.NoError(t, err)
+ defer resp.Body.Close()
+
+ rr, err := io.ReadAll(resp.Body)
+ require.NoError(t, err)
+ fmt.Println(string(rr))
+
+ require.Equal(t, http.StatusOK, resp.StatusCode)
+
+ stokenResp := &models.TokenResponse{}
+ err = json.Unmarshal(rr, stokenResp)
+ require.NoError(t, err)
+
+ require.Equal(t, *stokenResp.Type, models.TokenTypeObject)
+
+ bearerBase64 := stokenResp.Token
+ fmt.Println(*bearerBase64)
+ binaryData, err := base64.StdEncoding.DecodeString(*bearerBase64)
+ require.NoError(t, err)
+
+ signatureData := signData(t, key, binaryData)
+
+ content := "content of file"
+ attrKey, attrValue := "User-Attribute", "user value"
+
+ attributes := map[string]string{
+ object.AttributeFileName: "newFile.txt",
+ attrKey: attrValue,
+ }
+
+ req := operations.PutObjectBody{
+ ContainerID: handlers.NewString(cnrID.String()),
+ FileName: handlers.NewString("newFile.txt"),
+ Payload: base64.StdEncoding.EncodeToString([]byte(content)),
+ }
+
+ body, err := json.Marshal(&req)
+ require.NoError(t, err)
+
+ fmt.Println(base64.StdEncoding.EncodeToString(signatureData))
+ fmt.Println(hex.EncodeToString(key.PublicKey().Bytes()))
+
+ request, err := http.NewRequest(http.MethodPut, testHost+"/v1/objects", bytes.NewReader(body))
+ require.NoError(t, err)
+ request.Header.Add("Content-Type", "application/json")
+ request.Header.Add(XNeofsTokenSignature, base64.StdEncoding.EncodeToString(signatureData))
+ request.Header.Add("Authorization", "Bearer "+*bearerBase64)
+ request.Header.Add(XNeofsTokenSignatureKey, hex.EncodeToString(key.PublicKey().Bytes()))
+ request.Header.Add("X-Attribute-"+attrKey, attrValue)
+
+ resp2, err := httpClient.Do(request)
+ require.NoError(t, err)
+ defer resp2.Body.Close()
+
+ rr2, err := io.ReadAll(resp2.Body)
+ require.NoError(t, err)
+
+ fmt.Println(string(rr2))
+ require.Equal(t, http.StatusOK, resp2.StatusCode)
+
+ addr := &operations.PutObjectOKBody{}
+ err = json.Unmarshal(rr2, addr)
+ require.NoError(t, err)
+
+ var CID cid.ID
+ err = CID.Parse(*addr.ContainerID)
+ require.NoError(t, err)
+
+ id := oid.NewID()
+ err = id.Parse(*addr.ObjectID)
+ require.NoError(t, err)
+
+ objectAddress := address.NewAddress()
+ objectAddress.SetContainerID(&CID)
+ objectAddress.SetObjectID(id)
+
+ payload := bytes.NewBuffer(nil)
+
+ var prm pool.PrmObjectGet
+ prm.SetAddress(*objectAddress)
+
+ res, err := clientPool.GetObject(ctx, prm)
+ require.NoError(t, err)
+
+ _, err = io.Copy(payload, res.Payload)
+ require.NoError(t, err)
+
+ require.Equal(t, content, payload.String())
+
+ for _, attribute := range res.Header.Attributes() {
+ require.Equal(t, attributes[attribute.Key()], attribute.Value(), attribute.Key())
+ }
+}
+
+func restContainerGet(ctx context.Context, t *testing.T, clientPool *pool.Pool, cnrID *cid.ID) {
+ httpClient := http.Client{Timeout: 5 * time.Second}
+ request, err := http.NewRequest(http.MethodGet, testHost+"/v1/containers/"+cnrID.String(), nil)
+ require.NoError(t, err)
+ request = request.WithContext(ctx)
+
+ resp, err := httpClient.Do(request)
+ require.NoError(t, err)
+ defer resp.Body.Close()
+ require.Equal(t, http.StatusOK, resp.StatusCode)
+
+ cnrInfo := &models.ContainerInfo{}
+ err = json.NewDecoder(resp.Body).Decode(cnrInfo)
+ require.NoError(t, err)
+
+ require.Equal(t, cnrID.String(), cnrInfo.ContainerID)
+ require.Equal(t, clientPool.OwnerID().String(), cnrInfo.OwnerID)
+}
+
+func signData(t *testing.T, key *keys.PrivateKey, data []byte) []byte {
+ h := sha512.Sum512(data)
+ x, y, err := ecdsa.Sign(rand.Reader, &key.PrivateKey, h[:])
+ require.NoError(t, err)
+ return elliptic.Marshal(elliptic.P256(), x, y)
+}
+
+func restContainerPut(ctx context.Context, t *testing.T, clientPool *pool.Pool) {
+ key, err := keys.NewPrivateKeyFromHex(devenvPrivateKey)
+ require.NoError(t, err)
+
+ b := models.Bearer{
+ Container: &models.Rule{
+ Verb: models.NewVerb(models.VerbPUT),
+ },
+ }
+
+ data, err := json.Marshal(&b)
+ require.NoError(t, err)
+
+ request0, err := http.NewRequest(http.MethodPost, testHost+"/v1/auth", bytes.NewReader(data))
+ require.NoError(t, err)
+ request0.Header.Add("Content-Type", "application/json")
+ request0.Header.Add(XNeofsTokenScope, "container")
+ request0.Header.Add(XNeofsTokenSignatureKey, hex.EncodeToString(key.PublicKey().Bytes()))
+
+ httpClient := http.Client{
+ Timeout: 30 * time.Second,
+ }
+
+ resp, err := httpClient.Do(request0)
+ require.NoError(t, err)
+ defer resp.Body.Close()
+
+ rr, err := io.ReadAll(resp.Body)
+ require.NoError(t, err)
+ fmt.Println(string(rr))
+ require.Equal(t, http.StatusOK, resp.StatusCode)
+
+ stokenResp := &models.TokenResponse{}
+ err = json.Unmarshal(rr, stokenResp)
+ require.NoError(t, err)
+
+ require.Equal(t, *stokenResp.Type, models.TokenTypeContainer)
+
+ bearerBase64 := stokenResp.Token
+ binaryData, err := base64.StdEncoding.DecodeString(*bearerBase64)
+ require.NoError(t, err)
+
+ signatureData := signData(t, key, binaryData)
+
+ attrKey, attrValue := "User-Attribute", "user value"
+
+ userAttributes := map[string]string{
+ attrKey: attrValue,
+ }
+
+ req := operations.PutContainerBody{
+ ContainerName: handlers.NewString("cnr"),
+ }
+
+ body, err := json.Marshal(&req)
+ require.NoError(t, err)
+
+ fmt.Println(base64.StdEncoding.EncodeToString(signatureData))
+ fmt.Println(hex.EncodeToString(key.PublicKey().Bytes()))
+
+ request, err := http.NewRequest(http.MethodPut, testHost+"/v1/containers", bytes.NewReader(body))
+ require.NoError(t, err)
+ request.Header.Add("Content-Type", "application/json")
+ request.Header.Add(XNeofsTokenSignature, base64.StdEncoding.EncodeToString(signatureData))
+ request.Header.Add("Authorization", "Bearer "+*bearerBase64)
+ request.Header.Add(XNeofsTokenSignatureKey, hex.EncodeToString(key.PublicKey().Bytes()))
+ request.Header.Add("X-Attribute-"+attrKey, attrValue)
+
+ resp2, err := httpClient.Do(request)
+ require.NoError(t, err)
+ defer resp2.Body.Close()
+
+ body, err = io.ReadAll(resp2.Body)
+ require.NoError(t, err)
+ fmt.Println(string(body))
+
+ require.Equal(t, http.StatusOK, resp2.StatusCode)
+
+ addr := &operations.PutContainerOKBody{}
+ err = json.Unmarshal(body, addr)
+ require.NoError(t, err)
+
+ var CID cid.ID
+ err = CID.Parse(*addr.ContainerID)
+ require.NoError(t, err)
+ fmt.Println(CID.String())
+
+ var prm pool.PrmContainerGet
+ prm.SetContainerID(CID)
+
+ cnr, err := clientPool.GetContainer(ctx, prm)
+ require.NoError(t, err)
+
+ cnrAttr := make(map[string]string, len(cnr.Attributes()))
+ for _, attribute := range cnr.Attributes() {
+ cnrAttr[attribute.Key()] = attribute.Value()
+ }
+
+ for key, val := range userAttributes {
+ require.Equal(t, val, cnrAttr[key])
+ }
+}
+
+func createContainer(ctx context.Context, t *testing.T, clientPool *pool.Pool) (*cid.ID, error) {
+ pp, err := policy.Parse("REP 1")
+ require.NoError(t, err)
+
+ cnr := container.New(
+ container.WithPolicy(pp),
+ container.WithCustomBasicACL(0x0FFFFFFF),
+ container.WithAttribute(container.AttributeName, "friendlyName"),
+ container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(time.Now().Unix(), 10)))
+ cnr.SetOwnerID(clientPool.OwnerID())
+
+ var waitPrm pool.WaitParams
+ waitPrm.SetPollInterval(3 * time.Second)
+ waitPrm.SetTimeout(15 * time.Second)
+
+ var prm pool.PrmContainerPut
+ prm.SetContainer(*cnr)
+ prm.SetWaitParams(waitPrm)
+
+ CID, err := clientPool.PutContainer(ctx, prm)
+ if err != nil {
+ return nil, err
+ }
+ fmt.Println(CID.String())
+
+ return CID, err
+}
+
+func restrictByEACL(ctx context.Context, t *testing.T, clientPool *pool.Pool, cnrID *cid.ID) {
+ table := new(eacl.Table)
+ table.SetCID(cnrID)
+
+ for op := eacl.OperationGet; op <= eacl.OperationRangeHash; op++ {
+ record := new(eacl.Record)
+ record.SetOperation(op)
+ record.SetAction(eacl.ActionDeny)
+ target := new(eacl.Target)
+ target.SetRole(eacl.RoleOthers)
+ record.SetTargets(*target)
+ table.AddRecord(record)
+ }
+
+ var waitPrm pool.WaitParams
+ waitPrm.SetPollInterval(3 * time.Second)
+ waitPrm.SetTimeout(15 * time.Second)
+
+ var prm pool.PrmContainerSetEACL
+ prm.SetTable(*table)
+ prm.SetWaitParams(waitPrm)
+
+ err := clientPool.SetEACL(ctx, prm)
+ require.NoError(t, err)
+}
diff --git a/cmd/neofs-rest-gw/main.go b/cmd/neofs-rest-gw/main.go
new file mode 100644
index 0000000..a7e8790
--- /dev/null
+++ b/cmd/neofs-rest-gw/main.go
@@ -0,0 +1,42 @@
+package main
+
+import (
+ "context"
+
+ "github.com/go-openapi/loads"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ "go.uber.org/zap"
+)
+
+func main() {
+ ctx := context.Background()
+
+ v := config()
+ logger := newLogger(v)
+
+ neofsAPI, err := newNeofsAPI(ctx, logger, v)
+ if err != nil {
+ logger.Fatal("init neofs", zap.Error(err))
+ }
+
+ swaggerSpec, err := loads.Analyzed(restapi.SwaggerJSON, "")
+ if err != nil {
+ logger.Fatal("init spec", zap.Error(err))
+ }
+
+ api := operations.NewNeofsRestGwAPI(swaggerSpec)
+ server := restapi.NewServer(api, serverConfig(v))
+ defer func() {
+ if err = server.Shutdown(); err != nil {
+ logger.Error("shutdown", zap.Error(err))
+ }
+ }()
+
+ server.ConfigureAPI(neofsAPI.Configure)
+
+ // serve API
+ if err = server.Serve(); err != nil {
+ logger.Fatal("serve", zap.Error(err))
+ }
+}
diff --git a/config/config.env b/config/config.env
new file mode 100644
index 0000000..eea528d
--- /dev/null
+++ b/config/config.env
@@ -0,0 +1,81 @@
+# Path to wallet.
+REST_GW_WALLET_PATH=/path/to/wallet.json
+# Account address. If omitted default one will be used.
+REST_GW_ADDRESS=NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP
+# Password to decrypt wallet.
+REST_GW_PASSPHRASE=pwd
+
+# Enable metrics.
+REST_GW_METRICS=true
+# Enable pprof.
+REST_GW_PPROF=true
+# Log level.
+REST_GW_LOGGER_LEVEL=debug
+
+# Nodes configuration.
+# This configuration make gateway use the first node (grpc://s01.neofs.devenv:8080)
+# while it's healthy. Otherwise, gateway use the second node (grpc://s01.neofs.devenv:8080)
+# for 10% of requests and the third node for 90% of requests.
+# Endpoint.
+REST_GW_PEERS_0_ADDRESS=grpc://s01.neofs.devenv:8080
+# Until nodes with the same priority level are healthy
+# nodes with other priority are not used.
+# Đhe lower the value, the higher the priority.
+REST_GW_PEERS_0_PRIORITY=1
+# Load distribution proportion for nodes with the same priority.
+REST_GW_PEERS_0_WEIGHT=1
+
+REST_GW_PEERS_1_ADDRESS=grpc://s02.neofs.devenv:8080
+REST_GW_PEERS_1_PRIORITY=2
+REST_GW_PEERS_1_WEIGHT=1
+
+REST_GW_PEERS_2_ADDRESS=grpc://s03.neofs.devenv:8080
+REST_GW_PEERS_2_PRIORITY=2
+REST_GW_PEERS_3_WEIGHT=9
+
+# Timeout to dial node.
+node_dial_timeout=5s
+# Timeout to check node health during rebalance.
+healthcheck_timeout=5s
+# Interval to check nodes health.
+rebalance_timer=30s
+
+# Grace period for which to wait before killing idle connections
+REST_GW_CLEANUP_TIMEOUT=10s
+# Grace period for which to wait before shutting down the server
+REST_GW_GRACEFUL_TIMEOUT=15s
+# Controls the maximum number of bytes the server will read parsing the request header's keys and values,
+# including the request line. It does not limit the size of the request body.
+REST_GW_MAX_HEADER_SIZE=1000000
+
+# The IP and port to listen on.
+REST_GW_LISTEN_ADDRESS=localhost:8080
+# Limit the number of outstanding requests.
+REST_GW_LISTEN_LIMIT=0
+# Sets the TCP keep-alive timeouts on accepted connections.
+# It prunes dead TCP connections ( e.g. closing laptop mid-download).
+REST_GW_KEEP_ALIVE=3m
+# Maximum duration before timing out read of the request.
+REST_GW_READ_TIMEOUT=30s
+# Maximum duration before timing out write of the response.
+REST_GW_WRITE_TIMEOUT=30s
+
+# The IP and port to listen on.
+REST_GW_TLS_LISTEN_ADDRESS=localhost:8081
+# The certificate file to use for secure connections.
+REST_GW_TLS_CERTIFICATE=/path/to/tls/cert
+# The private key file to use for secure connections (without passphrase).
+REST_GW_TLS_KEY=/path/to/tls/key
+# The certificate authority certificate file to be used with mutual tls auth.
+REST_GW_TLS_CA=/path/to/tls/ca
+# Limit the number of outstanding requests.
+REST_GW_TLS_LISTEN_LIMIT=0
+# Sets the TCP keep-alive timeouts on accepted connections.
+# It prunes dead TCP connections ( e.g. closing laptop mid-download).
+REST_GW_TLS_KEEP_ALIVE=3m
+# Maximum duration before timing out read of the request.
+REST_GW_TLS_READ_TIMEOUT=30s
+# Maximum duration before timing out write of the response.
+REST_GW_TLS_WRITE_TIMEOUT=30s
+
+
diff --git a/config/config.yaml b/config/config.yaml
new file mode 100644
index 0000000..6292f4d
--- /dev/null
+++ b/config/config.yaml
@@ -0,0 +1,87 @@
+wallet:
+ # Path to wallet.
+ path: /path/to/wallet.json
+ # Account address. If omitted default one will be used.
+ address: NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP
+ # Password to decrypt wallet.
+ passphrase: pwd
+
+# Enable metrics.
+metrics: true
+# Enable pprof.
+pprof: true
+logger:
+ # Log level.
+ level: debug
+
+# Nodes configuration.
+# This configuration make gateway use the first node (grpc://s01.neofs.devenv:8080)
+# while it's healthy. Otherwise, gateway use the second node (grpc://s01.neofs.devenv:8080)
+# for 10% of requests and the third node for 90% of requests.
+peers:
+ 0:
+ # Endpoint.
+ address: grpc://s01.neofs.devenv:8080
+ # Until nodes with the same priority level are healthy
+ # nodes with other priority are not used.
+ # Đhe lower the value, the higher the priority.
+ priority: 1
+ # Load distribution proportion for nodes with the same priority.
+ weight: 1
+ 1:
+ address: grpc://s02.neofs.devenv:8080
+ priority: 2
+ weight: 1
+ 2:
+ address: grpc://s03.neofs.devenv:8080
+ priority: 2
+ weight: 9
+
+# Timeout to dial node.
+node-dial-timeout: 5s
+# Timeout to check node health during rebalance.
+healthcheck-timeout: 5s
+# Interval to check nodes health.
+rebalance_timer: 30s
+
+# The listeners to enable, this can be repeated and defaults to the schemes in the swagger spec.
+scheme: [ http ]
+# Grace period for which to wait before killing idle connections
+cleanup-timeout: 10s
+# Grace period for which to wait before shutting down the server
+graceful-timeout: 15s
+# Controls the maximum number of bytes the server will read parsing the request header's keys and values,
+# including the request line. It does not limit the size of the request body.
+max-header-size: 1000000
+
+# The IP and port to listen on.
+listen-address: localhost:8080
+# Limit the number of outstanding requests.
+listen-limit: 0
+# Sets the TCP keep-alive timeouts on accepted connections.
+# It prunes dead TCP connections ( e.g. closing laptop mid-download).
+keep-alive: 3m
+# Maximum duration before timing out read of the request.
+read-timeout: 30s
+# Maximum duration before timing out write of the response.
+write-timeout: 30s
+
+# The IP and port to listen on.
+tls-listen-address: localhost:8081
+# The certificate file to use for secure connections.
+tls-certificate: /path/to/tls/cert
+# The private key file to use for secure connections (without passphrase).
+tls-key: /path/to/tls/key
+# The certificate authority certificate file to be used with mutual tls auth.
+tls-ca: /path/to/tls/ca
+# Limit the number of outstanding requests.
+tls-listen-limit: 0
+# Sets the TCP keep-alive timeouts on accepted connections.
+# It prunes dead TCP connections ( e.g. closing laptop mid-download).
+tls-keep-alive: 3m
+# Maximum duration before timing out read of the request.
+tls-read-timeout: 30s
+# Maximum duration before timing out write of the response.
+tls-write-timeout: 30s
+
+
diff --git a/gen/models/action.go b/gen/models/action.go
new file mode 100644
index 0000000..ffa9062
--- /dev/null
+++ b/gen/models/action.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// Action action
+//
+// swagger:model Action
+type Action string
+
+func NewAction(value Action) *Action {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated Action.
+func (m Action) Pointer() *Action {
+ return &m
+}
+
+const (
+
+ // ActionALLOW captures enum value "ALLOW"
+ ActionALLOW Action = "ALLOW"
+
+ // ActionDENY captures enum value "DENY"
+ ActionDENY Action = "DENY"
+)
+
+// for schema
+var actionEnum []interface{}
+
+func init() {
+ var res []Action
+ if err := json.Unmarshal([]byte(`["ALLOW","DENY"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ actionEnum = append(actionEnum, v)
+ }
+}
+
+func (m Action) validateActionEnum(path, location string, value Action) error {
+ if err := validate.EnumCase(path, location, value, actionEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this action
+func (m Action) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateActionEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this action based on context it is used
+func (m Action) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/attribute.go b/gen/models/attribute.go
new file mode 100644
index 0000000..8b2a10a
--- /dev/null
+++ b/gen/models/attribute.go
@@ -0,0 +1,53 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// Attribute attribute
+//
+// swagger:model Attribute
+type Attribute struct {
+
+ // key
+ Key string `json:"key,omitempty"`
+
+ // value
+ Value string `json:"value,omitempty"`
+}
+
+// Validate validates this attribute
+func (m *Attribute) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this attribute based on context it is used
+func (m *Attribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Attribute) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Attribute) UnmarshalBinary(b []byte) error {
+ var res Attribute
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/bearer.go b/gen/models/bearer.go
new file mode 100644
index 0000000..492e4ba
--- /dev/null
+++ b/gen/models/bearer.go
@@ -0,0 +1,162 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// Bearer bearer
+//
+// swagger:model Bearer
+type Bearer struct {
+
+ // container
+ Container *Rule `json:"container,omitempty"`
+
+ // object
+ Object []*Record `json:"object"`
+}
+
+// Validate validates this bearer
+func (m *Bearer) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateContainer(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateObject(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Bearer) validateContainer(formats strfmt.Registry) error {
+ if swag.IsZero(m.Container) { // not required
+ return nil
+ }
+
+ if m.Container != nil {
+ if err := m.Container.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Bearer) validateObject(formats strfmt.Registry) error {
+ if swag.IsZero(m.Object) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.Object); i++ {
+ if swag.IsZero(m.Object[i]) { // not required
+ continue
+ }
+
+ if m.Object[i] != nil {
+ if err := m.Object[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("object" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("object" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this bearer based on the context it is used
+func (m *Bearer) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateContainer(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateObject(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Bearer) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Container != nil {
+ if err := m.Container.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Bearer) contextValidateObject(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Object); i++ {
+
+ if m.Object[i] != nil {
+ if err := m.Object[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("object" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("object" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Bearer) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Bearer) UnmarshalBinary(b []byte) error {
+ var res Bearer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/container_info.go b/gen/models/container_info.go
new file mode 100644
index 0000000..aa4da3a
--- /dev/null
+++ b/gen/models/container_info.go
@@ -0,0 +1,132 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// ContainerInfo container info
+// Example: {"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"container"}],"basicAcl":"0x1fbf9fff","containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM","placementPolicy":"REP 2","version":"2.11"}
+//
+// swagger:model ContainerInfo
+type ContainerInfo struct {
+
+ // attributes
+ Attributes []*Attribute `json:"attributes"`
+
+ // basic Acl
+ BasicACL string `json:"basicAcl,omitempty"`
+
+ // container Id
+ ContainerID string `json:"containerId,omitempty"`
+
+ // owner Id
+ OwnerID string `json:"ownerId,omitempty"`
+
+ // placement policy
+ PlacementPolicy string `json:"placementPolicy,omitempty"`
+
+ // version
+ Version string `json:"version,omitempty"`
+}
+
+// Validate validates this container info
+func (m *ContainerInfo) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAttributes(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ContainerInfo) validateAttributes(formats strfmt.Registry) error {
+ if swag.IsZero(m.Attributes) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(m.Attributes); i++ {
+ if swag.IsZero(m.Attributes[i]) { // not required
+ continue
+ }
+
+ if m.Attributes[i] != nil {
+ if err := m.Attributes[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("attributes" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("attributes" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this container info based on the context it is used
+func (m *ContainerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAttributes(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ContainerInfo) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Attributes); i++ {
+
+ if m.Attributes[i] != nil {
+ if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("attributes" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("attributes" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ContainerInfo) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ContainerInfo) UnmarshalBinary(b []byte) error {
+ var res ContainerInfo
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/error.go b/gen/models/error.go
new file mode 100644
index 0000000..f0f02dc
--- /dev/null
+++ b/gen/models/error.go
@@ -0,0 +1,27 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/strfmt"
+)
+
+// Error error
+//
+// swagger:model Error
+type Error string
+
+// Validate validates this error
+func (m Error) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this error based on context it is used
+func (m Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/filter.go b/gen/models/filter.go
new file mode 100644
index 0000000..2b16f88
--- /dev/null
+++ b/gen/models/filter.go
@@ -0,0 +1,198 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Filter filter
+// Example: {"headerType":"OBJECT","key":"FileName","matchType":"STRING_NOT_EQUAL","value":"myfile"}
+//
+// swagger:model Filter
+type Filter struct {
+
+ // header type
+ // Required: true
+ HeaderType *HeaderType `json:"headerType"`
+
+ // key
+ // Required: true
+ Key *string `json:"key"`
+
+ // match type
+ // Required: true
+ MatchType *MatchType `json:"matchType"`
+
+ // value
+ // Required: true
+ Value *string `json:"value"`
+}
+
+// Validate validates this filter
+func (m *Filter) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateHeaderType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateKey(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMatchType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Filter) validateHeaderType(formats strfmt.Registry) error {
+
+ if err := validate.Required("headerType", "body", m.HeaderType); err != nil {
+ return err
+ }
+
+ if err := validate.Required("headerType", "body", m.HeaderType); err != nil {
+ return err
+ }
+
+ if m.HeaderType != nil {
+ if err := m.HeaderType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("headerType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("headerType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Filter) validateKey(formats strfmt.Registry) error {
+
+ if err := validate.Required("key", "body", m.Key); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Filter) validateMatchType(formats strfmt.Registry) error {
+
+ if err := validate.Required("matchType", "body", m.MatchType); err != nil {
+ return err
+ }
+
+ if err := validate.Required("matchType", "body", m.MatchType); err != nil {
+ return err
+ }
+
+ if m.MatchType != nil {
+ if err := m.MatchType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("matchType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("matchType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Filter) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validate this filter based on the context it is used
+func (m *Filter) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateHeaderType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateMatchType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Filter) contextValidateHeaderType(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.HeaderType != nil {
+ if err := m.HeaderType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("headerType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("headerType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Filter) contextValidateMatchType(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.MatchType != nil {
+ if err := m.MatchType.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("matchType")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("matchType")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Filter) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Filter) UnmarshalBinary(b []byte) error {
+ var res Filter
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/header_type.go b/gen/models/header_type.go
new file mode 100644
index 0000000..a40bf0a
--- /dev/null
+++ b/gen/models/header_type.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// HeaderType header type
+//
+// swagger:model HeaderType
+type HeaderType string
+
+func NewHeaderType(value HeaderType) *HeaderType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated HeaderType.
+func (m HeaderType) Pointer() *HeaderType {
+ return &m
+}
+
+const (
+
+ // HeaderTypeREQUEST captures enum value "REQUEST"
+ HeaderTypeREQUEST HeaderType = "REQUEST"
+
+ // HeaderTypeOBJECT captures enum value "OBJECT"
+ HeaderTypeOBJECT HeaderType = "OBJECT"
+
+ // HeaderTypeSERVICE captures enum value "SERVICE"
+ HeaderTypeSERVICE HeaderType = "SERVICE"
+)
+
+// for schema
+var headerTypeEnum []interface{}
+
+func init() {
+ var res []HeaderType
+ if err := json.Unmarshal([]byte(`["REQUEST","OBJECT","SERVICE"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ headerTypeEnum = append(headerTypeEnum, v)
+ }
+}
+
+func (m HeaderType) validateHeaderTypeEnum(path, location string, value HeaderType) error {
+ if err := validate.EnumCase(path, location, value, headerTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this header type
+func (m HeaderType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateHeaderTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this header type based on context it is used
+func (m HeaderType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/match_type.go b/gen/models/match_type.go
new file mode 100644
index 0000000..03dfa7f
--- /dev/null
+++ b/gen/models/match_type.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// MatchType match type
+//
+// swagger:model MatchType
+type MatchType string
+
+func NewMatchType(value MatchType) *MatchType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated MatchType.
+func (m MatchType) Pointer() *MatchType {
+ return &m
+}
+
+const (
+
+ // MatchTypeSTRINGEQUAL captures enum value "STRING_EQUAL"
+ MatchTypeSTRINGEQUAL MatchType = "STRING_EQUAL"
+
+ // MatchTypeSTRINGNOTEQUAL captures enum value "STRING_NOT_EQUAL"
+ MatchTypeSTRINGNOTEQUAL MatchType = "STRING_NOT_EQUAL"
+)
+
+// for schema
+var matchTypeEnum []interface{}
+
+func init() {
+ var res []MatchType
+ if err := json.Unmarshal([]byte(`["STRING_EQUAL","STRING_NOT_EQUAL"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ matchTypeEnum = append(matchTypeEnum, v)
+ }
+}
+
+func (m MatchType) validateMatchTypeEnum(path, location string, value MatchType) error {
+ if err := validate.EnumCase(path, location, value, matchTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this match type
+func (m MatchType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateMatchTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this match type based on context it is used
+func (m MatchType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/operation.go b/gen/models/operation.go
new file mode 100644
index 0000000..4e08e01
--- /dev/null
+++ b/gen/models/operation.go
@@ -0,0 +1,93 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// Operation operation
+//
+// swagger:model Operation
+type Operation string
+
+func NewOperation(value Operation) *Operation {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated Operation.
+func (m Operation) Pointer() *Operation {
+ return &m
+}
+
+const (
+
+ // OperationGET captures enum value "GET"
+ OperationGET Operation = "GET"
+
+ // OperationHEAD captures enum value "HEAD"
+ OperationHEAD Operation = "HEAD"
+
+ // OperationPUT captures enum value "PUT"
+ OperationPUT Operation = "PUT"
+
+ // OperationDELETE captures enum value "DELETE"
+ OperationDELETE Operation = "DELETE"
+
+ // OperationSEARCH captures enum value "SEARCH"
+ OperationSEARCH Operation = "SEARCH"
+
+ // OperationRANGE captures enum value "RANGE"
+ OperationRANGE Operation = "RANGE"
+
+ // OperationRANGEHASH captures enum value "RANGEHASH"
+ OperationRANGEHASH Operation = "RANGEHASH"
+)
+
+// for schema
+var operationEnum []interface{}
+
+func init() {
+ var res []Operation
+ if err := json.Unmarshal([]byte(`["GET","HEAD","PUT","DELETE","SEARCH","RANGE","RANGEHASH"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ operationEnum = append(operationEnum, v)
+ }
+}
+
+func (m Operation) validateOperationEnum(path, location string, value Operation) error {
+ if err := validate.EnumCase(path, location, value, operationEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this operation
+func (m Operation) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateOperationEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this operation based on context it is used
+func (m Operation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/principal.go b/gen/models/principal.go
new file mode 100644
index 0000000..7a69058
--- /dev/null
+++ b/gen/models/principal.go
@@ -0,0 +1,27 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/strfmt"
+)
+
+// Principal principal
+//
+// swagger:model Principal
+type Principal string
+
+// Validate validates this principal
+func (m Principal) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this principal based on context it is used
+func (m Principal) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/record.go b/gen/models/record.go
new file mode 100644
index 0000000..e587b53
--- /dev/null
+++ b/gen/models/record.go
@@ -0,0 +1,283 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Record record
+// Example: {"action":"ALLOW","filters":[],"operation":"GET","targets":[{"keys":[],"role":"OTHERS"}]}
+//
+// swagger:model Record
+type Record struct {
+
+ // action
+ // Required: true
+ Action *Action `json:"action"`
+
+ // filters
+ // Required: true
+ Filters []*Filter `json:"filters"`
+
+ // operation
+ // Required: true
+ Operation *Operation `json:"operation"`
+
+ // targets
+ // Required: true
+ Targets []*Target `json:"targets"`
+}
+
+// Validate validates this record
+func (m *Record) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAction(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateFilters(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOperation(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateTargets(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Record) validateAction(formats strfmt.Registry) error {
+
+ if err := validate.Required("action", "body", m.Action); err != nil {
+ return err
+ }
+
+ if err := validate.Required("action", "body", m.Action); err != nil {
+ return err
+ }
+
+ if m.Action != nil {
+ if err := m.Action.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("action")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("action")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Record) validateFilters(formats strfmt.Registry) error {
+
+ if err := validate.Required("filters", "body", m.Filters); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.Filters); i++ {
+ if swag.IsZero(m.Filters[i]) { // not required
+ continue
+ }
+
+ if m.Filters[i] != nil {
+ if err := m.Filters[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("filters" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("filters" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *Record) validateOperation(formats strfmt.Registry) error {
+
+ if err := validate.Required("operation", "body", m.Operation); err != nil {
+ return err
+ }
+
+ if err := validate.Required("operation", "body", m.Operation); err != nil {
+ return err
+ }
+
+ if m.Operation != nil {
+ if err := m.Operation.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("operation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("operation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Record) validateTargets(formats strfmt.Registry) error {
+
+ if err := validate.Required("targets", "body", m.Targets); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.Targets); i++ {
+ if swag.IsZero(m.Targets[i]) { // not required
+ continue
+ }
+
+ if m.Targets[i] != nil {
+ if err := m.Targets[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("targets" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("targets" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this record based on the context it is used
+func (m *Record) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateAction(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateFilters(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateOperation(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.contextValidateTargets(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Record) contextValidateAction(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Action != nil {
+ if err := m.Action.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("action")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("action")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Record) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Filters); i++ {
+
+ if m.Filters[i] != nil {
+ if err := m.Filters[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("filters" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("filters" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *Record) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Operation != nil {
+ if err := m.Operation.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("operation")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("operation")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Record) contextValidateTargets(ctx context.Context, formats strfmt.Registry) error {
+
+ for i := 0; i < len(m.Targets); i++ {
+
+ if m.Targets[i] != nil {
+ if err := m.Targets[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("targets" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("targets" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Record) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Record) UnmarshalBinary(b []byte) error {
+ var res Record
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/role.go b/gen/models/role.go
new file mode 100644
index 0000000..8d79005
--- /dev/null
+++ b/gen/models/role.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// Role role
+//
+// swagger:model Role
+type Role string
+
+func NewRole(value Role) *Role {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated Role.
+func (m Role) Pointer() *Role {
+ return &m
+}
+
+const (
+
+ // RoleUSER captures enum value "USER"
+ RoleUSER Role = "USER"
+
+ // RoleSYSTEM captures enum value "SYSTEM"
+ RoleSYSTEM Role = "SYSTEM"
+
+ // RoleOTHERS captures enum value "OTHERS"
+ RoleOTHERS Role = "OTHERS"
+)
+
+// for schema
+var roleEnum []interface{}
+
+func init() {
+ var res []Role
+ if err := json.Unmarshal([]byte(`["USER","SYSTEM","OTHERS"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ roleEnum = append(roleEnum, v)
+ }
+}
+
+func (m Role) validateRoleEnum(path, location string, value Role) error {
+ if err := validate.EnumCase(path, location, value, roleEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this role
+func (m Role) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateRoleEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this role based on context it is used
+func (m Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/rule.go b/gen/models/rule.go
new file mode 100644
index 0000000..1cee028
--- /dev/null
+++ b/gen/models/rule.go
@@ -0,0 +1,114 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Rule rule
+//
+// swagger:model Rule
+type Rule struct {
+
+ // container Id
+ ContainerID string `json:"containerId,omitempty"`
+
+ // verb
+ // Required: true
+ Verb *Verb `json:"verb"`
+}
+
+// Validate validates this rule
+func (m *Rule) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateVerb(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Rule) validateVerb(formats strfmt.Registry) error {
+
+ if err := validate.Required("verb", "body", m.Verb); err != nil {
+ return err
+ }
+
+ if err := validate.Required("verb", "body", m.Verb); err != nil {
+ return err
+ }
+
+ if m.Verb != nil {
+ if err := m.Verb.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("verb")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("verb")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// ContextValidate validate this rule based on the context it is used
+func (m *Rule) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateVerb(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Rule) contextValidateVerb(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Verb != nil {
+ if err := m.Verb.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("verb")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("verb")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Rule) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Rule) UnmarshalBinary(b []byte) error {
+ var res Rule
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/target.go b/gen/models/target.go
new file mode 100644
index 0000000..ba7389a
--- /dev/null
+++ b/gen/models/target.go
@@ -0,0 +1,129 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Target target
+// Example: {"keys":["021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e"],"role":"USER"}
+//
+// swagger:model Target
+type Target struct {
+
+ // keys
+ // Required: true
+ Keys []string `json:"keys"`
+
+ // role
+ // Required: true
+ Role *Role `json:"role"`
+}
+
+// Validate validates this target
+func (m *Target) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateKeys(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Target) validateKeys(formats strfmt.Registry) error {
+
+ if err := validate.Required("keys", "body", m.Keys); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Target) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// ContextValidate validate this target based on the context it is used
+func (m *Target) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateRole(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Target) contextValidateRole(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Role != nil {
+ if err := m.Role.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Target) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Target) UnmarshalBinary(b []byte) error {
+ var res Target
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/token_response.go b/gen/models/token_response.go
new file mode 100644
index 0000000..caa15c3
--- /dev/null
+++ b/gen/models/token_response.go
@@ -0,0 +1,129 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// TokenResponse token response
+// Example: [{"token":"sometoken-todo-add","type":"object"},{"token":"ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==","type":"container"}]
+//
+// swagger:model TokenResponse
+type TokenResponse struct {
+
+ // token
+ // Required: true
+ Token *string `json:"token"`
+
+ // type
+ // Required: true
+ Type *TokenType `json:"type"`
+}
+
+// Validate validates this token response
+func (m *TokenResponse) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateToken(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TokenResponse) validateToken(formats strfmt.Registry) error {
+
+ if err := validate.Required("token", "body", m.Token); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TokenResponse) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if m.Type != nil {
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// ContextValidate validate this token response based on the context it is used
+func (m *TokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.contextValidateType(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TokenResponse) contextValidateType(ctx context.Context, formats strfmt.Registry) error {
+
+ if m.Type != nil {
+ if err := m.Type.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *TokenResponse) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *TokenResponse) UnmarshalBinary(b []byte) error {
+ var res TokenResponse
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/gen/models/token_type.go b/gen/models/token_type.go
new file mode 100644
index 0000000..8fca4e0
--- /dev/null
+++ b/gen/models/token_type.go
@@ -0,0 +1,78 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// TokenType token type
+//
+// swagger:model TokenType
+type TokenType string
+
+func NewTokenType(value TokenType) *TokenType {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated TokenType.
+func (m TokenType) Pointer() *TokenType {
+ return &m
+}
+
+const (
+
+ // TokenTypeObject captures enum value "object"
+ TokenTypeObject TokenType = "object"
+
+ // TokenTypeContainer captures enum value "container"
+ TokenTypeContainer TokenType = "container"
+)
+
+// for schema
+var tokenTypeEnum []interface{}
+
+func init() {
+ var res []TokenType
+ if err := json.Unmarshal([]byte(`["object","container"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ tokenTypeEnum = append(tokenTypeEnum, v)
+ }
+}
+
+func (m TokenType) validateTokenTypeEnum(path, location string, value TokenType) error {
+ if err := validate.EnumCase(path, location, value, tokenTypeEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this token type
+func (m TokenType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateTokenTypeEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this token type based on context it is used
+func (m TokenType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/models/verb.go b/gen/models/verb.go
new file mode 100644
index 0000000..83e3770
--- /dev/null
+++ b/gen/models/verb.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// Verb verb
+//
+// swagger:model Verb
+type Verb string
+
+func NewVerb(value Verb) *Verb {
+ return &value
+}
+
+// Pointer returns a pointer to a freshly-allocated Verb.
+func (m Verb) Pointer() *Verb {
+ return &m
+}
+
+const (
+
+ // VerbPUT captures enum value "PUT"
+ VerbPUT Verb = "PUT"
+
+ // VerbDELETE captures enum value "DELETE"
+ VerbDELETE Verb = "DELETE"
+
+ // VerbSETEACL captures enum value "SETEACL"
+ VerbSETEACL Verb = "SETEACL"
+)
+
+// for schema
+var verbEnum []interface{}
+
+func init() {
+ var res []Verb
+ if err := json.Unmarshal([]byte(`["PUT","DELETE","SETEACL"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ verbEnum = append(verbEnum, v)
+ }
+}
+
+func (m Verb) validateVerbEnum(path, location string, value Verb) error {
+ if err := validate.EnumCase(path, location, value, verbEnum, true); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Validate validates this verb
+func (m Verb) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ // value enum
+ if err := m.validateVerbEnum("", "body", m); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// ContextValidate validates this verb based on context it is used
+func (m Verb) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
diff --git a/gen/restapi/doc.go b/gen/restapi/doc.go
new file mode 100644
index 0000000..433b039
--- /dev/null
+++ b/gen/restapi/doc.go
@@ -0,0 +1,19 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Package restapi REST API NeoFS
+//
+// REST API NeoFS
+// Schemes:
+// http
+// Host: localhost:8090
+// BasePath: /v1
+// Version: v1
+//
+// Consumes:
+// - application/json
+//
+// Produces:
+// - application/json
+//
+// swagger:meta
+package restapi
diff --git a/gen/restapi/embedded_spec.go b/gen/restapi/embedded_spec.go
new file mode 100644
index 0000000..63b21ba
--- /dev/null
+++ b/gen/restapi/embedded_spec.go
@@ -0,0 +1,1122 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package restapi
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+)
+
+var (
+ // SwaggerJSON embedded version of the swagger document used at generation time
+ SwaggerJSON json.RawMessage
+ // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
+ FlatSwaggerJSON json.RawMessage
+)
+
+func init() {
+ SwaggerJSON = json.RawMessage([]byte(`{
+ "schemes": [
+ "http"
+ ],
+ "swagger": "2.0",
+ "info": {
+ "description": "REST API NeoFS",
+ "title": "REST API NeoFS",
+ "version": "v1"
+ },
+ "host": "localhost:8090",
+ "basePath": "/v1",
+ "paths": {
+ "/auth": {
+ "post": {
+ "security": [],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "summary": "Form bearer token to futher requests",
+ "operationId": "auth",
+ "parameters": [
+ {
+ "enum": [
+ "object",
+ "container"
+ ],
+ "type": "string",
+ "description": "Supported operation scope for token",
+ "name": "X-Neofs-Token-Scope",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Public key of user",
+ "name": "X-Neofs-Token-Signature-Key",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "default": 100,
+ "description": "Token lifetime in epoch",
+ "name": "X-Neofs-Token-Lifetime",
+ "in": "header"
+ },
+ {
+ "description": "Bearer token",
+ "name": "token",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Bearer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Base64 encoded stable binary marshaled bearer token",
+ "schema": {
+ "$ref": "#/definitions/TokenResponse"
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/containers": {
+ "put": {
+ "summary": "Create new container in NeoFS",
+ "operationId": "putContainer",
+ "parameters": [
+ {
+ "description": "Container info",
+ "name": "container",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerName"
+ ],
+ "properties": {
+ "basicAcl": {
+ "type": "string"
+ },
+ "containerName": {
+ "type": "string"
+ },
+ "placementPolicy": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "basicAcl": "public-read-write",
+ "containerId": "container",
+ "placementPolicy": "REP 3"
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Address of uploaded objects",
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerId"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base64 encoded signature for bearer token",
+ "name": "X-Neofs-Token-Signature",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Hex encoded the public part of the key that signed the bearer token",
+ "name": "X-Neofs-Token-signature-Key",
+ "in": "header",
+ "required": true
+ }
+ ]
+ },
+ "/containers/{containerId}": {
+ "get": {
+ "security": [],
+ "summary": "Get container by id",
+ "operationId": "getContainer",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base58 encoded container id",
+ "name": "containerId",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Container info",
+ "schema": {
+ "$ref": "#/definitions/ContainerInfo"
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/objects": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "summary": "Upload object to NeoFS",
+ "operationId": "putObject",
+ "parameters": [
+ {
+ "description": "Object info to upload",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerId",
+ "fileName"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "fileName": {
+ "type": "string"
+ },
+ "payload": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "fileName": "myFile.txt",
+ "payload": "Y29udGVudCBvZiBmaWxl"
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Address of uploaded objects",
+ "schema": {
+ "type": "object",
+ "required": [
+ "objectId",
+ "containerId"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "objectId": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "objectId": "8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base64 encoded signature for bearer token",
+ "name": "X-Neofs-Token-Signature",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Hex encoded the public part of the key that signed the bearer token",
+ "name": "X-Neofs-Token-Signature-Key",
+ "in": "header",
+ "required": true
+ }
+ ]
+ }
+ },
+ "definitions": {
+ "Action": {
+ "type": "string",
+ "enum": [
+ "ALLOW",
+ "DENY"
+ ]
+ },
+ "Attribute": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "Bearer": {
+ "type": "object",
+ "properties": {
+ "container": {
+ "$ref": "#/definitions/Rule"
+ },
+ "object": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Record"
+ }
+ }
+ }
+ },
+ "ContainerInfo": {
+ "type": "object",
+ "properties": {
+ "attributes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Attribute"
+ }
+ },
+ "basicAcl": {
+ "type": "string"
+ },
+ "containerId": {
+ "type": "string"
+ },
+ "ownerId": {
+ "type": "string"
+ },
+ "placementPolicy": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "attribute": [
+ {
+ "key": "Timestamp",
+ "value": "1648810072"
+ },
+ {
+ "key": "Name",
+ "value": "container"
+ }
+ ],
+ "basicAcl": "0x1fbf9fff",
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM",
+ "placementPolicy": "REP 2",
+ "version": "2.11"
+ }
+ },
+ "Error": {
+ "type": "string"
+ },
+ "Filter": {
+ "type": "object",
+ "required": [
+ "headerType",
+ "matchType",
+ "key",
+ "value"
+ ],
+ "properties": {
+ "headerType": {
+ "$ref": "#/definitions/HeaderType"
+ },
+ "key": {
+ "type": "string"
+ },
+ "matchType": {
+ "$ref": "#/definitions/MatchType"
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "headerType": "OBJECT",
+ "key": "FileName",
+ "matchType": "STRING_NOT_EQUAL",
+ "value": "myfile"
+ }
+ },
+ "HeaderType": {
+ "type": "string",
+ "enum": [
+ "REQUEST",
+ "OBJECT",
+ "SERVICE"
+ ]
+ },
+ "MatchType": {
+ "type": "string",
+ "enum": [
+ "STRING_EQUAL",
+ "STRING_NOT_EQUAL"
+ ]
+ },
+ "Operation": {
+ "type": "string",
+ "enum": [
+ "GET",
+ "HEAD",
+ "PUT",
+ "DELETE",
+ "SEARCH",
+ "RANGE",
+ "RANGEHASH"
+ ]
+ },
+ "Principal": {
+ "type": "string"
+ },
+ "Record": {
+ "type": "object",
+ "required": [
+ "action",
+ "operation",
+ "filters",
+ "targets"
+ ],
+ "properties": {
+ "action": {
+ "$ref": "#/definitions/Action"
+ },
+ "filters": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Filter"
+ }
+ },
+ "operation": {
+ "$ref": "#/definitions/Operation"
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Target"
+ }
+ }
+ },
+ "example": {
+ "action": "ALLOW",
+ "filters": null,
+ "operation": "GET",
+ "targets": [
+ {
+ "keys": null,
+ "role": "OTHERS"
+ }
+ ]
+ }
+ },
+ "Role": {
+ "type": "string",
+ "enum": [
+ "USER",
+ "SYSTEM",
+ "OTHERS"
+ ]
+ },
+ "Rule": {
+ "type": "object",
+ "required": [
+ "verb"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "verb": {
+ "$ref": "#/definitions/Verb"
+ }
+ }
+ },
+ "Target": {
+ "type": "object",
+ "required": [
+ "role",
+ "keys"
+ ],
+ "properties": {
+ "keys": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "role": {
+ "$ref": "#/definitions/Role"
+ }
+ },
+ "example": {
+ "keys": [
+ "021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e"
+ ],
+ "role": "USER"
+ }
+ },
+ "TokenResponse": {
+ "type": "object",
+ "required": [
+ "type",
+ "token"
+ ],
+ "properties": {
+ "token": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/TokenType"
+ }
+ },
+ "example": [
+ {
+ "token": "sometoken-todo-add",
+ "type": "object"
+ },
+ {
+ "token": "ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==",
+ "type": "container"
+ }
+ ]
+ },
+ "TokenType": {
+ "type": "string",
+ "enum": [
+ "object",
+ "container"
+ ]
+ },
+ "Verb": {
+ "type": "string",
+ "enum": [
+ "PUT",
+ "DELETE",
+ "SETEACL"
+ ]
+ }
+ },
+ "securityDefinitions": {
+ "BearerAuth": {
+ "type": "apiKey",
+ "name": "Authorization",
+ "in": "header"
+ }
+ },
+ "security": [
+ {
+ "BearerAuth": []
+ }
+ ]
+}`))
+ FlatSwaggerJSON = json.RawMessage([]byte(`{
+ "schemes": [
+ "http"
+ ],
+ "swagger": "2.0",
+ "info": {
+ "description": "REST API NeoFS",
+ "title": "REST API NeoFS",
+ "version": "v1"
+ },
+ "host": "localhost:8090",
+ "basePath": "/v1",
+ "paths": {
+ "/auth": {
+ "post": {
+ "security": [],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "summary": "Form bearer token to futher requests",
+ "operationId": "auth",
+ "parameters": [
+ {
+ "enum": [
+ "object",
+ "container"
+ ],
+ "type": "string",
+ "description": "Supported operation scope for token",
+ "name": "X-Neofs-Token-Scope",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Public key of user",
+ "name": "X-Neofs-Token-Signature-Key",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "default": 100,
+ "description": "Token lifetime in epoch",
+ "name": "X-Neofs-Token-Lifetime",
+ "in": "header"
+ },
+ {
+ "description": "Bearer token",
+ "name": "token",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Bearer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Base64 encoded stable binary marshaled bearer token",
+ "schema": {
+ "$ref": "#/definitions/TokenResponse"
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/containers": {
+ "put": {
+ "summary": "Create new container in NeoFS",
+ "operationId": "putContainer",
+ "parameters": [
+ {
+ "description": "Container info",
+ "name": "container",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerName"
+ ],
+ "properties": {
+ "basicAcl": {
+ "type": "string"
+ },
+ "containerName": {
+ "type": "string"
+ },
+ "placementPolicy": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "basicAcl": "public-read-write",
+ "containerId": "container",
+ "placementPolicy": "REP 3"
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Address of uploaded objects",
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerId"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base64 encoded signature for bearer token",
+ "name": "X-Neofs-Token-Signature",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Hex encoded the public part of the key that signed the bearer token",
+ "name": "X-Neofs-Token-signature-Key",
+ "in": "header",
+ "required": true
+ }
+ ]
+ },
+ "/containers/{containerId}": {
+ "get": {
+ "security": [],
+ "summary": "Get container by id",
+ "operationId": "getContainer",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base58 encoded container id",
+ "name": "containerId",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Container info",
+ "schema": {
+ "$ref": "#/definitions/ContainerInfo"
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/objects": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "summary": "Upload object to NeoFS",
+ "operationId": "putObject",
+ "parameters": [
+ {
+ "description": "Object info to upload",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "required": [
+ "containerId",
+ "fileName"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "fileName": {
+ "type": "string"
+ },
+ "payload": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "fileName": "myFile.txt",
+ "payload": "Y29udGVudCBvZiBmaWxl"
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Address of uploaded objects",
+ "schema": {
+ "type": "object",
+ "required": [
+ "objectId",
+ "containerId"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "objectId": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "objectId": "8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Base64 encoded signature for bearer token",
+ "name": "X-Neofs-Token-Signature",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Hex encoded the public part of the key that signed the bearer token",
+ "name": "X-Neofs-Token-Signature-Key",
+ "in": "header",
+ "required": true
+ }
+ ]
+ }
+ },
+ "definitions": {
+ "Action": {
+ "type": "string",
+ "enum": [
+ "ALLOW",
+ "DENY"
+ ]
+ },
+ "Attribute": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "Bearer": {
+ "type": "object",
+ "properties": {
+ "container": {
+ "$ref": "#/definitions/Rule"
+ },
+ "object": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Record"
+ }
+ }
+ }
+ },
+ "ContainerInfo": {
+ "type": "object",
+ "properties": {
+ "attributes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Attribute"
+ }
+ },
+ "basicAcl": {
+ "type": "string"
+ },
+ "containerId": {
+ "type": "string"
+ },
+ "ownerId": {
+ "type": "string"
+ },
+ "placementPolicy": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "attribute": [
+ {
+ "key": "Timestamp",
+ "value": "1648810072"
+ },
+ {
+ "key": "Name",
+ "value": "container"
+ }
+ ],
+ "basicAcl": "0x1fbf9fff",
+ "containerId": "5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv",
+ "ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM",
+ "placementPolicy": "REP 2",
+ "version": "2.11"
+ }
+ },
+ "Error": {
+ "type": "string"
+ },
+ "Filter": {
+ "type": "object",
+ "required": [
+ "headerType",
+ "matchType",
+ "key",
+ "value"
+ ],
+ "properties": {
+ "headerType": {
+ "$ref": "#/definitions/HeaderType"
+ },
+ "key": {
+ "type": "string"
+ },
+ "matchType": {
+ "$ref": "#/definitions/MatchType"
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "headerType": "OBJECT",
+ "key": "FileName",
+ "matchType": "STRING_NOT_EQUAL",
+ "value": "myfile"
+ }
+ },
+ "HeaderType": {
+ "type": "string",
+ "enum": [
+ "REQUEST",
+ "OBJECT",
+ "SERVICE"
+ ]
+ },
+ "MatchType": {
+ "type": "string",
+ "enum": [
+ "STRING_EQUAL",
+ "STRING_NOT_EQUAL"
+ ]
+ },
+ "Operation": {
+ "type": "string",
+ "enum": [
+ "GET",
+ "HEAD",
+ "PUT",
+ "DELETE",
+ "SEARCH",
+ "RANGE",
+ "RANGEHASH"
+ ]
+ },
+ "Principal": {
+ "type": "string"
+ },
+ "Record": {
+ "type": "object",
+ "required": [
+ "action",
+ "operation",
+ "filters",
+ "targets"
+ ],
+ "properties": {
+ "action": {
+ "$ref": "#/definitions/Action"
+ },
+ "filters": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Filter"
+ }
+ },
+ "operation": {
+ "$ref": "#/definitions/Operation"
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Target"
+ }
+ }
+ },
+ "example": {
+ "action": "ALLOW",
+ "filters": [],
+ "operation": "GET",
+ "targets": [
+ {
+ "keys": [],
+ "role": "OTHERS"
+ }
+ ]
+ }
+ },
+ "Role": {
+ "type": "string",
+ "enum": [
+ "USER",
+ "SYSTEM",
+ "OTHERS"
+ ]
+ },
+ "Rule": {
+ "type": "object",
+ "required": [
+ "verb"
+ ],
+ "properties": {
+ "containerId": {
+ "type": "string"
+ },
+ "verb": {
+ "$ref": "#/definitions/Verb"
+ }
+ }
+ },
+ "Target": {
+ "type": "object",
+ "required": [
+ "role",
+ "keys"
+ ],
+ "properties": {
+ "keys": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "role": {
+ "$ref": "#/definitions/Role"
+ }
+ },
+ "example": {
+ "keys": [
+ "021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e"
+ ],
+ "role": "USER"
+ }
+ },
+ "TokenResponse": {
+ "type": "object",
+ "required": [
+ "type",
+ "token"
+ ],
+ "properties": {
+ "token": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/TokenType"
+ }
+ },
+ "example": [
+ {
+ "token": "sometoken-todo-add",
+ "type": "object"
+ },
+ {
+ "token": "ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==",
+ "type": "container"
+ }
+ ]
+ },
+ "TokenType": {
+ "type": "string",
+ "enum": [
+ "object",
+ "container"
+ ]
+ },
+ "Verb": {
+ "type": "string",
+ "enum": [
+ "PUT",
+ "DELETE",
+ "SETEACL"
+ ]
+ }
+ },
+ "securityDefinitions": {
+ "BearerAuth": {
+ "type": "apiKey",
+ "name": "Authorization",
+ "in": "header"
+ }
+ },
+ "security": [
+ {
+ "BearerAuth": []
+ }
+ ]
+}`))
+}
diff --git a/gen/restapi/operations/auth.go b/gen/restapi/operations/auth.go
new file mode 100644
index 0000000..8433af6
--- /dev/null
+++ b/gen/restapi/operations/auth.go
@@ -0,0 +1,56 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime/middleware"
+)
+
+// AuthHandlerFunc turns a function with the right signature into a auth handler
+type AuthHandlerFunc func(AuthParams) middleware.Responder
+
+// Handle executing the request and returning a response
+func (fn AuthHandlerFunc) Handle(params AuthParams) middleware.Responder {
+ return fn(params)
+}
+
+// AuthHandler interface for that can handle valid auth params
+type AuthHandler interface {
+ Handle(AuthParams) middleware.Responder
+}
+
+// NewAuth creates a new http.Handler for the auth operation
+func NewAuth(ctx *middleware.Context, handler AuthHandler) *Auth {
+ return &Auth{Context: ctx, Handler: handler}
+}
+
+/* Auth swagger:route POST /auth auth
+
+Form bearer token to futher requests
+
+*/
+type Auth struct {
+ Context *middleware.Context
+ Handler AuthHandler
+}
+
+func (o *Auth) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
+ route, rCtx, _ := o.Context.RouteInfo(r)
+ if rCtx != nil {
+ *r = *rCtx
+ }
+ var Params = NewAuthParams()
+ if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+
+ res := o.Handler.Handle(Params) // actually handle the request
+ o.Context.Respond(rw, r, route.Produces, route, res)
+
+}
diff --git a/gen/restapi/operations/auth_parameters.go b/gen/restapi/operations/auth_parameters.go
new file mode 100644
index 0000000..d5e8603
--- /dev/null
+++ b/gen/restapi/operations/auth_parameters.go
@@ -0,0 +1,198 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// NewAuthParams creates a new AuthParams object
+// with the default values initialized.
+func NewAuthParams() AuthParams {
+
+ var (
+ // initialize parameters with default values
+
+ xNeofsTokenLifetimeDefault = int64(100)
+ )
+
+ return AuthParams{
+ XNeofsTokenLifetime: &xNeofsTokenLifetimeDefault,
+ }
+}
+
+// AuthParams contains all the bound params for the auth operation
+// typically these are obtained from a http.Request
+//
+// swagger:parameters auth
+type AuthParams struct {
+
+ // HTTP Request Object
+ HTTPRequest *http.Request `json:"-"`
+
+ /*Token lifetime in epoch
+ In: header
+ Default: 100
+ */
+ XNeofsTokenLifetime *int64
+ /*Supported operation scope for token
+ Required: true
+ In: header
+ */
+ XNeofsTokenScope string
+ /*Public key of user
+ Required: true
+ In: header
+ */
+ XNeofsTokenSignatureKey string
+ /*Bearer token
+ Required: true
+ In: body
+ */
+ Token *models.Bearer
+}
+
+// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
+// for simple values it will use straight method calls.
+//
+// To ensure default values, the struct must have been initialized with NewAuthParams() beforehand.
+func (o *AuthParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
+ var res []error
+
+ o.HTTPRequest = r
+
+ if err := o.bindXNeofsTokenLifetime(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Lifetime")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.bindXNeofsTokenScope(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Scope")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.bindXNeofsTokenSignatureKey(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Signature-Key")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if runtime.HasBody(r) {
+ defer r.Body.Close()
+ var body models.Bearer
+ if err := route.Consumer.Consume(r.Body, &body); err != nil {
+ if err == io.EOF {
+ res = append(res, errors.Required("token", "body", ""))
+ } else {
+ res = append(res, errors.NewParseError("token", "body", "", err))
+ }
+ } else {
+ // validate body object
+ if err := body.Validate(route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ ctx := validate.WithOperationRequest(context.Background())
+ if err := body.ContextValidate(ctx, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) == 0 {
+ o.Token = &body
+ }
+ }
+ } else {
+ res = append(res, errors.Required("token", "body", ""))
+ }
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// bindXNeofsTokenLifetime binds and validates parameter XNeofsTokenLifetime from header.
+func (o *AuthParams) bindXNeofsTokenLifetime(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: false
+
+ if raw == "" { // empty values pass all other validations
+ // Default values have been previously initialized by NewAuthParams()
+ return nil
+ }
+
+ value, err := swag.ConvertInt64(raw)
+ if err != nil {
+ return errors.InvalidType("X-Neofs-Token-Lifetime", "header", "int64", raw)
+ }
+ o.XNeofsTokenLifetime = &value
+
+ return nil
+}
+
+// bindXNeofsTokenScope binds and validates parameter XNeofsTokenScope from header.
+func (o *AuthParams) bindXNeofsTokenScope(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-Scope", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-Scope", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenScope = raw
+
+ if err := o.validateXNeofsTokenScope(formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// validateXNeofsTokenScope carries on validations for parameter XNeofsTokenScope
+func (o *AuthParams) validateXNeofsTokenScope(formats strfmt.Registry) error {
+
+ if err := validate.EnumCase("X-Neofs-Token-Scope", "header", o.XNeofsTokenScope, []interface{}{"object", "container"}, true); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// bindXNeofsTokenSignatureKey binds and validates parameter XNeofsTokenSignatureKey from header.
+func (o *AuthParams) bindXNeofsTokenSignatureKey(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-Signature-Key", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-Signature-Key", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenSignatureKey = raw
+
+ return nil
+}
diff --git a/gen/restapi/operations/auth_responses.go b/gen/restapi/operations/auth_responses.go
new file mode 100644
index 0000000..2fd3a76
--- /dev/null
+++ b/gen/restapi/operations/auth_responses.go
@@ -0,0 +1,100 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// AuthOKCode is the HTTP code returned for type AuthOK
+const AuthOKCode int = 200
+
+/*AuthOK Base64 encoded stable binary marshaled bearer token
+
+swagger:response authOK
+*/
+type AuthOK struct {
+
+ /*
+ In: Body
+ */
+ Payload *models.TokenResponse `json:"body,omitempty"`
+}
+
+// NewAuthOK creates AuthOK with default headers values
+func NewAuthOK() *AuthOK {
+
+ return &AuthOK{}
+}
+
+// WithPayload adds the payload to the auth o k response
+func (o *AuthOK) WithPayload(payload *models.TokenResponse) *AuthOK {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the auth o k response
+func (o *AuthOK) SetPayload(payload *models.TokenResponse) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *AuthOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(200)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// AuthBadRequestCode is the HTTP code returned for type AuthBadRequest
+const AuthBadRequestCode int = 400
+
+/*AuthBadRequest Bad request
+
+swagger:response authBadRequest
+*/
+type AuthBadRequest struct {
+
+ /*
+ In: Body
+ */
+ Payload models.Error `json:"body,omitempty"`
+}
+
+// NewAuthBadRequest creates AuthBadRequest with default headers values
+func NewAuthBadRequest() *AuthBadRequest {
+
+ return &AuthBadRequest{}
+}
+
+// WithPayload adds the payload to the auth bad request response
+func (o *AuthBadRequest) WithPayload(payload models.Error) *AuthBadRequest {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the auth bad request response
+func (o *AuthBadRequest) SetPayload(payload models.Error) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *AuthBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(400)
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+}
diff --git a/gen/restapi/operations/get_container.go b/gen/restapi/operations/get_container.go
new file mode 100644
index 0000000..ad95d6d
--- /dev/null
+++ b/gen/restapi/operations/get_container.go
@@ -0,0 +1,56 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime/middleware"
+)
+
+// GetContainerHandlerFunc turns a function with the right signature into a get container handler
+type GetContainerHandlerFunc func(GetContainerParams) middleware.Responder
+
+// Handle executing the request and returning a response
+func (fn GetContainerHandlerFunc) Handle(params GetContainerParams) middleware.Responder {
+ return fn(params)
+}
+
+// GetContainerHandler interface for that can handle valid get container params
+type GetContainerHandler interface {
+ Handle(GetContainerParams) middleware.Responder
+}
+
+// NewGetContainer creates a new http.Handler for the get container operation
+func NewGetContainer(ctx *middleware.Context, handler GetContainerHandler) *GetContainer {
+ return &GetContainer{Context: ctx, Handler: handler}
+}
+
+/* GetContainer swagger:route GET /containers/{containerId} getContainer
+
+Get container by id
+
+*/
+type GetContainer struct {
+ Context *middleware.Context
+ Handler GetContainerHandler
+}
+
+func (o *GetContainer) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
+ route, rCtx, _ := o.Context.RouteInfo(r)
+ if rCtx != nil {
+ *r = *rCtx
+ }
+ var Params = NewGetContainerParams()
+ if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+
+ res := o.Handler.Handle(Params) // actually handle the request
+ o.Context.Respond(rw, r, route.Produces, route, res)
+
+}
diff --git a/gen/restapi/operations/get_container_parameters.go b/gen/restapi/operations/get_container_parameters.go
new file mode 100644
index 0000000..5082ea9
--- /dev/null
+++ b/gen/restapi/operations/get_container_parameters.go
@@ -0,0 +1,71 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+)
+
+// NewGetContainerParams creates a new GetContainerParams object
+//
+// There are no default values defined in the spec.
+func NewGetContainerParams() GetContainerParams {
+
+ return GetContainerParams{}
+}
+
+// GetContainerParams contains all the bound params for the get container operation
+// typically these are obtained from a http.Request
+//
+// swagger:parameters getContainer
+type GetContainerParams struct {
+
+ // HTTP Request Object
+ HTTPRequest *http.Request `json:"-"`
+
+ /*Base58 encoded container id
+ Required: true
+ In: path
+ */
+ ContainerID string
+}
+
+// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
+// for simple values it will use straight method calls.
+//
+// To ensure default values, the struct must have been initialized with NewGetContainerParams() beforehand.
+func (o *GetContainerParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
+ var res []error
+
+ o.HTTPRequest = r
+
+ rContainerID, rhkContainerID, _ := route.Params.GetOK("containerId")
+ if err := o.bindContainerID(rContainerID, rhkContainerID, route.Formats); err != nil {
+ res = append(res, err)
+ }
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// bindContainerID binds and validates parameter ContainerID from path.
+func (o *GetContainerParams) bindContainerID(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+ // Parameter is provided by construction from the route
+ o.ContainerID = raw
+
+ return nil
+}
diff --git a/gen/restapi/operations/get_container_responses.go b/gen/restapi/operations/get_container_responses.go
new file mode 100644
index 0000000..9287c94
--- /dev/null
+++ b/gen/restapi/operations/get_container_responses.go
@@ -0,0 +1,100 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// GetContainerOKCode is the HTTP code returned for type GetContainerOK
+const GetContainerOKCode int = 200
+
+/*GetContainerOK Container info
+
+swagger:response getContainerOK
+*/
+type GetContainerOK struct {
+
+ /*
+ In: Body
+ */
+ Payload *models.ContainerInfo `json:"body,omitempty"`
+}
+
+// NewGetContainerOK creates GetContainerOK with default headers values
+func NewGetContainerOK() *GetContainerOK {
+
+ return &GetContainerOK{}
+}
+
+// WithPayload adds the payload to the get container o k response
+func (o *GetContainerOK) WithPayload(payload *models.ContainerInfo) *GetContainerOK {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get container o k response
+func (o *GetContainerOK) SetPayload(payload *models.ContainerInfo) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(200)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// GetContainerBadRequestCode is the HTTP code returned for type GetContainerBadRequest
+const GetContainerBadRequestCode int = 400
+
+/*GetContainerBadRequest Bad request
+
+swagger:response getContainerBadRequest
+*/
+type GetContainerBadRequest struct {
+
+ /*
+ In: Body
+ */
+ Payload models.Error `json:"body,omitempty"`
+}
+
+// NewGetContainerBadRequest creates GetContainerBadRequest with default headers values
+func NewGetContainerBadRequest() *GetContainerBadRequest {
+
+ return &GetContainerBadRequest{}
+}
+
+// WithPayload adds the payload to the get container bad request response
+func (o *GetContainerBadRequest) WithPayload(payload models.Error) *GetContainerBadRequest {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the get container bad request response
+func (o *GetContainerBadRequest) SetPayload(payload models.Error) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *GetContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(400)
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+}
diff --git a/gen/restapi/operations/neofs_rest_gw_api.go b/gen/restapi/operations/neofs_rest_gw_api.go
new file mode 100644
index 0000000..8c49286
--- /dev/null
+++ b/gen/restapi/operations/neofs_rest_gw_api.go
@@ -0,0 +1,368 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "net/http"
+ "strings"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/loads"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/runtime/security"
+ "github.com/go-openapi/spec"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// NewNeofsRestGwAPI creates a new NeofsRestGw instance
+func NewNeofsRestGwAPI(spec *loads.Document) *NeofsRestGwAPI {
+ return &NeofsRestGwAPI{
+ handlers: make(map[string]map[string]http.Handler),
+ formats: strfmt.Default,
+ defaultConsumes: "application/json",
+ defaultProduces: "application/json",
+ customConsumers: make(map[string]runtime.Consumer),
+ customProducers: make(map[string]runtime.Producer),
+ PreServerShutdown: func() {},
+ ServerShutdown: func() {},
+ spec: spec,
+ useSwaggerUI: false,
+ ServeError: errors.ServeError,
+ BasicAuthenticator: security.BasicAuth,
+ APIKeyAuthenticator: security.APIKeyAuth,
+ BearerAuthenticator: security.BearerAuth,
+
+ JSONConsumer: runtime.JSONConsumer(),
+
+ JSONProducer: runtime.JSONProducer(),
+
+ AuthHandler: AuthHandlerFunc(func(params AuthParams) middleware.Responder {
+ return middleware.NotImplemented("operation Auth has not yet been implemented")
+ }),
+ GetContainerHandler: GetContainerHandlerFunc(func(params GetContainerParams) middleware.Responder {
+ return middleware.NotImplemented("operation GetContainer has not yet been implemented")
+ }),
+ PutContainerHandler: PutContainerHandlerFunc(func(params PutContainerParams, principal *models.Principal) middleware.Responder {
+ return middleware.NotImplemented("operation PutContainer has not yet been implemented")
+ }),
+ PutObjectHandler: PutObjectHandlerFunc(func(params PutObjectParams, principal *models.Principal) middleware.Responder {
+ return middleware.NotImplemented("operation PutObject has not yet been implemented")
+ }),
+
+ // Applies when the "Authorization" header is set
+ BearerAuthAuth: func(token string) (*models.Principal, error) {
+ return nil, errors.NotImplemented("api key auth (BearerAuth) Authorization from header param [Authorization] has not yet been implemented")
+ },
+ // default authorizer is authorized meaning no requests are blocked
+ APIAuthorizer: security.Authorized(),
+ }
+}
+
+/*NeofsRestGwAPI REST API NeoFS */
+type NeofsRestGwAPI struct {
+ spec *loads.Document
+ context *middleware.Context
+ handlers map[string]map[string]http.Handler
+ formats strfmt.Registry
+ customConsumers map[string]runtime.Consumer
+ customProducers map[string]runtime.Producer
+ defaultConsumes string
+ defaultProduces string
+ Middleware func(middleware.Builder) http.Handler
+ useSwaggerUI bool
+
+ // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
+ // It has a default implementation in the security package, however you can replace it for your particular usage.
+ BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
+
+ // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
+ // It has a default implementation in the security package, however you can replace it for your particular usage.
+ APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
+
+ // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
+ // It has a default implementation in the security package, however you can replace it for your particular usage.
+ BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
+
+ // JSONConsumer registers a consumer for the following mime types:
+ // - application/json
+ JSONConsumer runtime.Consumer
+
+ // JSONProducer registers a producer for the following mime types:
+ // - application/json
+ JSONProducer runtime.Producer
+
+ // BearerAuthAuth registers a function that takes a token and returns a principal
+ // it performs authentication based on an api key Authorization provided in the header
+ BearerAuthAuth func(string) (*models.Principal, error)
+
+ // APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
+ APIAuthorizer runtime.Authorizer
+
+ // AuthHandler sets the operation handler for the auth operation
+ AuthHandler AuthHandler
+ // GetContainerHandler sets the operation handler for the get container operation
+ GetContainerHandler GetContainerHandler
+ // PutContainerHandler sets the operation handler for the put container operation
+ PutContainerHandler PutContainerHandler
+ // PutObjectHandler sets the operation handler for the put object operation
+ PutObjectHandler PutObjectHandler
+
+ // ServeError is called when an error is received, there is a default handler
+ // but you can set your own with this
+ ServeError func(http.ResponseWriter, *http.Request, error)
+
+ // PreServerShutdown is called before the HTTP(S) server is shutdown
+ // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
+ PreServerShutdown func()
+
+ // ServerShutdown is called when the HTTP(S) server is shut down and done
+ // handling all active connections and does not accept connections any more
+ ServerShutdown func()
+
+ // Custom command line argument groups with their descriptions
+ CommandLineOptionsGroups []swag.CommandLineOptionsGroup
+
+ // User defined logger function.
+ Logger func(string, ...interface{})
+}
+
+// UseRedoc for documentation at /docs
+func (o *NeofsRestGwAPI) UseRedoc() {
+ o.useSwaggerUI = false
+}
+
+// UseSwaggerUI for documentation at /docs
+func (o *NeofsRestGwAPI) UseSwaggerUI() {
+ o.useSwaggerUI = true
+}
+
+// SetDefaultProduces sets the default produces media type
+func (o *NeofsRestGwAPI) SetDefaultProduces(mediaType string) {
+ o.defaultProduces = mediaType
+}
+
+// SetDefaultConsumes returns the default consumes media type
+func (o *NeofsRestGwAPI) SetDefaultConsumes(mediaType string) {
+ o.defaultConsumes = mediaType
+}
+
+// SetSpec sets a spec that will be served for the clients.
+func (o *NeofsRestGwAPI) SetSpec(spec *loads.Document) {
+ o.spec = spec
+}
+
+// DefaultProduces returns the default produces media type
+func (o *NeofsRestGwAPI) DefaultProduces() string {
+ return o.defaultProduces
+}
+
+// DefaultConsumes returns the default consumes media type
+func (o *NeofsRestGwAPI) DefaultConsumes() string {
+ return o.defaultConsumes
+}
+
+// Formats returns the registered string formats
+func (o *NeofsRestGwAPI) Formats() strfmt.Registry {
+ return o.formats
+}
+
+// RegisterFormat registers a custom format validator
+func (o *NeofsRestGwAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) {
+ o.formats.Add(name, format, validator)
+}
+
+// Validate validates the registrations in the NeofsRestGwAPI
+func (o *NeofsRestGwAPI) Validate() error {
+ var unregistered []string
+
+ if o.JSONConsumer == nil {
+ unregistered = append(unregistered, "JSONConsumer")
+ }
+
+ if o.JSONProducer == nil {
+ unregistered = append(unregistered, "JSONProducer")
+ }
+
+ if o.BearerAuthAuth == nil {
+ unregistered = append(unregistered, "AuthorizationAuth")
+ }
+
+ if o.AuthHandler == nil {
+ unregistered = append(unregistered, "AuthHandler")
+ }
+ if o.GetContainerHandler == nil {
+ unregistered = append(unregistered, "GetContainerHandler")
+ }
+ if o.PutContainerHandler == nil {
+ unregistered = append(unregistered, "PutContainerHandler")
+ }
+ if o.PutObjectHandler == nil {
+ unregistered = append(unregistered, "PutObjectHandler")
+ }
+
+ if len(unregistered) > 0 {
+ return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
+ }
+
+ return nil
+}
+
+// ServeErrorFor gets a error handler for a given operation id
+func (o *NeofsRestGwAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) {
+ return o.ServeError
+}
+
+// AuthenticatorsFor gets the authenticators for the specified security schemes
+func (o *NeofsRestGwAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator {
+ result := make(map[string]runtime.Authenticator)
+ for name := range schemes {
+ switch name {
+ case "BearerAuth":
+ scheme := schemes[name]
+ result[name] = o.APIKeyAuthenticator(scheme.Name, scheme.In, func(token string) (interface{}, error) {
+ return o.BearerAuthAuth(token)
+ })
+
+ }
+ }
+ return result
+}
+
+// Authorizer returns the registered authorizer
+func (o *NeofsRestGwAPI) Authorizer() runtime.Authorizer {
+ return o.APIAuthorizer
+}
+
+// ConsumersFor gets the consumers for the specified media types.
+// MIME type parameters are ignored here.
+func (o *NeofsRestGwAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer {
+ result := make(map[string]runtime.Consumer, len(mediaTypes))
+ for _, mt := range mediaTypes {
+ switch mt {
+ case "application/json":
+ result["application/json"] = o.JSONConsumer
+ }
+
+ if c, ok := o.customConsumers[mt]; ok {
+ result[mt] = c
+ }
+ }
+ return result
+}
+
+// ProducersFor gets the producers for the specified media types.
+// MIME type parameters are ignored here.
+func (o *NeofsRestGwAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer {
+ result := make(map[string]runtime.Producer, len(mediaTypes))
+ for _, mt := range mediaTypes {
+ switch mt {
+ case "application/json":
+ result["application/json"] = o.JSONProducer
+ }
+
+ if p, ok := o.customProducers[mt]; ok {
+ result[mt] = p
+ }
+ }
+ return result
+}
+
+// HandlerFor gets a http.Handler for the provided operation method and path
+func (o *NeofsRestGwAPI) HandlerFor(method, path string) (http.Handler, bool) {
+ if o.handlers == nil {
+ return nil, false
+ }
+ um := strings.ToUpper(method)
+ if _, ok := o.handlers[um]; !ok {
+ return nil, false
+ }
+ if path == "/" {
+ path = ""
+ }
+ h, ok := o.handlers[um][path]
+ return h, ok
+}
+
+// Context returns the middleware context for the neofs rest gw API
+func (o *NeofsRestGwAPI) Context() *middleware.Context {
+ if o.context == nil {
+ o.context = middleware.NewRoutableContext(o.spec, o, nil)
+ }
+
+ return o.context
+}
+
+func (o *NeofsRestGwAPI) initHandlerCache() {
+ o.Context() // don't care about the result, just that the initialization happened
+ if o.handlers == nil {
+ o.handlers = make(map[string]map[string]http.Handler)
+ }
+
+ if o.handlers["POST"] == nil {
+ o.handlers["POST"] = make(map[string]http.Handler)
+ }
+ o.handlers["POST"]["/auth"] = NewAuth(o.context, o.AuthHandler)
+ if o.handlers["GET"] == nil {
+ o.handlers["GET"] = make(map[string]http.Handler)
+ }
+ o.handlers["GET"]["/containers/{containerId}"] = NewGetContainer(o.context, o.GetContainerHandler)
+ if o.handlers["PUT"] == nil {
+ o.handlers["PUT"] = make(map[string]http.Handler)
+ }
+ o.handlers["PUT"]["/containers"] = NewPutContainer(o.context, o.PutContainerHandler)
+ if o.handlers["PUT"] == nil {
+ o.handlers["PUT"] = make(map[string]http.Handler)
+ }
+ o.handlers["PUT"]["/objects"] = NewPutObject(o.context, o.PutObjectHandler)
+}
+
+// Serve creates a http handler to serve the API over HTTP
+// can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
+func (o *NeofsRestGwAPI) Serve(builder middleware.Builder) http.Handler {
+ o.Init()
+
+ if o.Middleware != nil {
+ return o.Middleware(builder)
+ }
+ if o.useSwaggerUI {
+ return o.context.APIHandlerSwaggerUI(builder)
+ }
+ return o.context.APIHandler(builder)
+}
+
+// Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
+func (o *NeofsRestGwAPI) Init() {
+ if len(o.handlers) == 0 {
+ o.initHandlerCache()
+ }
+}
+
+// RegisterConsumer allows you to add (or override) a consumer for a media type.
+func (o *NeofsRestGwAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer) {
+ o.customConsumers[mediaType] = consumer
+}
+
+// RegisterProducer allows you to add (or override) a producer for a media type.
+func (o *NeofsRestGwAPI) RegisterProducer(mediaType string, producer runtime.Producer) {
+ o.customProducers[mediaType] = producer
+}
+
+// AddMiddlewareFor adds a http middleware to existing handler
+func (o *NeofsRestGwAPI) AddMiddlewareFor(method, path string, builder middleware.Builder) {
+ um := strings.ToUpper(method)
+ if path == "/" {
+ path = ""
+ }
+ o.Init()
+ if h, ok := o.handlers[um][path]; ok {
+ o.handlers[method][path] = builder(h)
+ }
+}
diff --git a/gen/restapi/operations/put_container.go b/gen/restapi/operations/put_container.go
new file mode 100644
index 0000000..f4a87c0
--- /dev/null
+++ b/gen/restapi/operations/put_container.go
@@ -0,0 +1,196 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "context"
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// PutContainerHandlerFunc turns a function with the right signature into a put container handler
+type PutContainerHandlerFunc func(PutContainerParams, *models.Principal) middleware.Responder
+
+// Handle executing the request and returning a response
+func (fn PutContainerHandlerFunc) Handle(params PutContainerParams, principal *models.Principal) middleware.Responder {
+ return fn(params, principal)
+}
+
+// PutContainerHandler interface for that can handle valid put container params
+type PutContainerHandler interface {
+ Handle(PutContainerParams, *models.Principal) middleware.Responder
+}
+
+// NewPutContainer creates a new http.Handler for the put container operation
+func NewPutContainer(ctx *middleware.Context, handler PutContainerHandler) *PutContainer {
+ return &PutContainer{Context: ctx, Handler: handler}
+}
+
+/* PutContainer swagger:route PUT /containers putContainer
+
+Create new container in NeoFS
+
+*/
+type PutContainer struct {
+ Context *middleware.Context
+ Handler PutContainerHandler
+}
+
+func (o *PutContainer) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
+ route, rCtx, _ := o.Context.RouteInfo(r)
+ if rCtx != nil {
+ *r = *rCtx
+ }
+ var Params = NewPutContainerParams()
+ uprinc, aCtx, err := o.Context.Authorize(r, route)
+ if err != nil {
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+ if aCtx != nil {
+ *r = *aCtx
+ }
+ var principal *models.Principal
+ if uprinc != nil {
+ principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
+ }
+
+ if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+
+ res := o.Handler.Handle(Params, principal) // actually handle the request
+ o.Context.Respond(rw, r, route.Produces, route, res)
+
+}
+
+// PutContainerBody put container body
+// Example: {"basicAcl":"public-read-write","containerId":"container","placementPolicy":"REP 3"}
+//
+// swagger:model PutContainerBody
+type PutContainerBody struct {
+
+ // basic Acl
+ BasicACL string `json:"basicAcl,omitempty"`
+
+ // container name
+ // Required: true
+ ContainerName *string `json:"containerName"`
+
+ // placement policy
+ PlacementPolicy string `json:"placementPolicy,omitempty"`
+}
+
+// Validate validates this put container body
+func (o *PutContainerBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainerName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *PutContainerBody) validateContainerName(formats strfmt.Registry) error {
+
+ if err := validate.Required("container"+"."+"containerName", "body", o.ContainerName); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validates this put container body based on context it is used
+func (o *PutContainerBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *PutContainerBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *PutContainerBody) UnmarshalBinary(b []byte) error {
+ var res PutContainerBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+// PutContainerOKBody put container o k body
+// Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv"}
+//
+// swagger:model PutContainerOKBody
+type PutContainerOKBody struct {
+
+ // container Id
+ // Required: true
+ ContainerID *string `json:"containerId"`
+}
+
+// Validate validates this put container o k body
+func (o *PutContainerOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainerID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *PutContainerOKBody) validateContainerID(formats strfmt.Registry) error {
+
+ if err := validate.Required("putContainerOK"+"."+"containerId", "body", o.ContainerID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validates this put container o k body based on context it is used
+func (o *PutContainerOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *PutContainerOKBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *PutContainerOKBody) UnmarshalBinary(b []byte) error {
+ var res PutContainerOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
diff --git a/gen/restapi/operations/put_container_parameters.go b/gen/restapi/operations/put_container_parameters.go
new file mode 100644
index 0000000..7b807a8
--- /dev/null
+++ b/gen/restapi/operations/put_container_parameters.go
@@ -0,0 +1,142 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// NewPutContainerParams creates a new PutContainerParams object
+//
+// There are no default values defined in the spec.
+func NewPutContainerParams() PutContainerParams {
+
+ return PutContainerParams{}
+}
+
+// PutContainerParams contains all the bound params for the put container operation
+// typically these are obtained from a http.Request
+//
+// swagger:parameters putContainer
+type PutContainerParams struct {
+
+ // HTTP Request Object
+ HTTPRequest *http.Request `json:"-"`
+
+ /*Base64 encoded signature for bearer token
+ Required: true
+ In: header
+ */
+ XNeofsTokenSignature string
+ /*Hex encoded the public part of the key that signed the bearer token
+ Required: true
+ In: header
+ */
+ XNeofsTokenSignatureKey string
+ /*Container info
+ Required: true
+ In: body
+ */
+ Container PutContainerBody
+}
+
+// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
+// for simple values it will use straight method calls.
+//
+// To ensure default values, the struct must have been initialized with NewPutContainerParams() beforehand.
+func (o *PutContainerParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
+ var res []error
+
+ o.HTTPRequest = r
+
+ if err := o.bindXNeofsTokenSignature(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Signature")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.bindXNeofsTokenSignatureKey(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-signature-Key")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if runtime.HasBody(r) {
+ defer r.Body.Close()
+ var body PutContainerBody
+ if err := route.Consumer.Consume(r.Body, &body); err != nil {
+ if err == io.EOF {
+ res = append(res, errors.Required("container", "body", ""))
+ } else {
+ res = append(res, errors.NewParseError("container", "body", "", err))
+ }
+ } else {
+ // validate body object
+ if err := body.Validate(route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ ctx := validate.WithOperationRequest(context.Background())
+ if err := body.ContextValidate(ctx, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) == 0 {
+ o.Container = body
+ }
+ }
+ } else {
+ res = append(res, errors.Required("container", "body", ""))
+ }
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// bindXNeofsTokenSignature binds and validates parameter XNeofsTokenSignature from header.
+func (o *PutContainerParams) bindXNeofsTokenSignature(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-Signature", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-Signature", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenSignature = raw
+
+ return nil
+}
+
+// bindXNeofsTokenSignatureKey binds and validates parameter XNeofsTokenSignatureKey from header.
+func (o *PutContainerParams) bindXNeofsTokenSignatureKey(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-signature-Key", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-signature-Key", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenSignatureKey = raw
+
+ return nil
+}
diff --git a/gen/restapi/operations/put_container_responses.go b/gen/restapi/operations/put_container_responses.go
new file mode 100644
index 0000000..5830ad0
--- /dev/null
+++ b/gen/restapi/operations/put_container_responses.go
@@ -0,0 +1,100 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// PutContainerOKCode is the HTTP code returned for type PutContainerOK
+const PutContainerOKCode int = 200
+
+/*PutContainerOK Address of uploaded objects
+
+swagger:response putContainerOK
+*/
+type PutContainerOK struct {
+
+ /*
+ In: Body
+ */
+ Payload *PutContainerOKBody `json:"body,omitempty"`
+}
+
+// NewPutContainerOK creates PutContainerOK with default headers values
+func NewPutContainerOK() *PutContainerOK {
+
+ return &PutContainerOK{}
+}
+
+// WithPayload adds the payload to the put container o k response
+func (o *PutContainerOK) WithPayload(payload *PutContainerOKBody) *PutContainerOK {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the put container o k response
+func (o *PutContainerOK) SetPayload(payload *PutContainerOKBody) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *PutContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(200)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// PutContainerBadRequestCode is the HTTP code returned for type PutContainerBadRequest
+const PutContainerBadRequestCode int = 400
+
+/*PutContainerBadRequest Bad request
+
+swagger:response putContainerBadRequest
+*/
+type PutContainerBadRequest struct {
+
+ /*
+ In: Body
+ */
+ Payload models.Error `json:"body,omitempty"`
+}
+
+// NewPutContainerBadRequest creates PutContainerBadRequest with default headers values
+func NewPutContainerBadRequest() *PutContainerBadRequest {
+
+ return &PutContainerBadRequest{}
+}
+
+// WithPayload adds the payload to the put container bad request response
+func (o *PutContainerBadRequest) WithPayload(payload models.Error) *PutContainerBadRequest {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the put container bad request response
+func (o *PutContainerBadRequest) SetPayload(payload models.Error) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *PutContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(400)
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+}
diff --git a/gen/restapi/operations/put_object.go b/gen/restapi/operations/put_object.go
new file mode 100644
index 0000000..b8e2845
--- /dev/null
+++ b/gen/restapi/operations/put_object.go
@@ -0,0 +1,227 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the generate command
+
+import (
+ "context"
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// PutObjectHandlerFunc turns a function with the right signature into a put object handler
+type PutObjectHandlerFunc func(PutObjectParams, *models.Principal) middleware.Responder
+
+// Handle executing the request and returning a response
+func (fn PutObjectHandlerFunc) Handle(params PutObjectParams, principal *models.Principal) middleware.Responder {
+ return fn(params, principal)
+}
+
+// PutObjectHandler interface for that can handle valid put object params
+type PutObjectHandler interface {
+ Handle(PutObjectParams, *models.Principal) middleware.Responder
+}
+
+// NewPutObject creates a new http.Handler for the put object operation
+func NewPutObject(ctx *middleware.Context, handler PutObjectHandler) *PutObject {
+ return &PutObject{Context: ctx, Handler: handler}
+}
+
+/* PutObject swagger:route PUT /objects putObject
+
+Upload object to NeoFS
+
+*/
+type PutObject struct {
+ Context *middleware.Context
+ Handler PutObjectHandler
+}
+
+func (o *PutObject) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
+ route, rCtx, _ := o.Context.RouteInfo(r)
+ if rCtx != nil {
+ *r = *rCtx
+ }
+ var Params = NewPutObjectParams()
+ uprinc, aCtx, err := o.Context.Authorize(r, route)
+ if err != nil {
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+ if aCtx != nil {
+ *r = *aCtx
+ }
+ var principal *models.Principal
+ if uprinc != nil {
+ principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
+ }
+
+ if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
+ o.Context.Respond(rw, r, route.Produces, route, err)
+ return
+ }
+
+ res := o.Handler.Handle(Params, principal) // actually handle the request
+ o.Context.Respond(rw, r, route.Produces, route, res)
+
+}
+
+// PutObjectBody put object body
+// Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","fileName":"myFile.txt","payload":"Y29udGVudCBvZiBmaWxl"}
+//
+// swagger:model PutObjectBody
+type PutObjectBody struct {
+
+ // container Id
+ // Required: true
+ ContainerID *string `json:"containerId"`
+
+ // file name
+ // Required: true
+ FileName *string `json:"fileName"`
+
+ // payload
+ Payload string `json:"payload,omitempty"`
+}
+
+// Validate validates this put object body
+func (o *PutObjectBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainerID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateFileName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *PutObjectBody) validateContainerID(formats strfmt.Registry) error {
+
+ if err := validate.Required("object"+"."+"containerId", "body", o.ContainerID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (o *PutObjectBody) validateFileName(formats strfmt.Registry) error {
+
+ if err := validate.Required("object"+"."+"fileName", "body", o.FileName); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validates this put object body based on context it is used
+func (o *PutObjectBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *PutObjectBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *PutObjectBody) UnmarshalBinary(b []byte) error {
+ var res PutObjectBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+// PutObjectOKBody put object o k body
+// Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"}
+//
+// swagger:model PutObjectOKBody
+type PutObjectOKBody struct {
+
+ // container Id
+ // Required: true
+ ContainerID *string `json:"containerId"`
+
+ // object Id
+ // Required: true
+ ObjectID *string `json:"objectId"`
+}
+
+// Validate validates this put object o k body
+func (o *PutObjectOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainerID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateObjectID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *PutObjectOKBody) validateContainerID(formats strfmt.Registry) error {
+
+ if err := validate.Required("putObjectOK"+"."+"containerId", "body", o.ContainerID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (o *PutObjectOKBody) validateObjectID(formats strfmt.Registry) error {
+
+ if err := validate.Required("putObjectOK"+"."+"objectId", "body", o.ObjectID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ContextValidate validates this put object o k body based on context it is used
+func (o *PutObjectOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *PutObjectOKBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *PutObjectOKBody) UnmarshalBinary(b []byte) error {
+ var res PutObjectOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
diff --git a/gen/restapi/operations/put_object_parameters.go b/gen/restapi/operations/put_object_parameters.go
new file mode 100644
index 0000000..ef2d910
--- /dev/null
+++ b/gen/restapi/operations/put_object_parameters.go
@@ -0,0 +1,142 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/validate"
+)
+
+// NewPutObjectParams creates a new PutObjectParams object
+//
+// There are no default values defined in the spec.
+func NewPutObjectParams() PutObjectParams {
+
+ return PutObjectParams{}
+}
+
+// PutObjectParams contains all the bound params for the put object operation
+// typically these are obtained from a http.Request
+//
+// swagger:parameters putObject
+type PutObjectParams struct {
+
+ // HTTP Request Object
+ HTTPRequest *http.Request `json:"-"`
+
+ /*Base64 encoded signature for bearer token
+ Required: true
+ In: header
+ */
+ XNeofsTokenSignature string
+ /*Hex encoded the public part of the key that signed the bearer token
+ Required: true
+ In: header
+ */
+ XNeofsTokenSignatureKey string
+ /*Object info to upload
+ Required: true
+ In: body
+ */
+ Object PutObjectBody
+}
+
+// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
+// for simple values it will use straight method calls.
+//
+// To ensure default values, the struct must have been initialized with NewPutObjectParams() beforehand.
+func (o *PutObjectParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
+ var res []error
+
+ o.HTTPRequest = r
+
+ if err := o.bindXNeofsTokenSignature(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Signature")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.bindXNeofsTokenSignatureKey(r.Header[http.CanonicalHeaderKey("X-Neofs-Token-Signature-Key")], true, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if runtime.HasBody(r) {
+ defer r.Body.Close()
+ var body PutObjectBody
+ if err := route.Consumer.Consume(r.Body, &body); err != nil {
+ if err == io.EOF {
+ res = append(res, errors.Required("object", "body", ""))
+ } else {
+ res = append(res, errors.NewParseError("object", "body", "", err))
+ }
+ } else {
+ // validate body object
+ if err := body.Validate(route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ ctx := validate.WithOperationRequest(context.Background())
+ if err := body.ContextValidate(ctx, route.Formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) == 0 {
+ o.Object = body
+ }
+ }
+ } else {
+ res = append(res, errors.Required("object", "body", ""))
+ }
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+// bindXNeofsTokenSignature binds and validates parameter XNeofsTokenSignature from header.
+func (o *PutObjectParams) bindXNeofsTokenSignature(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-Signature", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-Signature", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenSignature = raw
+
+ return nil
+}
+
+// bindXNeofsTokenSignatureKey binds and validates parameter XNeofsTokenSignatureKey from header.
+func (o *PutObjectParams) bindXNeofsTokenSignatureKey(rawData []string, hasKey bool, formats strfmt.Registry) error {
+ if !hasKey {
+ return errors.Required("X-Neofs-Token-Signature-Key", "header", rawData)
+ }
+ var raw string
+ if len(rawData) > 0 {
+ raw = rawData[len(rawData)-1]
+ }
+
+ // Required: true
+
+ if err := validate.RequiredString("X-Neofs-Token-Signature-Key", "header", raw); err != nil {
+ return err
+ }
+ o.XNeofsTokenSignatureKey = raw
+
+ return nil
+}
diff --git a/gen/restapi/operations/put_object_responses.go b/gen/restapi/operations/put_object_responses.go
new file mode 100644
index 0000000..78ad30a
--- /dev/null
+++ b/gen/restapi/operations/put_object_responses.go
@@ -0,0 +1,100 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package operations
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+
+ "github.com/go-openapi/runtime"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+)
+
+// PutObjectOKCode is the HTTP code returned for type PutObjectOK
+const PutObjectOKCode int = 200
+
+/*PutObjectOK Address of uploaded objects
+
+swagger:response putObjectOK
+*/
+type PutObjectOK struct {
+
+ /*
+ In: Body
+ */
+ Payload *PutObjectOKBody `json:"body,omitempty"`
+}
+
+// NewPutObjectOK creates PutObjectOK with default headers values
+func NewPutObjectOK() *PutObjectOK {
+
+ return &PutObjectOK{}
+}
+
+// WithPayload adds the payload to the put object o k response
+func (o *PutObjectOK) WithPayload(payload *PutObjectOKBody) *PutObjectOK {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the put object o k response
+func (o *PutObjectOK) SetPayload(payload *PutObjectOKBody) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *PutObjectOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(200)
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+ }
+}
+
+// PutObjectBadRequestCode is the HTTP code returned for type PutObjectBadRequest
+const PutObjectBadRequestCode int = 400
+
+/*PutObjectBadRequest Bad request
+
+swagger:response putObjectBadRequest
+*/
+type PutObjectBadRequest struct {
+
+ /*
+ In: Body
+ */
+ Payload models.Error `json:"body,omitempty"`
+}
+
+// NewPutObjectBadRequest creates PutObjectBadRequest with default headers values
+func NewPutObjectBadRequest() *PutObjectBadRequest {
+
+ return &PutObjectBadRequest{}
+}
+
+// WithPayload adds the payload to the put object bad request response
+func (o *PutObjectBadRequest) WithPayload(payload models.Error) *PutObjectBadRequest {
+ o.Payload = payload
+ return o
+}
+
+// SetPayload sets the payload to the put object bad request response
+func (o *PutObjectBadRequest) SetPayload(payload models.Error) {
+ o.Payload = payload
+}
+
+// WriteResponse to the client
+func (o *PutObjectBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
+
+ rw.WriteHeader(400)
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
+}
diff --git a/gen/restapi/server.go b/gen/restapi/server.go
new file mode 100644
index 0000000..50bb812
--- /dev/null
+++ b/gen/restapi/server.go
@@ -0,0 +1,495 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package restapi
+
+import (
+ "context"
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "net"
+ "net/http"
+ "os"
+ "os/signal"
+ "sync"
+ "sync/atomic"
+ "syscall"
+ "time"
+
+ "github.com/go-openapi/swag"
+ "golang.org/x/net/netutil"
+
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+)
+
+const (
+ schemeHTTP = "http"
+ schemeHTTPS = "https"
+)
+
+var defaultSchemes []string
+
+func init() {
+ defaultSchemes = []string{
+ schemeHTTP,
+ }
+}
+
+type ServerConfig struct {
+ EnabledListeners []string
+ CleanupTimeout time.Duration
+ GracefulTimeout time.Duration
+ MaxHeaderSize int
+
+ ListenAddress string
+ ListenLimit int
+ KeepAlive time.Duration
+ ReadTimeout time.Duration
+ WriteTimeout time.Duration
+
+ TLSListenAddress string
+ TLSListenLimit int
+ TLSKeepAlive time.Duration
+ TLSReadTimeout time.Duration
+ TLSWriteTimeout time.Duration
+ TLSCertificate string
+ TLSCertificateKey string
+ TLSCACertificate string
+}
+
+// NewServer creates a new api neofs rest gw server but does not configure it
+func NewServer(api *operations.NeofsRestGwAPI, cfg *ServerConfig) *Server {
+ s := new(Server)
+ s.EnabledListeners = cfg.EnabledListeners
+ s.CleanupTimeout = cfg.CleanupTimeout
+ s.GracefulTimeout = cfg.GracefulTimeout
+ s.MaxHeaderSize = cfg.MaxHeaderSize
+ s.ListenAddress = cfg.ListenAddress
+ s.ListenLimit = cfg.ListenLimit
+ s.KeepAlive = cfg.KeepAlive
+ s.ReadTimeout = cfg.ReadTimeout
+ s.WriteTimeout = cfg.WriteTimeout
+ s.TLSListenAddress = cfg.TLSListenAddress
+ if len(s.TLSListenAddress) == 0 {
+ s.TLSListenAddress = s.ListenAddress
+ }
+ s.TLSCertificate = cfg.TLSCertificate
+ s.TLSCertificateKey = cfg.TLSCertificateKey
+ s.TLSCACertificate = cfg.TLSCACertificate
+ s.TLSListenLimit = cfg.TLSListenLimit
+ s.TLSKeepAlive = cfg.TLSKeepAlive
+ s.TLSReadTimeout = cfg.TLSReadTimeout
+ s.TLSWriteTimeout = cfg.TLSWriteTimeout
+ s.shutdown = make(chan struct{})
+ s.api = api
+ s.interrupt = make(chan os.Signal, 1)
+ return s
+}
+
+// ConfigureAPI configures the API and handlers.
+func (s *Server) ConfigureAPI(fn func(*operations.NeofsRestGwAPI) http.Handler) {
+ if s.api != nil {
+ s.handler = fn(s.api)
+ }
+}
+
+// Server for the neofs rest gw API
+type Server struct {
+ EnabledListeners []string
+ CleanupTimeout time.Duration
+ GracefulTimeout time.Duration
+ MaxHeaderSize int
+
+ ListenAddress string
+ ListenLimit int
+ KeepAlive time.Duration
+ ReadTimeout time.Duration
+ WriteTimeout time.Duration
+ httpServerL net.Listener
+
+ TLSListenAddress string
+ TLSCertificate string
+ TLSCertificateKey string
+ TLSCACertificate string
+ TLSListenLimit int
+ TLSKeepAlive time.Duration
+ TLSReadTimeout time.Duration
+ TLSWriteTimeout time.Duration
+ httpsServerL net.Listener
+
+ cfgTLSFn func(tlsConfig *tls.Config)
+ cfgServerFn func(s *http.Server, scheme, addr string)
+
+ api *operations.NeofsRestGwAPI
+ handler http.Handler
+ hasListeners bool
+ shutdown chan struct{}
+ shuttingDown int32
+ interrupted bool
+ interrupt chan os.Signal
+}
+
+// Logf logs message either via defined user logger or via system one if no user logger is defined.
+func (s *Server) Logf(f string, args ...interface{}) {
+ if s.api != nil && s.api.Logger != nil {
+ s.api.Logger(f, args...)
+ } else {
+ log.Printf(f, args...)
+ }
+}
+
+// Fatalf logs message either via defined user logger or via system one if no user logger is defined.
+// Exits with non-zero status after printing
+func (s *Server) Fatalf(f string, args ...interface{}) {
+ if s.api != nil && s.api.Logger != nil {
+ s.api.Logger(f, args...)
+ os.Exit(1)
+ } else {
+ log.Fatalf(f, args...)
+ }
+}
+
+func (s *Server) hasScheme(scheme string) bool {
+ schemes := s.EnabledListeners
+ if len(schemes) == 0 {
+ schemes = defaultSchemes
+ }
+
+ for _, v := range schemes {
+ if v == scheme {
+ return true
+ }
+ }
+ return false
+}
+
+// Serve the api
+func (s *Server) Serve() (err error) {
+ if !s.hasListeners {
+ if err = s.Listen(); err != nil {
+ return err
+ }
+ }
+
+ // set default handler, if none is set
+ if s.handler == nil {
+ if s.api == nil {
+ return errors.New("can't create the default handler, as no api is set")
+ }
+
+ s.SetHandler(s.api.Serve(nil))
+ }
+
+ wg := new(sync.WaitGroup)
+ once := new(sync.Once)
+ signalNotify(s.interrupt)
+ go handleInterrupt(once, s)
+
+ servers := []*http.Server{}
+
+ if s.hasScheme(schemeHTTP) {
+ httpServer := new(http.Server)
+ httpServer.MaxHeaderBytes = s.MaxHeaderSize
+ httpServer.ReadTimeout = s.ReadTimeout
+ httpServer.WriteTimeout = s.WriteTimeout
+ httpServer.SetKeepAlivesEnabled(int64(s.KeepAlive) > 0)
+ if s.ListenLimit > 0 {
+ s.httpServerL = netutil.LimitListener(s.httpServerL, s.ListenLimit)
+ }
+
+ if int64(s.CleanupTimeout) > 0 {
+ httpServer.IdleTimeout = s.CleanupTimeout
+ }
+
+ httpServer.Handler = s.handler
+
+ if s.cfgServerFn != nil {
+ s.cfgServerFn(httpServer, "http", s.httpServerL.Addr().String())
+ }
+
+ servers = append(servers, httpServer)
+ wg.Add(1)
+ s.Logf("Serving neofs rest gw at http://%s", s.httpServerL.Addr())
+ go func(l net.Listener) {
+ defer wg.Done()
+ if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed {
+ s.Fatalf("%v", err)
+ }
+ s.Logf("Stopped serving neofs rest gw at http://%s", l.Addr())
+ }(s.httpServerL)
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ httpsServer := new(http.Server)
+ httpsServer.MaxHeaderBytes = s.MaxHeaderSize
+ httpsServer.ReadTimeout = s.TLSReadTimeout
+ httpsServer.WriteTimeout = s.TLSWriteTimeout
+ httpsServer.SetKeepAlivesEnabled(int64(s.TLSKeepAlive) > 0)
+ if s.TLSListenLimit > 0 {
+ s.httpsServerL = netutil.LimitListener(s.httpsServerL, s.TLSListenLimit)
+ }
+ if int64(s.CleanupTimeout) > 0 {
+ httpsServer.IdleTimeout = s.CleanupTimeout
+ }
+ httpsServer.Handler = s.handler
+
+ // Inspired by https://blog.bracebin.com/achieving-perfect-ssl-labs-score-with-go
+ httpsServer.TLSConfig = &tls.Config{
+ // Causes servers to use Go's default ciphersuite preferences,
+ // which are tuned to avoid attacks. Does nothing on clients.
+ PreferServerCipherSuites: true,
+ // Only use curves which have assembly implementations
+ // https://github.com/golang/go/tree/master/src/crypto/elliptic
+ CurvePreferences: []tls.CurveID{tls.CurveP256},
+ // Use modern tls mode https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
+ NextProtos: []string{"h2", "http/1.1"},
+ // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols
+ MinVersion: tls.VersionTLS12,
+ // These ciphersuites support Forward Secrecy: https://en.wikipedia.org/wiki/Forward_secrecy
+ CipherSuites: []uint16{
+ tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+ tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+ tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
+ tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
+ },
+ }
+
+ // build standard config from server options
+ if s.TLSCertificate != "" && s.TLSCertificateKey != "" {
+ httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1)
+ httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(s.TLSCertificate, s.TLSCertificateKey)
+ if err != nil {
+ return err
+ }
+ }
+
+ if s.TLSCACertificate != "" {
+ // include specified CA certificate
+ caCert, caCertErr := ioutil.ReadFile(s.TLSCACertificate)
+ if caCertErr != nil {
+ return caCertErr
+ }
+ caCertPool := x509.NewCertPool()
+ ok := caCertPool.AppendCertsFromPEM(caCert)
+ if !ok {
+ return fmt.Errorf("cannot parse CA certificate")
+ }
+ httpsServer.TLSConfig.ClientCAs = caCertPool
+ httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert
+ }
+
+ // call custom TLS configurator
+ if s.cfgTLSFn != nil {
+ s.cfgTLSFn(httpsServer.TLSConfig)
+ }
+
+ if len(httpsServer.TLSConfig.Certificates) == 0 && httpsServer.TLSConfig.GetCertificate == nil {
+ // after standard and custom config are passed, this ends up with no certificate
+ if s.TLSCertificate == "" {
+ if s.TLSCertificateKey == "" {
+ s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified")
+ }
+ s.Fatalf("the required flag `--tls-certificate` was not specified")
+ }
+ if s.TLSCertificateKey == "" {
+ s.Fatalf("the required flag `--tls-key` was not specified")
+ }
+ // this happens with a wrong custom TLS configurator
+ s.Fatalf("no certificate was configured for TLS")
+ }
+
+ if s.cfgServerFn != nil {
+ s.cfgServerFn(httpsServer, "https", s.httpsServerL.Addr().String())
+ }
+
+ servers = append(servers, httpsServer)
+ wg.Add(1)
+ s.Logf("Serving neofs rest gw at https://%s", s.httpsServerL.Addr())
+ go func(l net.Listener) {
+ defer wg.Done()
+ if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed {
+ s.Fatalf("%v", err)
+ }
+ s.Logf("Stopped serving neofs rest gw at https://%s", l.Addr())
+ }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig))
+ }
+
+ wg.Add(1)
+ go s.handleShutdown(wg, &servers)
+
+ wg.Wait()
+ return nil
+}
+
+// The TLS configuration before HTTPS server starts.
+func (s *Server) ConfigureTLS(cfgTLS func(tlsConfig *tls.Config)) {
+ s.cfgTLSFn = cfgTLS
+}
+
+// As soon as server is initialized but not run yet, this function will be called.
+// If you need to modify a config, store server instance to stop it individually later, this is the place.
+// This function can be called multiple times, depending on the number of serving schemes.
+// scheme value will be set accordingly: "http", "https" or "unix".
+func (s *Server) ConfigureServer(cfgServer func(s *http.Server, scheme, addr string)) {
+ s.cfgServerFn = cfgServer
+}
+
+// Listen creates the listeners for the server
+func (s *Server) Listen() error {
+ if s.hasListeners { // already done this
+ return nil
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ // Use http listen limit if https listen limit wasn't defined
+ if s.TLSListenLimit == 0 {
+ s.TLSListenLimit = s.ListenLimit
+ }
+ // Use http tcp keep alive if https tcp keep alive wasn't defined
+ if int64(s.TLSKeepAlive) == 0 {
+ s.TLSKeepAlive = s.KeepAlive
+ }
+ // Use http read timeout if https read timeout wasn't defined
+ if int64(s.TLSReadTimeout) == 0 {
+ s.TLSReadTimeout = s.ReadTimeout
+ }
+ // Use http write timeout if https write timeout wasn't defined
+ if int64(s.TLSWriteTimeout) == 0 {
+ s.TLSWriteTimeout = s.WriteTimeout
+ }
+ }
+
+ if s.hasScheme(schemeHTTP) {
+ listener, err := net.Listen("tcp", s.ListenAddress)
+ if err != nil {
+ return err
+ }
+
+ _, _, err = swag.SplitHostPort(listener.Addr().String())
+ if err != nil {
+ return err
+ }
+ s.httpServerL = listener
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ tlsListener, err := net.Listen("tcp", s.TLSListenAddress)
+ if err != nil {
+ return err
+ }
+
+ _, _, err = swag.SplitHostPort(tlsListener.Addr().String())
+ if err != nil {
+ return err
+ }
+ s.httpsServerL = tlsListener
+ }
+
+ s.hasListeners = true
+ return nil
+}
+
+// Shutdown server and clean up resources
+func (s *Server) Shutdown() error {
+ if atomic.CompareAndSwapInt32(&s.shuttingDown, 0, 1) {
+ close(s.shutdown)
+ }
+ return nil
+}
+
+func (s *Server) handleShutdown(wg *sync.WaitGroup, serversPtr *[]*http.Server) {
+ // wg.Done must occur last, after s.api.ServerShutdown()
+ // (to preserve old behaviour)
+ defer wg.Done()
+
+ <-s.shutdown
+
+ servers := *serversPtr
+
+ ctx, cancel := context.WithTimeout(context.TODO(), s.GracefulTimeout)
+ defer cancel()
+
+ // first execute the pre-shutdown hook
+ s.api.PreServerShutdown()
+
+ shutdownChan := make(chan bool)
+ for i := range servers {
+ server := servers[i]
+ go func() {
+ var success bool
+ defer func() {
+ shutdownChan <- success
+ }()
+ if err := server.Shutdown(ctx); err != nil {
+ // Error from closing listeners, or context timeout:
+ s.Logf("HTTP server Shutdown: %v", err)
+ } else {
+ success = true
+ }
+ }()
+ }
+
+ // Wait until all listeners have successfully shut down before calling ServerShutdown
+ success := true
+ for range servers {
+ success = success && <-shutdownChan
+ }
+ if success {
+ s.api.ServerShutdown()
+ }
+}
+
+// GetHandler returns a handler useful for testing
+func (s *Server) GetHandler() http.Handler {
+ return s.handler
+}
+
+// SetHandler allows for setting a http handler on this server
+func (s *Server) SetHandler(handler http.Handler) {
+ s.handler = handler
+}
+
+// HTTPListener returns the http listener
+func (s *Server) HTTPListener() (net.Listener, error) {
+ if !s.hasListeners {
+ if err := s.Listen(); err != nil {
+ return nil, err
+ }
+ }
+ return s.httpServerL, nil
+}
+
+// TLSListener returns the https listener
+func (s *Server) TLSListener() (net.Listener, error) {
+ if !s.hasListeners {
+ if err := s.Listen(); err != nil {
+ return nil, err
+ }
+ }
+ return s.httpsServerL, nil
+}
+
+func handleInterrupt(once *sync.Once, s *Server) {
+ once.Do(func() {
+ for range s.interrupt {
+ if s.interrupted {
+ s.Logf("Server already shutting down")
+ continue
+ }
+ s.interrupted = true
+ s.Logf("Shutting down... ")
+ if err := s.Shutdown(); err != nil {
+ s.Logf("HTTP server Shutdown: %v", err)
+ }
+ }
+ })
+}
+
+func signalNotify(interrupt chan<- os.Signal) {
+ signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM)
+}
diff --git a/gen/restapi/server_config.go b/gen/restapi/server_config.go
new file mode 100644
index 0000000..8c8d3df
--- /dev/null
+++ b/gen/restapi/server_config.go
@@ -0,0 +1,53 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package restapi
+
+import (
+ "time"
+
+ "github.com/spf13/pflag"
+)
+
+const (
+ FlagScheme = "scheme"
+ FlagCleanupTimeout = "cleanup-timeout"
+ FlagGracefulTimeout = "graceful-timeout"
+ FlagMaxHeaderSize = "max-header-size"
+ FlagListenAddress = "listen-address"
+ FlagListenLimit = "listen-limit"
+ FlagKeepAlive = "keep-alive"
+ FlagReadTimeout = "read-timeout"
+ FlagWriteTimeout = "write-timeout"
+ FlagTLSListenAddress = "tls-listen-address"
+ FlagTLSCertificate = "tls-certificate"
+ FlagTLSKey = "tls-key"
+ FlagTLSCa = "tls-ca"
+ FlagTLSListenLimit = "tls-listen-limit"
+ FlagTLSKeepAlive = "tls-keep-alive"
+ FlagTLSReadTimeout = "tls-read-timeout"
+ FlagTLSWriteTimeout = "tls-write-timeout"
+)
+
+// BindDefaultFlag init default flag.
+func BindDefaultFlags(flagSet *pflag.FlagSet) {
+ flagSet.StringSlice(FlagScheme, defaultSchemes, "the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec")
+
+ flagSet.Duration(FlagCleanupTimeout, 10*time.Second, "grace period for which to wait before killing idle connections")
+ flagSet.Duration(FlagGracefulTimeout, 15*time.Second, "grace period for which to wait before shutting down the server")
+ flagSet.Int(FlagMaxHeaderSize, 1000000, "controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body")
+
+ flagSet.String(FlagListenAddress, "localhost:8080", "the IP and port to listen on")
+ flagSet.Int(FlagListenLimit, 0, "limit the number of outstanding requests")
+ flagSet.Duration(FlagKeepAlive, 3*time.Minute, "sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)")
+ flagSet.Duration(FlagReadTimeout, 30*time.Second, "maximum duration before timing out read of the request")
+ flagSet.Duration(FlagWriteTimeout, 30*time.Second, "maximum duration before timing out write of the response")
+
+ flagSet.String(FlagTLSListenAddress, "localhost:8081", "the IP and port to listen on")
+ flagSet.String(FlagTLSCertificate, "", "the certificate file to use for secure connections")
+ flagSet.String(FlagTLSKey, "", "the private key file to use for secure connections (without passphrase)")
+ flagSet.String(FlagTLSCa, "", "the certificate authority certificate file to be used with mutual tls auth")
+ flagSet.Int(FlagTLSListenLimit, 0, "limit the number of outstanding requests")
+ flagSet.Duration(FlagTLSKeepAlive, 3*time.Minute, "sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)")
+ flagSet.Duration(FlagTLSReadTimeout, 30*time.Second, "maximum duration before timing out read of the request")
+ flagSet.Duration(FlagTLSWriteTimeout, 30*time.Second, "maximum duration before timing out write of the response")
+}
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..0c50663
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,107 @@
+module github.com/nspcc-dev/neofs-rest-gw
+
+go 1.17
+
+require (
+ github.com/go-openapi/errors v0.20.2
+ github.com/go-openapi/loads v0.21.1
+ github.com/go-openapi/runtime v0.23.3
+ github.com/go-openapi/spec v0.20.4
+ github.com/go-openapi/strfmt v0.21.2
+ github.com/go-openapi/swag v0.21.1
+ github.com/go-openapi/validate v0.21.0
+ github.com/google/uuid v1.3.0
+ github.com/nspcc-dev/neo-go v0.98.2
+ github.com/nspcc-dev/neofs-api-go/v2 v2.12.1
+ github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.3.0.20220407103316-e50e6d28280d
+ github.com/spf13/pflag v1.0.5
+ github.com/stretchr/testify v1.7.0
+ github.com/testcontainers/testcontainers-go v0.13.0
+ go.uber.org/zap v1.18.1
+ golang.org/x/net v0.0.0-20220403103023-749bd193bc2b
+)
+
+require (
+ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
+ github.com/Microsoft/go-winio v0.4.17 // indirect
+ github.com/Microsoft/hcsshim v0.8.23 // indirect
+ github.com/PuerkitoBio/purell v1.1.1 // indirect
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1 // indirect
+ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/btcsuite/btcd v0.22.0-beta // indirect
+ github.com/cenkalti/backoff/v4 v4.1.2 // indirect
+ github.com/cespare/xxhash/v2 v2.1.2 // indirect
+ github.com/containerd/cgroups v1.0.1 // indirect
+ github.com/containerd/containerd v1.5.9 // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/docker v20.10.11+incompatible // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/fsnotify/fsnotify v1.5.1 // indirect
+ github.com/go-openapi/analysis v0.21.2 // indirect
+ github.com/go-openapi/jsonpointer v0.19.5 // indirect
+ github.com/go-openapi/jsonreference v0.19.6 // indirect
+ github.com/go-stack/stack v1.8.1 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
+ github.com/golang/mock v1.6.0 // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/snappy v0.0.3 // indirect
+ github.com/hashicorp/golang-lru v0.5.4 // indirect
+ github.com/hashicorp/hcl v1.0.0 // indirect
+ github.com/josharian/intern v1.0.0 // indirect
+ github.com/magiconair/properties v1.8.5 // indirect
+ github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mitchellh/mapstructure v1.4.3 // indirect
+ github.com/moby/sys/mount v0.2.0 // indirect
+ github.com/moby/sys/mountinfo v0.5.0 // indirect
+ github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
+ github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect
+ github.com/mr-tron/base58 v1.2.0 // indirect
+ github.com/nspcc-dev/hrw v1.0.9 // indirect
+ github.com/nspcc-dev/neofs-crypto v0.3.0 // indirect
+ github.com/nspcc-dev/rfc6979 v0.2.0 // indirect
+ github.com/oklog/ulid v1.3.1 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.2 // indirect
+ github.com/opencontainers/runc v1.0.2 // indirect
+ github.com/pelletier/go-toml v1.9.4 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_golang v1.11.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.26.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/russross/blackfriday/v2 v2.0.1 // indirect
+ github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spaolacci/murmur3 v1.1.0 // indirect
+ github.com/spf13/afero v1.6.0 // indirect
+ github.com/spf13/cast v1.4.1 // indirect
+ github.com/spf13/jwalterweatherman v1.1.0 // indirect
+ github.com/spf13/viper v1.10.1
+ github.com/subosito/gotenv v1.2.0 // indirect
+ github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 // indirect
+ github.com/urfave/cli v1.22.5 // indirect
+ go.etcd.io/bbolt v1.3.6 // indirect
+ go.mongodb.org/mongo-driver v1.8.4 // indirect
+ go.opencensus.io v0.23.0 // indirect
+ go.uber.org/atomic v1.9.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
+ golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
+ golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect
+ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
+ golang.org/x/text v0.3.7 // indirect
+ google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
+ google.golang.org/grpc v1.43.0 // indirect
+ google.golang.org/protobuf v1.27.1 // indirect
+ gopkg.in/ini.v1 v1.66.2 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..3695fd4
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,1628 @@
+bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
+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.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=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
+github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
+github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
+github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
+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/CityOfZion/neo-go v0.62.1-pre.0.20191114145240-e740fbe708f8/go.mod h1:MJCkWUBhi9pn/CrYO1Q3P687y2KeahrOPS9BD9LDGb0=
+github.com/CityOfZion/neo-go v0.70.1-pre.0.20191209120015-fccb0085941e/go.mod h1:0enZl0az8xA6PVkwzEOwPWVJGqlt/GO4hA4kmQ5Xzig=
+github.com/CityOfZion/neo-go v0.70.1-pre.0.20191212173117-32ac01130d4c/go.mod h1:JtlHfeqLywZLswKIKFnAp+yzezY4Dji9qlfQKB2OD/I=
+github.com/CityOfZion/neo-go v0.71.1-pre.0.20200129171427-f773ec69fb84/go.mod h1:FLI526IrRWHmcsO+mHsCbj64pJZhwQFTLJZu+A4PGOA=
+github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
+github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
+github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
+github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
+github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
+github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
+github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w=
+github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
+github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
+github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
+github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
+github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
+github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
+github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
+github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600=
+github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M=
+github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg=
+github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
+github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
+github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
+github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
+github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
+github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=
+github.com/abiosoft/ishell v2.0.0+incompatible/go.mod h1:HQR9AqF2R3P4XXpMpI0NAzgHf/aS6+zVXRj14cVk9qg=
+github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs=
+github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530=
+github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
+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/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
+github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
+github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
+github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1 h1:zFRi26YWd7NIorBXe8UkevRl0dIvk/AnXHWaAiZG+Yk=
+github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
+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/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
+github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
+github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
+github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
+github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+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 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+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/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
+github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
+github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
+github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
+github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
+github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo=
+github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
+github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
+github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
+github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=
+github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
+github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
+github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=
+github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
+github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
+github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
+github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
+github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
+github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
+github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
+github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
+github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
+github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
+github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
+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 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
+github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
+github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
+github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
+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/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
+github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc=
+github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
+github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
+github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
+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/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
+github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
+github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
+github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
+github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
+github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=
+github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=
+github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
+github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
+github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
+github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
+github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
+github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE=
+github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ=
+github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU=
+github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
+github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
+github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
+github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
+github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ=
+github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ=
+github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU=
+github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI=
+github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s=
+github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4=
+github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ=
+github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
+github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
+github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
+github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8=
+github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM=
+github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
+github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
+github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
+github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
+github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
+github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4=
+github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU=
+github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk=
+github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
+github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
+github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g=
+github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok=
+github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok=
+github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0=
+github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA=
+github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow=
+github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms=
+github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c=
+github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY=
+github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY=
+github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
+github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
+github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8=
+github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
+github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
+github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ=
+github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
+github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk=
+github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg=
+github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s=
+github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw=
+github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y=
+github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
+github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
+github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY=
+github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
+github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
+github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
+github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
+github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
+github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
+github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4=
+github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY=
+github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
+github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
+github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
+github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
+github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+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=
+github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
+github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
+github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
+github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
+github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
+github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
+github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
+github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
+github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
+github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
+github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
+github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
+github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo=
+github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
+github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
+github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI=
+github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
+github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
+github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
+github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
+github.com/evanphx/json-patch v4.9.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.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
+github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
+github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
+github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M=
+github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
+github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
+github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
+github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+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-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
+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-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+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-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU=
+github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY=
+github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8=
+github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
+github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
+github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
+github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
+github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
+github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0=
+github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g=
+github.com/go-openapi/runtime v0.23.3 h1:/dxjx4KCOQI5ImBMz036F6v/DzZ2NUjSRvbLJs1rgoE=
+github.com/go-openapi/runtime v0.23.3/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
+github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
+github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg=
+github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k=
+github.com/go-openapi/strfmt v0.21.2 h1:5NDNgadiX1Vhemth/TH4gCGopWSTdDjxl60H3B7f+os=
+github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
+github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU=
+github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
+github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI=
+github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
+github.com/go-redis/redis v6.10.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
+github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
+github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
+github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
+github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
+github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
+github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
+github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
+github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
+github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
+github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
+github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
+github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs=
+github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
+github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
+github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
+github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
+github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo=
+github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk=
+github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw=
+github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360=
+github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg=
+github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE=
+github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8=
+github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
+github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
+github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
+github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
+github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
+github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
+github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
+github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
+github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
+github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
+github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU=
+github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+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 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
+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 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
+github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
+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/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 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.1.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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/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/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
+github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I=
+github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+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 v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+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 v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
+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 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
+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.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
+github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
+github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
+github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+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.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
+github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
+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/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
+github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
+github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
+github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
+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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.10/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/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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
+github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
+github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
+github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/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=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
+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/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
+github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
+github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
+github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
+github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
+github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
+github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+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.8/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-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
+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-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
+github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
+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/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
+github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
+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/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.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
+github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
+github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
+github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
+github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
+github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
+github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
+github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI=
+github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
+github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
+github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
+github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc=
+github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+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/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
+github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE=
+github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
+github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
+github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
+github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
+github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
+github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+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/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nspcc-dev/dbft v0.0.0-20191205084618-dacb1a30c254/go.mod h1:w1Ln2aT+dBlPhLnuZhBV+DfPEdS2CHWWLp5JTScY3bw=
+github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA51EGfb5GS/HOv7VdmngNRTssSeQ729dvGY=
+github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk=
+github.com/nspcc-dev/dbft v0.0.0-20200219114139-199d286ed6c1/go.mod h1:O0qtn62prQSqizzoagHmuuKoz8QMkU3SzBoKdEvm3aQ=
+github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y=
+github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
+github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg=
+github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U=
+github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
+github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU=
+github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg=
+github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM=
+github.com/nspcc-dev/neo-go v0.98.2 h1:aNTQR0BjkojCVXv17/dh1sD88a0A1L+7GNympylTKig=
+github.com/nspcc-dev/neo-go v0.98.2/go.mod h1:KXKqJwfTyVJzDarSCDqFaKrVbg/qz0ZBk2c3AtzqS5M=
+github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220321113211-526c423a6152/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y=
+github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
+github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
+github.com/nspcc-dev/neofs-api-go/v2 v2.12.1 h1:PVU2rLlG9S0jDe5eKyaUs4nKo/la+mN5pvz32Gib3qM=
+github.com/nspcc-dev/neofs-api-go/v2 v2.12.1/go.mod h1:73j09Xa7I2zQbM3HCvAHnDHPYiiWnEHa1d6Z6RDMBLU=
+github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA=
+github.com/nspcc-dev/neofs-crypto v0.2.3/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw=
+github.com/nspcc-dev/neofs-crypto v0.3.0 h1:zlr3pgoxuzrmGCxc5W8dGVfA9Rro8diFvVnBg0L4ifM=
+github.com/nspcc-dev/neofs-crypto v0.3.0/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw=
+github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201182451-a5b61c4f6477/go.mod h1:dfMtQWmBHYpl9Dez23TGtIUKiFvCIxUZq/CkSIhEpz4=
+github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659/go.mod h1:/jay1lr3w7NQd/VDBkEhkJmDmyPNsu4W+QV2obsUV40=
+github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.3.0.20220407103316-e50e6d28280d h1:OHyq8+zyQtARFWj3quRPabcfQWJZEiU7HYp6QGCSjaM=
+github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.3.0.20220407103316-e50e6d28280d/go.mod h1:Hl7a1l0ntZ4b1ZABpGX6fuAuFS3c6+hyMCUNVvZv/w4=
+github.com/nspcc-dev/rfc6979 v0.1.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=
+github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE=
+github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=
+github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
+github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
+github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
+github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
+github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
+github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
+github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
+github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
+github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
+github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0=
+github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg=
+github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
+github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
+github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
+github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
+github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
+github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+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.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
+github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
+github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
+github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
+github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
+github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/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/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
+github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
+github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
+github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=
+github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
+github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+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 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
+github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=
+github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
+github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
+github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
+github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
+github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
+github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
+github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
+github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
+github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
+github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
+github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
+github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
+github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
+github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+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.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
+github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
+github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU=
+github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
+github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
+github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
+github.com/syndtr/goleveldb v0.0.0-20180307113352-169b1b37be73/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
+github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs=
+github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM=
+github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
+github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA=
+github.com/testcontainers/testcontainers-go v0.13.0/go.mod h1:z1abufU633Eb/FmSBTzV6ntZAC1eZBYPtaFsn4nPuDk=
+github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
+github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
+github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
+github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
+github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74/go.mod h1:RmMWU37GKR2s6pgrIEB4ixgpVCt/cf7dnJv3fuH1J1c=
+github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
+github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
+github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
+github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
+github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
+github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
+github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
+github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
+github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
+github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
+github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
+github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
+github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
+github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
+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.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
+github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
+github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
+go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
+go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
+go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
+go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
+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.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
+go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
+go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.8.4 h1:NruvZPPL0PBcRJKmbswoWSrmHeUvzdxA3GCPfD/NEOA=
+go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
+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 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+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/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
+go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
+go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+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=
+go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
+go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/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-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
+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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/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-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
+golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE=
+golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+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/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 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
+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.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/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-20181220203305-927f97764cc3/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-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+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-20190619014844-b5b0513f8c1b/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-20190813141303-74dc4d7220e7/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-20191004110552-13f9640d40b9/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-20200520004742-59133d7f0dd7/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-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+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-20201224014010-6772e930b67b/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-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
+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-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220403103023-749bd193bc2b h1:vI32FkLJNAWtGD4BwkThwEy6XS7ZLLMHkSkYfF8M0W0=
+golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+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/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-20190412183630-56d357773e84/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 h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/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-20190204203706-41f3e6584952/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-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/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-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/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-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/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-20200120151820-655fe14d7479/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-20200217220822-9197077df867/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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/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-20201202213521-69691e467435/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-20210124154548-22da62e12c0c/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-20210324051608-47abb6519492/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-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/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-20210603081109-ebe580a85c40/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-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/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-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo=
+golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210429154555-c04ba851c2a4/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+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.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s=
+golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180318012157-96caea41033d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190420181800-aa740d480789/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-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/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-20191108193012-7d206e10da11/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-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+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.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
+golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
+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.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/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
+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-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
+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-20200117163144-32f20d992d24/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-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-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/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-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
+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.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+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.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
+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.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
+google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM=
+google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+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 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+gopkg.in/abiosoft/ishell.v2 v2.0.0/go.mod h1:sFp+cGtH6o4s1FtpVPTMcHq2yue+c4DGOVohJCPUzwY=
+gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
+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-20141024133853-64131543e789/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=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
+gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
+gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
+gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
+gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+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-20200605160147-a5ece683394c/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 h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
+gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
+gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8=
+gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
+gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
+gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
+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.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
+k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
+k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
+k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
+k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
+k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
+k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
+k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
+k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
+k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
+k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
+k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
+k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
+k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI=
+k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM=
+k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
+k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
+k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
+k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc=
+k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
+k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+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/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/handlers/api.go b/handlers/api.go
new file mode 100644
index 0000000..e8c5a25
--- /dev/null
+++ b/handlers/api.go
@@ -0,0 +1,87 @@
+package handlers
+
+import (
+ "fmt"
+ "net/http"
+ "strings"
+
+ "github.com/go-openapi/errors"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+ "go.uber.org/zap"
+)
+
+// API is a REST v1 request handler.
+type API struct {
+ log *zap.Logger
+ pool *pool.Pool
+ key *keys.PrivateKey
+ defaultTimestamp bool
+}
+
+// PrmAPI groups parameters to init rest API.
+type PrmAPI struct {
+ Logger *zap.Logger
+ Pool *pool.Pool
+ Key *keys.PrivateKey
+ DefaultTimestamp bool
+}
+
+type BearerToken struct {
+ Token string
+ Signature string
+ Key string
+}
+
+// New creates a new API using specified logger, connection pool and other parameters.
+func New(prm *PrmAPI) *API {
+ return &API{
+ log: prm.Logger,
+ pool: prm.Pool,
+ key: prm.Key,
+ defaultTimestamp: prm.DefaultTimestamp,
+ }
+}
+
+const (
+ bearerPrefix = "Bearer "
+)
+
+func (a *API) Configure(api *operations.NeofsRestGwAPI) http.Handler {
+ api.ServeError = errors.ServeError
+
+ api.AuthHandler = operations.AuthHandlerFunc(a.PostAuth)
+ api.PutObjectHandler = operations.PutObjectHandlerFunc(a.PutObjects)
+ api.PutContainerHandler = operations.PutContainerHandlerFunc(a.PutContainers)
+ api.GetContainerHandler = operations.GetContainerHandlerFunc(a.GetContainer)
+ api.BearerAuthAuth = func(s string) (*models.Principal, error) {
+ if !strings.HasPrefix(s, bearerPrefix) {
+ return nil, fmt.Errorf("has not bearer token")
+ }
+ if s = strings.TrimPrefix(s, bearerPrefix); len(s) == 0 {
+ return nil, fmt.Errorf("bearer token is empty")
+ }
+
+ return (*models.Principal)(&s), nil
+ }
+
+ api.PreServerShutdown = func() {}
+
+ api.ServerShutdown = func() {}
+
+ return setupGlobalMiddleware(api.Serve(setupMiddlewares))
+}
+
+// The middleware configuration is for the handler executors. These do not apply to the swagger.json document.
+// The middleware executes after routing but before authentication, binding and validation.
+func setupMiddlewares(handler http.Handler) http.Handler {
+ return handler
+}
+
+// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document.
+// So this is a good place to plug in a panic handling middleware, logging and metrics.
+func setupGlobalMiddleware(handler http.Handler) http.Handler {
+ return handler
+}
diff --git a/handlers/auth.go b/handlers/auth.go
new file mode 100644
index 0000000..22ab16d
--- /dev/null
+++ b/handlers/auth.go
@@ -0,0 +1,130 @@
+package handlers
+
+import (
+ "context"
+ "crypto/ecdsa"
+ "encoding/base64"
+ "fmt"
+
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/google/uuid"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ "github.com/nspcc-dev/neofs-sdk-go/owner"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+)
+
+const defaultTokenExpDuration = 100 // in epoch
+
+// PostAuth handler that forms bearer token to sign.
+func (a *API) PostAuth(params operations.AuthParams) middleware.Responder {
+ var (
+ err error
+ resp *models.TokenResponse
+ )
+
+ if params.XNeofsTokenScope == "object" {
+ resp, err = prepareObjectToken(params, a.pool)
+ } else {
+ resp, err = prepareContainerTokens(params, a.pool, a.key.PublicKey())
+ }
+ if err != nil {
+ return operations.NewAuthBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ return operations.NewAuthOK().WithPayload(resp)
+}
+
+func prepareObjectToken(params operations.AuthParams, pool *pool.Pool) (*models.TokenResponse, error) {
+ ctx := params.HTTPRequest.Context()
+
+ btoken, err := ToNativeObjectToken(params.Token)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't transform token to native: %w", err)
+ }
+ btoken.SetOwner(pool.OwnerID())
+
+ iat, exp, err := getTokenLifetime(ctx, pool, params.XNeofsTokenLifetime)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't get lifetime: %w", err)
+ }
+ btoken.SetLifetime(exp, 0, iat)
+
+ binaryBearer, err := btoken.ToV2().GetBody().StableMarshal(nil)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't marshal bearer token: %w", err)
+ }
+
+ var resp models.TokenResponse
+ resp.Type = models.NewTokenType(models.TokenTypeObject)
+ resp.Token = NewString(base64.StdEncoding.EncodeToString(binaryBearer))
+
+ return &resp, nil
+}
+
+func prepareContainerTokens(params operations.AuthParams, pool *pool.Pool, key *keys.PublicKey) (*models.TokenResponse, error) {
+ ctx := params.HTTPRequest.Context()
+
+ iat, exp, err := getTokenLifetime(ctx, pool, params.XNeofsTokenLifetime)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't get lifetime: %w", err)
+ }
+
+ ownerKey, err := keys.NewPublicKeyFromString(params.XNeofsTokenSignatureKey)
+ if err != nil {
+ return nil, fmt.Errorf("invalid singature key: %w", err)
+ }
+
+ var resp models.TokenResponse
+ resp.Type = models.NewTokenType(models.TokenTypeContainer)
+
+ stoken, err := ToNativeContainerToken(params.Token)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't transform rule to native session token: %w", err)
+ }
+
+ uid, err := uuid.New().MarshalBinary()
+ if err != nil {
+ return nil, err
+ }
+ stoken.SetID(uid)
+
+ stoken.SetOwnerID(owner.NewIDFromPublicKey((*ecdsa.PublicKey)(ownerKey)))
+
+ stoken.SetIat(iat)
+ stoken.SetExp(exp)
+ stoken.SetSessionKey(key.Bytes())
+
+ binaryToken, err := stoken.ToV2().GetBody().StableMarshal(nil)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't marshal session token: %w", err)
+ }
+
+ resp.Token = NewString(base64.StdEncoding.EncodeToString(binaryToken))
+
+ return &resp, nil
+}
+
+func getCurrentEpoch(ctx context.Context, p *pool.Pool) (uint64, error) {
+ netInfo, err := p.NetworkInfo(ctx)
+ if err != nil {
+ return 0, fmt.Errorf("couldn't get netwokr info: %w", err)
+ }
+
+ return netInfo.CurrentEpoch(), nil
+}
+
+func getTokenLifetime(ctx context.Context, p *pool.Pool, expDuration *int64) (uint64, uint64, error) {
+ currEpoch, err := getCurrentEpoch(ctx, p)
+ if err != nil {
+ return 0, 0, err
+ }
+
+ var lifetimeDuration uint64 = defaultTokenExpDuration
+ if expDuration != nil && *expDuration > 0 {
+ lifetimeDuration = uint64(*expDuration)
+ }
+
+ return currEpoch, currEpoch + lifetimeDuration, nil
+}
diff --git a/handlers/auth_test.go b/handlers/auth_test.go
new file mode 100644
index 0000000..3cefe0b
--- /dev/null
+++ b/handlers/auth_test.go
@@ -0,0 +1,66 @@
+package handlers
+
+import (
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "crypto/sha512"
+ "encoding/base64"
+ "encoding/hex"
+ "testing"
+
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-sdk-go/owner"
+ "github.com/stretchr/testify/require"
+)
+
+const devenvPrivateKey = "1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb"
+
+func TestSign(t *testing.T) {
+ key, err := keys.NewPrivateKeyFromHex(devenvPrivateKey)
+ require.NoError(t, err)
+
+ pubKeyHex := hex.EncodeToString(key.PublicKey().Bytes())
+
+ b := &models.Bearer{
+ Object: []*models.Record{{
+ Operation: models.NewOperation(models.OperationPUT),
+ Action: models.NewAction(models.ActionALLOW),
+ Filters: []*models.Filter{},
+ Targets: []*models.Target{{
+ Role: models.NewRole(models.RoleOTHERS),
+ Keys: []string{},
+ }},
+ }},
+ }
+
+ btoken, err := ToNativeObjectToken(b)
+ require.NoError(t, err)
+
+ ownerKey, err := keys.NewPublicKeyFromString(pubKeyHex)
+ require.NoError(t, err)
+
+ btoken.SetOwner(owner.NewIDFromPublicKey((*ecdsa.PublicKey)(ownerKey)))
+
+ binaryBearer, err := btoken.ToV2().GetBody().StableMarshal(nil)
+ require.NoError(t, err)
+
+ bearerBase64 := base64.StdEncoding.EncodeToString(binaryBearer)
+
+ h := sha512.Sum512(binaryBearer)
+ x, y, err := ecdsa.Sign(rand.Reader, &key.PrivateKey, h[:])
+ if err != nil {
+ panic(err)
+ }
+ signatureData := elliptic.Marshal(elliptic.P256(), x, y)
+
+ bt := &BearerToken{
+ Token: bearerBase64,
+ Signature: base64.StdEncoding.EncodeToString(signatureData),
+ Key: pubKeyHex,
+ }
+
+ _, err = prepareBearerToken(bt)
+ require.NoError(t, err)
+}
diff --git a/handlers/containers.go b/handlers/containers.go
new file mode 100644
index 0000000..2e937a7
--- /dev/null
+++ b/handlers/containers.go
@@ -0,0 +1,192 @@
+package handlers
+
+import (
+ "context"
+ "encoding/base64"
+ "fmt"
+ "net/http"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-api-go/v2/refs"
+ sessionv2 "github.com/nspcc-dev/neofs-api-go/v2/session"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ "github.com/nspcc-dev/neofs-sdk-go/acl"
+ "github.com/nspcc-dev/neofs-sdk-go/container"
+ cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
+ "github.com/nspcc-dev/neofs-sdk-go/policy"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+ "github.com/nspcc-dev/neofs-sdk-go/session"
+)
+
+const (
+ defaultPlacementPolicy = "REP 3"
+ defaultBasicACL = acl.PrivateBasicName
+)
+
+// PutContainers handler that creates container in NeoFS.
+func (a *API) PutContainers(params operations.PutContainerParams, principal *models.Principal) middleware.Responder {
+ bt := &BearerToken{
+ Token: string(*principal),
+ Signature: params.XNeofsTokenSignature,
+ Key: params.XNeofsTokenSignatureKey,
+ }
+ stoken, err := prepareSessionToken(bt)
+ if err != nil {
+ return wrapError(err)
+ }
+
+ userAttributes := prepareUserAttributes(params.HTTPRequest.Header)
+
+ cnrID, err := createContainer(params.HTTPRequest.Context(), a.pool, stoken, ¶ms.Container, userAttributes)
+ if err != nil {
+ return wrapError(err)
+ }
+
+ var resp operations.PutContainerOKBody
+ resp.ContainerID = NewString(cnrID.String())
+
+ return operations.NewPutContainerOK().WithPayload(&resp)
+}
+
+// GetContainer handler that returns container info.
+func (a *API) GetContainer(params operations.GetContainerParams) middleware.Responder {
+ cnr, err := getContainer(params.HTTPRequest.Context(), a.pool, params.ContainerID)
+ if err != nil {
+ return wrapError(err)
+ }
+
+ attrs := make([]*models.Attribute, len(cnr.Attributes()))
+ for i, attr := range cnr.Attributes() {
+ attrs[i] = &models.Attribute{Key: attr.Key(), Value: attr.Value()}
+ }
+
+ resp := &models.ContainerInfo{
+ ContainerID: params.ContainerID,
+ Version: cnr.Version().String(),
+ OwnerID: cnr.OwnerID().String(),
+ BasicACL: acl.BasicACL(cnr.BasicACL()).String(),
+ PlacementPolicy: strings.Join(policy.Encode(cnr.PlacementPolicy()), " "),
+ Attributes: attrs,
+ }
+
+ return operations.NewGetContainerOK().WithPayload(resp)
+}
+
+func prepareUserAttributes(header http.Header) map[string]string {
+ filtered := filterHeaders(header)
+ delete(filtered, container.AttributeName)
+ delete(filtered, container.AttributeTimestamp)
+ return filtered
+}
+
+func getContainer(ctx context.Context, p *pool.Pool, containerID string) (*container.Container, error) {
+ var cnrID cid.ID
+ if err := cnrID.Parse(containerID); err != nil {
+ return nil, fmt.Errorf("parse container id '%s': %w", containerID, err)
+ }
+
+ var prm pool.PrmContainerGet
+ prm.SetContainerID(cnrID)
+
+ return p.GetContainer(ctx, prm)
+}
+
+func createContainer(ctx context.Context, p *pool.Pool, stoken *session.Token, request *operations.PutContainerBody, userAttrs map[string]string) (*cid.ID, error) {
+ if request.PlacementPolicy == "" {
+ request.PlacementPolicy = defaultPlacementPolicy
+ }
+ pp, err := policy.Parse(request.PlacementPolicy)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't parse placement policy: %w", err)
+ }
+
+ if request.BasicACL == "" {
+ request.BasicACL = defaultBasicACL
+ }
+ basicACL, err := acl.ParseBasicACL(request.BasicACL)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't parse basic acl: %w", err)
+ }
+
+ cnrOptions := []container.Option{
+ container.WithPolicy(pp),
+ container.WithCustomBasicACL(basicACL),
+ container.WithAttribute(container.AttributeName, *request.ContainerName),
+ container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(time.Now().Unix(), 10)),
+ }
+
+ for key, val := range userAttrs {
+ cnrOptions = append(cnrOptions, container.WithAttribute(key, val))
+ }
+
+ cnr := container.New(cnrOptions...)
+ cnr.SetOwnerID(stoken.OwnerID())
+ cnr.SetSessionToken(stoken)
+
+ container.SetNativeName(cnr, *request.ContainerName)
+
+ var prm pool.PrmContainerPut
+ prm.SetContainer(*cnr)
+
+ cnrID, err := p.PutContainer(ctx, prm)
+ if err != nil {
+ return nil, fmt.Errorf("could put object to neofs: %w", err)
+ }
+
+ return cnrID, nil
+}
+
+func prepareSessionToken(bt *BearerToken) (*session.Token, error) {
+ stoken, err := GetSessionToken(bt.Token)
+ if err != nil {
+ return nil, fmt.Errorf("could not fetch session token: %w", err)
+ }
+
+ signature, err := base64.StdEncoding.DecodeString(bt.Signature)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't decode bearer signature: %w", err)
+ }
+
+ ownerKey, err := keys.NewPublicKeyFromString(bt.Key)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't fetch bearer token owner key: %w", err)
+ }
+
+ v2signature := new(refs.Signature)
+ v2signature.SetScheme(refs.ECDSA_SHA512)
+ v2signature.SetSign(signature)
+ v2signature.SetKey(ownerKey.Bytes())
+ stoken.ToV2().SetSignature(v2signature)
+
+ if !stoken.VerifySignature() {
+ err = fmt.Errorf("invalid signature")
+ }
+
+ return stoken, err
+}
+
+func GetSessionToken(auth string) (*session.Token, error) {
+ data, err := base64.StdEncoding.DecodeString(auth)
+ if err != nil {
+ return nil, fmt.Errorf("can't base64-decode bearer token: %w", err)
+ }
+
+ body := new(sessionv2.TokenBody)
+ if err = body.Unmarshal(data); err != nil {
+ return nil, fmt.Errorf("can't unmarshal bearer token: %w", err)
+ }
+
+ tkn := new(session.Token)
+ tkn.ToV2().SetBody(body)
+
+ return tkn, nil
+}
+
+func wrapError(err error) middleware.Responder {
+ return operations.NewPutContainerBadRequest().WithPayload(models.Error(err.Error()))
+}
diff --git a/handlers/objects.go b/handlers/objects.go
new file mode 100644
index 0000000..c82101d
--- /dev/null
+++ b/handlers/objects.go
@@ -0,0 +1,115 @@
+package handlers
+
+import (
+ "encoding/base64"
+ "fmt"
+
+ "github.com/go-openapi/runtime/middleware"
+ "github.com/nspcc-dev/neo-go/pkg/crypto/keys"
+ "github.com/nspcc-dev/neofs-api-go/v2/acl"
+ "github.com/nspcc-dev/neofs-api-go/v2/refs"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/restapi/operations"
+ cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
+ "github.com/nspcc-dev/neofs-sdk-go/object"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+ "github.com/nspcc-dev/neofs-sdk-go/token"
+)
+
+// PutObjects handler that uploads object to NeoFS.
+func (a *API) PutObjects(params operations.PutObjectParams, principal *models.Principal) middleware.Responder {
+ ctx := params.HTTPRequest.Context()
+
+ bt := &BearerToken{
+ Token: string(*principal),
+ Signature: params.XNeofsTokenSignature,
+ Key: params.XNeofsTokenSignatureKey,
+ }
+
+ btoken, err := prepareBearerToken(bt)
+ if err != nil {
+ return operations.NewPutObjectBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ var cnrID cid.ID
+ if err = cnrID.Parse(*params.Object.ContainerID); err != nil {
+ return operations.NewPutObjectBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ payload, err := base64.StdEncoding.DecodeString(params.Object.Payload)
+ if err != nil {
+ return operations.NewPutObjectBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ prm := PrmAttributes{
+ DefaultTimestamp: a.defaultTimestamp,
+ DefaultFileName: *params.Object.FileName,
+ }
+ attributes, err := GetObjectAttributes(ctx, params.HTTPRequest.Header, a.pool, prm)
+ if err != nil {
+ return operations.NewPutObjectBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ obj := object.New()
+ obj.SetContainerID(&cnrID)
+ obj.SetOwnerID(btoken.OwnerID())
+ obj.SetPayload(payload)
+ obj.SetAttributes(attributes...)
+
+ var prmPut pool.PrmObjectPut
+ prmPut.SetHeader(*obj)
+ prmPut.UseBearer(btoken)
+
+ objID, err := a.pool.PutObject(ctx, prmPut)
+ if err != nil {
+ return operations.NewPutObjectBadRequest().WithPayload(models.Error(err.Error()))
+ }
+
+ var resp operations.PutObjectOKBody
+ resp.ContainerID = params.Object.ContainerID
+ resp.ObjectID = NewString(objID.String())
+
+ return operations.NewPutObjectOK().WithPayload(&resp)
+}
+
+func prepareBearerToken(bt *BearerToken) (*token.BearerToken, error) {
+ btoken, err := getBearerToken(bt.Token)
+ if err != nil {
+ return nil, fmt.Errorf("could not fetch bearer token: %w", err)
+ }
+
+ signature, err := base64.StdEncoding.DecodeString(bt.Signature)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't decode bearer signature: %w", err)
+ }
+
+ ownerKey, err := keys.NewPublicKeyFromString(bt.Key)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't fetch bearer token owner key: %w", err)
+ }
+
+ v2signature := new(refs.Signature)
+ v2signature.SetScheme(refs.ECDSA_SHA512)
+ v2signature.SetSign(signature)
+ v2signature.SetKey(ownerKey.Bytes())
+ btoken.ToV2().SetSignature(v2signature)
+
+ return btoken, btoken.VerifySignature()
+}
+
+func getBearerToken(auth string) (*token.BearerToken, error) {
+ data, err := base64.StdEncoding.DecodeString(auth)
+ if err != nil {
+ return nil, fmt.Errorf("can't base64-decode bearer token: %w", err)
+ }
+
+ body := new(acl.BearerTokenBody)
+ if err = body.Unmarshal(data); err != nil {
+ return nil, fmt.Errorf("can't unmarshal bearer token: %w", err)
+ }
+
+ tkn := new(token.BearerToken)
+ tkn.ToV2().SetBody(body)
+
+ return tkn, nil
+}
diff --git a/handlers/transformers.go b/handlers/transformers.go
new file mode 100644
index 0000000..a7dba95
--- /dev/null
+++ b/handlers/transformers.go
@@ -0,0 +1,245 @@
+package handlers
+
+import (
+ "encoding/hex"
+ "fmt"
+
+ sessionv2 "github.com/nspcc-dev/neofs-api-go/v2/session"
+ "github.com/nspcc-dev/neofs-rest-gw/gen/models"
+ cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
+ "github.com/nspcc-dev/neofs-sdk-go/eacl"
+ "github.com/nspcc-dev/neofs-sdk-go/session"
+ "github.com/nspcc-dev/neofs-sdk-go/token"
+)
+
+// ToNativeAction converts models.Action to appropriate eacl.Action.
+func ToNativeAction(a *models.Action) (eacl.Action, error) {
+ if a == nil {
+ return eacl.ActionUnknown, fmt.Errorf("unsupported empty action")
+ }
+
+ switch *a {
+ case models.ActionALLOW:
+ return eacl.ActionAllow, nil
+ case models.ActionDENY:
+ return eacl.ActionDeny, nil
+ default:
+ return eacl.ActionUnknown, fmt.Errorf("unsupported action type: '%s'", *a)
+ }
+}
+
+// ToNativeOperation converts models.Operation to appropriate eacl.Operation.
+func ToNativeOperation(o *models.Operation) (eacl.Operation, error) {
+ if o == nil {
+ return eacl.OperationUnknown, fmt.Errorf("unsupported empty opertaion")
+ }
+
+ switch *o {
+ case models.OperationGET:
+ return eacl.OperationGet, nil
+ case models.OperationHEAD:
+ return eacl.OperationHead, nil
+ case models.OperationPUT:
+ return eacl.OperationPut, nil
+ case models.OperationDELETE:
+ return eacl.OperationDelete, nil
+ case models.OperationSEARCH:
+ return eacl.OperationSearch, nil
+ case models.OperationRANGE:
+ return eacl.OperationRange, nil
+ case models.OperationRANGEHASH:
+ return eacl.OperationRangeHash, nil
+ default:
+ return eacl.OperationUnknown, fmt.Errorf("unsupported operation type: '%s'", *o)
+ }
+}
+
+// ToNativeHeaderType converts models.HeaderType to appropriate eacl.FilterHeaderType.
+func ToNativeHeaderType(h *models.HeaderType) (eacl.FilterHeaderType, error) {
+ if h == nil {
+ return eacl.HeaderTypeUnknown, fmt.Errorf("unsupported empty header type")
+ }
+
+ switch *h {
+ case models.HeaderTypeOBJECT:
+ return eacl.HeaderFromObject, nil
+ case models.HeaderTypeREQUEST:
+ return eacl.HeaderFromRequest, nil
+ case models.HeaderTypeSERVICE:
+ return eacl.HeaderFromService, nil
+ default:
+ return eacl.HeaderTypeUnknown, fmt.Errorf("unsupported header type: '%s'", *h)
+ }
+}
+
+// ToNativeMatchType converts models.MatchType to appropriate eacl.Match.
+func ToNativeMatchType(t *models.MatchType) (eacl.Match, error) {
+ if t == nil {
+ return eacl.MatchUnknown, fmt.Errorf("unsupported empty match type")
+ }
+
+ switch *t {
+ case models.MatchTypeSTRINGEQUAL:
+ return eacl.MatchStringEqual, nil
+ case models.MatchTypeSTRINGNOTEQUAL:
+ return eacl.MatchStringNotEqual, nil
+ default:
+ return eacl.MatchUnknown, fmt.Errorf("unsupported match type: '%s'", *t)
+ }
+}
+
+// ToNativeRole converts models.Role to appropriate eacl.Role.
+func ToNativeRole(r *models.Role) (eacl.Role, error) {
+ if r == nil {
+ return eacl.RoleUnknown, fmt.Errorf("unsupported empty role")
+ }
+
+ switch *r {
+ case models.RoleUSER:
+ return eacl.RoleUser, nil
+ case models.RoleSYSTEM:
+ return eacl.RoleSystem, nil
+ case models.RoleOTHERS:
+ return eacl.RoleOthers, nil
+ default:
+ return eacl.RoleUnknown, fmt.Errorf("unsupported role type: '%s'", *r)
+ }
+}
+
+// ToNativeVerb converts models.Verb to appropriate session.ContainerSessionVerb.
+func ToNativeVerb(r *models.Verb) (sessionv2.ContainerSessionVerb, error) {
+ if r == nil {
+ return sessionv2.ContainerVerbUnknown, fmt.Errorf("unsupported empty verb type")
+ }
+
+ switch *r {
+ case models.VerbPUT:
+ return sessionv2.ContainerVerbPut, nil
+ case models.VerbDELETE:
+ return sessionv2.ContainerVerbDelete, nil
+ case models.VerbSETEACL:
+ return sessionv2.ContainerVerbSetEACL, nil
+ default:
+ return sessionv2.ContainerVerbUnknown, fmt.Errorf("unsupported verb type: '%s'", *r)
+ }
+}
+
+// ToNativeRule converts models.Rule to appropriate session.ContainerContext.
+func ToNativeRule(r *models.Rule) (*session.ContainerContext, error) {
+ var ctx session.ContainerContext
+
+ verb, err := ToNativeVerb(r.Verb)
+ if err != nil {
+ return nil, err
+ }
+ ctx.ToV2().SetVerb(verb)
+
+ if r.ContainerID == "" {
+ ctx.ApplyTo(nil)
+ } else {
+ var cnrID cid.ID
+ if err = cnrID.Parse(r.ContainerID); err != nil {
+ return nil, fmt.Errorf("couldn't parse container id: %w", err)
+ }
+ ctx.ApplyTo(&cnrID)
+ }
+
+ return &ctx, nil
+}
+
+// ToNativeContainerToken converts models.Bearer to appropriate session.Token.
+func ToNativeContainerToken(b *models.Bearer) (*session.Token, error) {
+ sctx, err := ToNativeRule(b.Container)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't transform rule to native: %w", err)
+ }
+ tok := session.NewToken()
+ tok.SetContext(sctx)
+
+ return tok, nil
+}
+
+// ToNativeRecord converts models.Record to appropriate eacl.Record.
+func ToNativeRecord(r *models.Record) (*eacl.Record, error) {
+ var record eacl.Record
+
+ action, err := ToNativeAction(r.Action)
+ if err != nil {
+ return nil, err
+ }
+ record.SetAction(action)
+
+ operation, err := ToNativeOperation(r.Operation)
+ if err != nil {
+ return nil, err
+ }
+ record.SetOperation(operation)
+
+ for _, filter := range r.Filters {
+ headerType, err := ToNativeHeaderType(filter.HeaderType)
+ if err != nil {
+ return nil, err
+ }
+ matchType, err := ToNativeMatchType(filter.MatchType)
+ if err != nil {
+ return nil, err
+ }
+ if filter.Key == nil || filter.Value == nil {
+ return nil, fmt.Errorf("invalid filter")
+ }
+ record.AddFilter(headerType, matchType, *filter.Key, *filter.Value)
+ }
+
+ targets := make([]eacl.Target, len(r.Targets))
+ for i, target := range r.Targets {
+ trgt, err := ToNativeTarget(target)
+ if err != nil {
+ return nil, err
+ }
+ targets[i] = *trgt
+ }
+ record.SetTargets(targets...)
+
+ return &record, nil
+}
+
+// ToNativeTarget converts models.Target to appropriate eacl.Target.
+func ToNativeTarget(t *models.Target) (*eacl.Target, error) {
+ var target eacl.Target
+
+ role, err := ToNativeRole(t.Role)
+ if err != nil {
+ return nil, err
+ }
+ target.SetRole(role)
+
+ keys := make([][]byte, len(t.Keys))
+ for i, key := range t.Keys {
+ binaryKey, err := hex.DecodeString(key)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't decode target key: %w", err)
+ }
+ keys[i] = binaryKey
+ }
+ target.SetBinaryKeys(keys)
+
+ return &target, nil
+}
+
+// ToNativeObjectToken converts Bearer to appropriate token.BearerToken.
+func ToNativeObjectToken(b *models.Bearer) (*token.BearerToken, error) {
+ var btoken token.BearerToken
+ var table eacl.Table
+
+ for _, rec := range b.Object {
+ record, err := ToNativeRecord(rec)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't transform record to native: %w", err)
+ }
+ table.AddRecord(record)
+ }
+
+ btoken.SetEACLTable(&table)
+
+ return &btoken, nil
+}
diff --git a/handlers/util.go b/handlers/util.go
new file mode 100644
index 0000000..d12d2a0
--- /dev/null
+++ b/handlers/util.go
@@ -0,0 +1,218 @@
+package handlers
+
+import (
+ "context"
+ "encoding/binary"
+ "fmt"
+ "net/http"
+ "strconv"
+ "strings"
+ "time"
+
+ objectv2 "github.com/nspcc-dev/neofs-api-go/v2/object"
+ "github.com/nspcc-dev/neofs-sdk-go/netmap"
+ "github.com/nspcc-dev/neofs-sdk-go/object"
+ "github.com/nspcc-dev/neofs-sdk-go/pool"
+)
+
+// PrmAttributes groups parameters to form attributes from request headers.
+type PrmAttributes struct {
+ DefaultTimestamp bool
+ DefaultFileName string
+}
+
+type epochDurations struct {
+ currentEpoch uint64
+ msPerBlock int64
+ blockPerEpoch uint64
+}
+
+const (
+ UserAttributeHeaderPrefix = "X-Attribute-"
+ SystemAttributePrefix = "__NEOFS__"
+
+ ExpirationDurationAttr = SystemAttributePrefix + "EXPIRATION_DURATION"
+ ExpirationTimestampAttr = SystemAttributePrefix + "EXPIRATION_TIMESTAMP"
+ ExpirationRFC3339Attr = SystemAttributePrefix + "EXPIRATION_RFC3339"
+)
+
+var neofsAttributeHeaderPrefixes = [...]string{"Neofs-", "NEOFS-", "neofs-"}
+
+func systemTranslator(key, prefix string) string {
+ // replace specified prefix with `__NEOFS__`
+ key = strings.Replace(key, prefix, SystemAttributePrefix, 1)
+
+ // replace `-` with `_`
+ key = strings.ReplaceAll(key, "-", "_")
+
+ // replace with uppercase
+ return strings.ToUpper(key)
+}
+
+func filterHeaders(header http.Header) map[string]string {
+ result := make(map[string]string)
+ prefix := UserAttributeHeaderPrefix
+
+ for key, vals := range header {
+ if len(key) == 0 || len(vals) == 0 || len(vals[0]) == 0 {
+ continue
+ }
+ // checks that key has attribute prefix
+ if !strings.HasPrefix(key, prefix) {
+ continue
+ }
+
+ // removing attribute prefix
+ key = strings.TrimPrefix(key, prefix)
+
+ // checks that it's a system NeoFS header
+ for _, system := range neofsAttributeHeaderPrefixes {
+ if strings.HasPrefix(key, system) {
+ key = systemTranslator(key, system)
+ break
+ }
+ }
+
+ // checks that attribute key not empty
+ if len(key) == 0 {
+ continue
+ }
+
+ result[key] = vals[0]
+ }
+
+ return result
+}
+
+// GetObjectAttributes forms object attributes from request headers.
+func GetObjectAttributes(ctx context.Context, header http.Header, pool *pool.Pool, prm PrmAttributes) ([]object.Attribute, error) {
+ filtered := filterHeaders(header)
+ if needParseExpiration(filtered) {
+ epochDuration, err := getEpochDurations(ctx, pool)
+ if err != nil {
+ return nil, fmt.Errorf("could not get epoch durations from network info: %w", err)
+ }
+ if err = prepareExpirationHeader(filtered, epochDuration); err != nil {
+ return nil, fmt.Errorf("could not prepare expiration header: %w", err)
+ }
+ }
+
+ attributes := make([]object.Attribute, 0, len(filtered))
+ // prepares attributes from filtered headers
+ for key, val := range filtered {
+ attribute := object.NewAttribute()
+ attribute.SetKey(key)
+ attribute.SetValue(val)
+ attributes = append(attributes, *attribute)
+ }
+ // sets FileName attribute if it wasn't set from header
+ if _, ok := filtered[object.AttributeFileName]; !ok && prm.DefaultFileName != "" {
+ filename := object.NewAttribute()
+ filename.SetKey(object.AttributeFileName)
+ filename.SetValue(prm.DefaultFileName)
+ attributes = append(attributes, *filename)
+ }
+ // sets Timestamp attribute if it wasn't set from header and enabled by settings
+ if _, ok := filtered[object.AttributeTimestamp]; !ok && prm.DefaultTimestamp {
+ timestamp := object.NewAttribute()
+ timestamp.SetKey(object.AttributeTimestamp)
+ timestamp.SetValue(strconv.FormatInt(time.Now().Unix(), 10))
+ attributes = append(attributes, *timestamp)
+ }
+
+ return attributes, nil
+}
+
+func getEpochDurations(ctx context.Context, p *pool.Pool) (*epochDurations, error) {
+ networkInfo, err := p.NetworkInfo(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ res := &epochDurations{
+ currentEpoch: networkInfo.CurrentEpoch(),
+ msPerBlock: networkInfo.MsPerBlock(),
+ }
+
+ networkInfo.NetworkConfig().IterateParameters(func(parameter *netmap.NetworkParameter) bool {
+ if string(parameter.Key()) == "EpochDuration" {
+ data := make([]byte, 8)
+ copy(data, parameter.Value())
+ res.blockPerEpoch = binary.LittleEndian.Uint64(data)
+ return true
+ }
+ return false
+ })
+ if res.blockPerEpoch == 0 {
+ return nil, fmt.Errorf("not found param: EpochDuration")
+ }
+ return res, nil
+}
+
+func needParseExpiration(headers map[string]string) bool {
+ _, ok1 := headers[ExpirationDurationAttr]
+ _, ok2 := headers[ExpirationRFC3339Attr]
+ _, ok3 := headers[ExpirationTimestampAttr]
+ return ok1 || ok2 || ok3
+}
+
+func prepareExpirationHeader(headers map[string]string, epochDurations *epochDurations) error {
+ expirationInEpoch := headers[objectv2.SysAttributeExpEpoch]
+
+ if timeRFC3339, ok := headers[ExpirationRFC3339Attr]; ok {
+ expTime, err := time.Parse(time.RFC3339, timeRFC3339)
+ if err != nil {
+ return fmt.Errorf("couldn't parse value %s of header %s", timeRFC3339, ExpirationRFC3339Attr)
+ }
+
+ now := time.Now().UTC()
+ if expTime.Before(now) {
+ return fmt.Errorf("value %s of header %s must be in the future", timeRFC3339, ExpirationRFC3339Attr)
+ }
+ updateExpirationHeader(headers, epochDurations, expTime.Sub(now))
+ delete(headers, ExpirationRFC3339Attr)
+ }
+
+ if timestamp, ok := headers[ExpirationTimestampAttr]; ok {
+ value, err := strconv.ParseInt(timestamp, 10, 64)
+ if err != nil {
+ return fmt.Errorf("couldn't parse value %s of header %s", timestamp, ExpirationTimestampAttr)
+ }
+ expTime := time.Unix(value, 0)
+
+ now := time.Now()
+ if expTime.Before(now) {
+ return fmt.Errorf("value %s of header %s must be in the future", timestamp, ExpirationTimestampAttr)
+ }
+ updateExpirationHeader(headers, epochDurations, expTime.Sub(now))
+ delete(headers, ExpirationTimestampAttr)
+ }
+
+ if duration, ok := headers[ExpirationDurationAttr]; ok {
+ expDuration, err := time.ParseDuration(duration)
+ if err != nil {
+ return fmt.Errorf("couldn't parse value %s of header %s", duration, ExpirationDurationAttr)
+ }
+ if expDuration <= 0 {
+ return fmt.Errorf("value %s of header %s must be positive", expDuration, ExpirationDurationAttr)
+ }
+ updateExpirationHeader(headers, epochDurations, expDuration)
+ delete(headers, ExpirationDurationAttr)
+ }
+
+ if expirationInEpoch != "" {
+ headers[objectv2.SysAttributeExpEpoch] = expirationInEpoch
+ }
+
+ return nil
+}
+
+func updateExpirationHeader(headers map[string]string, durations *epochDurations, expDuration time.Duration) {
+ epochDuration := durations.msPerBlock * int64(durations.blockPerEpoch)
+ numEpoch := expDuration.Milliseconds() / epochDuration
+ headers[objectv2.SysAttributeExpEpoch] = strconv.FormatInt(int64(durations.currentEpoch)+numEpoch, 10)
+}
+
+func NewString(val string) *string {
+ return &val
+}
diff --git a/spec/rest.yaml b/spec/rest.yaml
new file mode 100644
index 0000000..15a9ad1
--- /dev/null
+++ b/spec/rest.yaml
@@ -0,0 +1,388 @@
+swagger: "2.0"
+info:
+ title: REST API NeoFS
+ description: REST API NeoFS
+ version: v1
+
+host: localhost:8090
+basePath: /v1
+schemes:
+ - http
+# - https
+
+securityDefinitions:
+ BearerAuth:
+ type: apiKey
+ in: header
+ name: Authorization
+
+security:
+ - BearerAuth: [ ]
+
+paths:
+ /auth:
+ post:
+ operationId: auth
+ summary: Form bearer token to futher requests
+ security: [ ]
+ parameters:
+ - in: header
+ description: Supported operation scope for token
+ name: X-Neofs-Token-Scope
+ type: string
+ enum:
+ - object
+ - container
+ required: true
+ - in: header
+ description: Public key of user
+ name: X-Neofs-Token-Signature-Key
+ type: string
+ required: true
+ - in: header
+ description: Token lifetime in epoch
+ name: X-Neofs-Token-Lifetime
+ type: integer
+ default: 100
+ - in: body
+ name: token
+ required: true
+ description: Bearer token
+ schema:
+ $ref: '#/definitions/Bearer'
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ responses:
+ 200:
+ description: Base64 encoded stable binary marshaled bearer token
+ schema:
+ $ref: '#/definitions/TokenResponse'
+ 400:
+ description: Bad request
+ schema:
+ $ref: '#/definitions/Error'
+
+ /objects:
+ parameters:
+ - in: header
+ name: X-Neofs-Token-Signature
+ description: Base64 encoded signature for bearer token
+ type: string
+ required: true
+ # example:
+ # BGtqMEpzxTabrdIIIDAnL79Cs7bm46+8lsFaMMU+LCKw/ujEjF0r5mVLKixWmxoreuj1E0BXWcqp9d3wGV6Hc9I=
+ - in: header
+ name: X-Neofs-Token-Signature-Key
+ description: Hex encoded the public part of the key that signed the bearer token
+ type: string
+ required: true
+ # example:
+ # 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a
+ put:
+ operationId: putObject
+ summary: Upload object to NeoFS
+ parameters:
+ - in: body
+ required: true
+ name: object
+ description: Object info to upload
+ schema:
+ type: object
+ properties:
+ containerId:
+ type: string
+ fileName:
+ type: string
+ payload:
+ type: string
+ required:
+ - containerId
+ - fileName
+ example:
+ containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
+ fileName: myFile.txt
+ payload: Y29udGVudCBvZiBmaWxl
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ responses:
+ 200:
+ description: Address of uploaded objects
+ schema:
+ type: object
+ properties:
+ objectId:
+ type: string
+ containerId:
+ type: string
+ required:
+ - objectId
+ - containerId
+ example:
+ objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
+ containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
+ 400:
+ description: Bad request
+ schema:
+ $ref: '#/definitions/Error'
+
+ /containers:
+ parameters:
+ - in: header
+ name: X-Neofs-Token-Signature
+ description: Base64 encoded signature for bearer token
+ type: string
+ required: true
+ # example:
+ # BEvF1N0heytTXn1p2ZV3jN8YM25YkG4FxHmPeq2kWP5HeHCAN4cDjONyX6Bh30Ypw6Kfch2nYOfhiL+rClYQJ9Q=
+ - in: header
+ name: X-Neofs-Token-signature-Key
+ description: Hex encoded the public part of the key that signed the bearer token
+ type: string
+ required: true
+ # example:
+ # 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a
+ put:
+ operationId: putContainer
+ summary: Create new container in NeoFS
+ parameters:
+ - in: body
+ name: container
+ required: true
+ description: Container info
+ schema:
+ type: object
+ properties:
+ containerName:
+ type: string
+ placementPolicy:
+ type: string
+ basicAcl:
+ type: string
+ required:
+ - containerName
+ example:
+ containerId: container
+ placementPolicy: "REP 3"
+ basicAcl: public-read-write
+ responses:
+ 200:
+ description: Address of uploaded objects
+ schema:
+ type: object
+ properties:
+ containerId:
+ type: string
+ required:
+ - containerId
+ example:
+ containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
+ 400:
+ description: Bad request
+ schema:
+ $ref: '#/definitions/Error'
+
+ /containers/{containerId}:
+ get:
+ operationId: getContainer
+ summary: Get container by id
+ security: [ ]
+ parameters:
+ - in: path
+ name: containerId
+ type: string
+ required: true
+ description: Base58 encoded container id
+ responses:
+ 200:
+ description: Container info
+ schema:
+ $ref: '#/definitions/ContainerInfo'
+ 400:
+ description: Bad request
+ schema:
+ $ref: '#/definitions/Error'
+
+definitions:
+ Bearer:
+ type: object
+ properties:
+ object:
+ type: array
+ items:
+ $ref: '#/definitions/Record'
+ container:
+ $ref: '#/definitions/Rule'
+ Record:
+ type: object
+ properties:
+ action:
+ $ref: '#/definitions/Action'
+ operation:
+ $ref: '#/definitions/Operation'
+ filters:
+ type: array
+ items:
+ $ref: '#/definitions/Filter'
+ targets:
+ type: array
+ items:
+ $ref: '#/definitions/Target'
+ required:
+ - action
+ - operation
+ - filters
+ - targets
+ example:
+ operation: GET
+ action: ALLOW
+ filters: [ ]
+ targets:
+ - role: OTHERS
+ keys: [ ]
+ Action:
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ Operation:
+ type: string
+ enum:
+ - GET
+ - HEAD
+ - PUT
+ - DELETE
+ - SEARCH
+ - RANGE
+ - RANGEHASH
+ Filter:
+ type: object
+ properties:
+ headerType:
+ $ref: '#/definitions/HeaderType'
+ matchType:
+ $ref: '#/definitions/MatchType'
+ key:
+ type: string
+ value:
+ type: string
+ required:
+ - headerType
+ - matchType
+ - key
+ - value
+ example:
+ headerType: OBJECT
+ matchType: STRING_NOT_EQUAL
+ key: FileName
+ value: myfile
+ HeaderType:
+ type: string
+ enum:
+ - REQUEST
+ - OBJECT
+ - SERVICE
+ MatchType:
+ type: string
+ enum:
+ - STRING_EQUAL
+ - STRING_NOT_EQUAL
+ Target:
+ type: object
+ properties:
+ role:
+ $ref: '#/definitions/Role'
+ keys:
+ type: array
+ items:
+ type: string
+ required:
+ - role
+ - keys
+ example:
+ role: USER
+ keys:
+ - 021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e
+ Role:
+ type: string
+ enum:
+ - USER
+ - SYSTEM
+ - OTHERS
+ Rule:
+ type: object
+ properties:
+ verb:
+ $ref: '#/definitions/Verb'
+ containerId:
+ type: string
+ required:
+ - verb
+ Verb:
+ type: string
+ enum:
+ - PUT
+ - DELETE
+ - SETEACL
+ TokenResponse:
+ type: object
+ properties:
+ type:
+ $ref: '#/definitions/TokenType'
+ token:
+ type: string
+ required:
+ - type
+ - token
+ example:
+ - type: object
+ token: sometoken-todo-add
+ - type: container
+ token: ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==
+ TokenType:
+ type: string
+ enum:
+ - object
+ - container
+ ContainerInfo:
+ type: object
+ properties:
+ containerId:
+ type: string
+ version:
+ type: string
+ ownerId:
+ type: string
+ basicAcl:
+ type: string
+ placementPolicy:
+ type: string
+ attributes:
+ type: array
+ items:
+ $ref: '#/definitions/Attribute'
+ example:
+ containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
+ version: "2.11"
+ ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
+ basicAcl: "0x1fbf9fff"
+ placementPolicy: "REP 2"
+ attribute:
+ - key: Timestamp
+ value: "1648810072"
+ - key: Name
+ value: container
+ Attribute:
+ type: object
+ properties:
+ key:
+ type: string
+ value:
+ type: string
+ Principal:
+ type: string
+ Error:
+ type: string
diff --git a/templates/server-config.yaml b/templates/server-config.yaml
new file mode 100644
index 0000000..4d16b9f
--- /dev/null
+++ b/templates/server-config.yaml
@@ -0,0 +1,45 @@
+layout:
+ application:
+ - name: main
+ source: asset:serverMain
+ target: "{{ joinFilePath .Target \"cmd\" (dasherize (pascalize .Name)) }}-server"
+ file_name: "main.go"
+ - name: embedded_spec
+ source: asset:swaggerJsonEmbed
+ target: "{{ joinFilePath .Target .ServerPackage }}"
+ file_name: "embedded_spec.go"
+ - name: server
+ source: serverServer
+ target: "{{ joinFilePath .Target .ServerPackage }}"
+ file_name: "server.go"
+ - name: server_config
+ source: serverConfig
+ target: "{{ joinFilePath .Target .ServerPackage }}"
+ file_name: "server_config.go"
+ - name: builder
+ source: asset:serverBuilder
+ target: "{{ joinFilePath .Target .ServerPackage .Package }}"
+ file_name: "{{ snakize (pascalize .Name) }}_api.go"
+ - name: doc
+ source: asset:serverDoc
+ target: "{{ joinFilePath .Target .ServerPackage }}"
+ file_name: "doc.go"
+ models:
+ - name: definition
+ source: asset:model
+ target: "{{ joinFilePath .Target .ModelPackage }}"
+ file_name: "{{ (snakize (pascalize .Name)) }}.go"
+ operations:
+ - name: parameters
+ source: asset:serverParameter
+ target: "{{ if gt (len .Tags) 0 }}{{ joinFilePath .Target .ServerPackage .APIPackage .Package }}{{ else }}{{ joinFilePath .Target .ServerPackage .Package }}{{ end }}"
+ file_name: "{{ (snakize (pascalize .Name)) }}_parameters.go"
+ - name: responses
+ source: asset:serverResponses
+ target: "{{ if gt (len .Tags) 0 }}{{ joinFilePath .Target .ServerPackage .APIPackage .Package }}{{ else }}{{ joinFilePath .Target .ServerPackage .Package }}{{ end }}"
+ file_name: "{{ (snakize (pascalize .Name)) }}_responses.go"
+ - name: handler
+ source: asset:serverOperation
+ target: "{{ if gt (len .Tags) 0 }}{{ joinFilePath .Target .ServerPackage .APIPackage .Package }}{{ else }}{{ joinFilePath .Target .ServerPackage .Package }}{{ end }}"
+ file_name: "{{ (snakize (pascalize .Name)) }}.go"
+ operation_groups:
diff --git a/templates/server/config.gotmpl b/templates/server/config.gotmpl
new file mode 100644
index 0000000..2517cdf
--- /dev/null
+++ b/templates/server/config.gotmpl
@@ -0,0 +1,57 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+
+{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }}
+
+
+package {{ .APIPackage }}
+
+import (
+ "time"
+
+ "github.com/spf13/pflag"
+)
+
+const (
+ FlagScheme = "scheme"
+ FlagCleanupTimeout = "cleanup-timeout"
+ FlagGracefulTimeout = "graceful-timeout"
+ FlagMaxHeaderSize = "max-header-size"
+ FlagListenAddress = "listen-address"
+ FlagListenLimit = "listen-limit"
+ FlagKeepAlive = "keep-alive"
+ FlagReadTimeout = "read-timeout"
+ FlagWriteTimeout = "write-timeout"
+ FlagTLSListenAddress = "tls-listen-address"
+ FlagTLSCertificate = "tls-certificate"
+ FlagTLSKey = "tls-key"
+ FlagTLSCa = "tls-ca"
+ FlagTLSListenLimit = "tls-listen-limit"
+ FlagTLSKeepAlive = "tls-keep-alive"
+ FlagTLSReadTimeout = "tls-read-timeout"
+ FlagTLSWriteTimeout = "tls-write-timeout"
+)
+
+// BindDefaultFlag init default flag.
+func BindDefaultFlags(flagSet *pflag.FlagSet) {
+ flagSet.StringSlice(FlagScheme, defaultSchemes, "the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec")
+
+ flagSet.Duration(FlagCleanupTimeout, 10*time.Second, "grace period for which to wait before killing idle connections")
+ flagSet.Duration(FlagGracefulTimeout, 15*time.Second, "grace period for which to wait before shutting down the server")
+ flagSet.Int(FlagMaxHeaderSize, 1000000, "controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body")
+
+ flagSet.String(FlagListenAddress, "localhost:8080", "the IP and port to listen on")
+ flagSet.Int(FlagListenLimit, 0, "limit the number of outstanding requests")
+ flagSet.Duration(FlagKeepAlive, 3*time.Minute, "sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)")
+ flagSet.Duration(FlagReadTimeout, 30*time.Second, "maximum duration before timing out read of the request")
+ flagSet.Duration(FlagWriteTimeout, 30*time.Second, "maximum duration before timing out write of the response")
+
+ flagSet.String(FlagTLSListenAddress, "localhost:8081", "the IP and port to listen on")
+ flagSet.String(FlagTLSCertificate, "", "the certificate file to use for secure connections")
+ flagSet.String(FlagTLSKey, "", "the private key file to use for secure connections (without passphrase)")
+ flagSet.String(FlagTLSCa, "", "the certificate authority certificate file to be used with mutual tls auth")
+ flagSet.Int(FlagTLSListenLimit, 0, "limit the number of outstanding requests")
+ flagSet.Duration(FlagTLSKeepAlive, 3*time.Minute, "sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)")
+ flagSet.Duration(FlagTLSReadTimeout, 30*time.Second, "maximum duration before timing out read of the request")
+ flagSet.Duration(FlagTLSWriteTimeout, 30*time.Second, "maximum duration before timing out write of the response")
+}
diff --git a/templates/server/server.gotmpl b/templates/server/server.gotmpl
new file mode 100644
index 0000000..a4376d3
--- /dev/null
+++ b/templates/server/server.gotmpl
@@ -0,0 +1,502 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+
+{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }}
+
+
+package {{ .APIPackage }}
+
+import (
+ "context"
+ "crypto/tls"
+ "errors"
+ "log"
+ "net"
+ "net/http"
+ "os"
+ "os/signal"
+ "strconv"
+ "sync"
+ "sync/atomic"
+ "syscall"
+ "time"
+
+ "github.com/go-openapi/runtime/flagext"
+ "github.com/go-openapi/swag"
+ "golang.org/x/net/netutil"
+
+ {{ imports .DefaultImports }}
+ {{ imports .Imports }}
+)
+
+const (
+ schemeHTTP = "http"
+ schemeHTTPS = "https"
+)
+
+var defaultSchemes []string
+
+func init() {
+ defaultSchemes = []string{ {{ if (hasInsecure .Schemes) }}
+ schemeHTTP,{{ end}}{{ if (hasSecure .Schemes) }}
+ schemeHTTPS,{{ end }}
+ }
+}
+
+type ServerConfig struct {
+ EnabledListeners []string
+ CleanupTimeout time.Duration
+ GracefulTimeout time.Duration
+ MaxHeaderSize int
+
+ ListenAddress string
+ ListenLimit int
+ KeepAlive time.Duration
+ ReadTimeout time.Duration
+ WriteTimeout time.Duration
+
+ TLSListenAddress string
+ TLSListenLimit int
+ TLSKeepAlive time.Duration
+ TLSReadTimeout time.Duration
+ TLSWriteTimeout time.Duration
+ TLSCertificate string
+ TLSCertificateKey string
+ TLSCACertificate string
+}
+
+// NewServer creates a new api {{ humanize .Name }} server but does not configure it
+func NewServer(api *{{ .APIPackageAlias }}.{{ pascalize .Name }}API, cfg *ServerConfig) *Server {
+ s := new(Server)
+ s.EnabledListeners = cfg.EnabledListeners
+ s.CleanupTimeout = cfg.CleanupTimeout
+ s.GracefulTimeout = cfg.GracefulTimeout
+ s.MaxHeaderSize = cfg.MaxHeaderSize
+ s.ListenAddress = cfg.ListenAddress
+ s.ListenLimit = cfg.ListenLimit
+ s.KeepAlive = cfg.KeepAlive
+ s.ReadTimeout = cfg.ReadTimeout
+ s.WriteTimeout = cfg.WriteTimeout
+ s.TLSListenAddress = cfg.TLSListenAddress
+ if len(s.TLSListenAddress) == 0 {
+ s.TLSListenAddress = s.ListenAddress
+ }
+ s.TLSCertificate = cfg.TLSCertificate
+ s.TLSCertificateKey = cfg.TLSCertificateKey
+ s.TLSCACertificate = cfg.TLSCACertificate
+ s.TLSListenLimit = cfg.TLSListenLimit
+ s.TLSKeepAlive = cfg.TLSKeepAlive
+ s.TLSReadTimeout = cfg.TLSReadTimeout
+ s.TLSWriteTimeout = cfg.TLSWriteTimeout
+ s.shutdown = make(chan struct{})
+ s.api = api
+ s.interrupt = make(chan os.Signal, 1)
+ return s
+}
+
+// ConfigureAPI configures the API and handlers.
+func (s *Server) ConfigureAPI(fn func (*{{ .APIPackageAlias }}.{{ pascalize .Name }}API) http.Handler) {
+ if s.api != nil {
+ s.handler = fn(s.api)
+ }
+}
+
+// Server for the {{ humanize .Name }} API
+type Server struct {
+ EnabledListeners []string
+ CleanupTimeout time.Duration
+ GracefulTimeout time.Duration
+ MaxHeaderSize int
+
+ ListenAddress string
+ ListenLimit int
+ KeepAlive time.Duration
+ ReadTimeout time.Duration
+ WriteTimeout time.Duration
+ httpServerL net.Listener
+
+ TLSListenAddress string
+ TLSCertificate string
+ TLSCertificateKey string
+ TLSCACertificate string
+ TLSListenLimit int
+ TLSKeepAlive time.Duration
+ TLSReadTimeout time.Duration
+ TLSWriteTimeout time.Duration
+ httpsServerL net.Listener
+
+ cfgTLSFn func (tlsConfig *tls.Config)
+ cfgServerFn func(s *http.Server, scheme, addr string)
+
+ api *{{ .APIPackageAlias }}.{{ pascalize .Name }}API
+ handler http.Handler
+ hasListeners bool
+ shutdown chan struct{}
+ shuttingDown int32
+ interrupted bool
+ interrupt chan os.Signal
+}
+
+// Logf logs message either via defined user logger or via system one if no user logger is defined.
+func (s *Server) Logf(f string, args ...interface{}) {
+ if s.api != nil && s.api.Logger != nil {
+ s.api.Logger(f, args...)
+ } else {
+ log.Printf(f, args...)
+ }
+}
+
+// Fatalf logs message either via defined user logger or via system one if no user logger is defined.
+// Exits with non-zero status after printing
+func (s *Server) Fatalf(f string, args ...interface{}) {
+ if s.api != nil && s.api.Logger != nil {
+ s.api.Logger(f, args...)
+ os.Exit(1)
+ } else {
+ log.Fatalf(f, args...)
+ }
+}
+
+func (s *Server) hasScheme(scheme string) bool {
+ schemes := s.EnabledListeners
+ if len(schemes) == 0 {
+ schemes = defaultSchemes
+ }
+
+ for _, v := range schemes {
+ if v == scheme {
+ return true
+ }
+ }
+ return false
+}
+
+// Serve the api
+func (s *Server) Serve() (err error) {
+ if !s.hasListeners {
+ if err = s.Listen(); err != nil {
+ return err
+ }
+ }
+
+ // set default handler, if none is set
+ if s.handler == nil {
+ if s.api == nil {
+ return errors.New("can't create the default handler, as no api is set")
+ }
+
+ s.SetHandler(s.api.Serve(nil))
+ }
+
+ wg := new(sync.WaitGroup)
+ once := new(sync.Once)
+ signalNotify(s.interrupt)
+ go handleInterrupt(once, s)
+
+ servers := []*http.Server{}
+
+ if s.hasScheme(schemeHTTP) {
+ httpServer := new(http.Server)
+ httpServer.MaxHeaderBytes = s.MaxHeaderSize
+ httpServer.ReadTimeout = s.ReadTimeout
+ httpServer.WriteTimeout = s.WriteTimeout
+ httpServer.SetKeepAlivesEnabled(int64(s.KeepAlive) > 0)
+ if s.ListenLimit > 0 {
+ s.httpServerL = netutil.LimitListener(s.httpServerL, s.ListenLimit)
+ }
+
+ if int64(s.CleanupTimeout) > 0 {
+ httpServer.IdleTimeout = s.CleanupTimeout
+ }
+
+ httpServer.Handler = s.handler
+
+ if s.cfgServerFn !=nil {
+ s.cfgServerFn(httpServer, "http", s.httpServerL.Addr().String())
+ }
+
+ servers = append(servers, httpServer)
+ wg.Add(1)
+ s.Logf("Serving {{ humanize .Name }} at http://%s", s.httpServerL.Addr())
+ go func(l net.Listener) {
+ defer wg.Done()
+ if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed {
+ s.Fatalf("%v", err)
+ }
+ s.Logf("Stopped serving {{ humanize .Name }} at http://%s", l.Addr())
+ }(s.httpServerL)
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ httpsServer := new(http.Server)
+ httpsServer.MaxHeaderBytes = s.MaxHeaderSize
+ httpsServer.ReadTimeout = s.TLSReadTimeout
+ httpsServer.WriteTimeout = s.TLSWriteTimeout
+ httpsServer.SetKeepAlivesEnabled(int64(s.TLSKeepAlive) > 0)
+ if s.TLSListenLimit > 0 {
+ s.httpsServerL = netutil.LimitListener(s.httpsServerL, s.TLSListenLimit)
+ }
+ if int64(s.CleanupTimeout) > 0 {
+ httpsServer.IdleTimeout = s.CleanupTimeout
+ }
+ httpsServer.Handler = s.handler
+
+ // Inspired by https://blog.bracebin.com/achieving-perfect-ssl-labs-score-with-go
+ httpsServer.TLSConfig = &tls.Config{
+ // Causes servers to use Go's default ciphersuite preferences,
+ // which are tuned to avoid attacks. Does nothing on clients.
+ PreferServerCipherSuites: true,
+ // Only use curves which have assembly implementations
+ // https://github.com/golang/go/tree/master/src/crypto/elliptic
+ CurvePreferences: []tls.CurveID{tls.CurveP256},
+ {{- if .UseModernMode }}
+ // Use modern tls mode https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
+ NextProtos: []string{"h2", "http/1.1"},
+ // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols
+ MinVersion: tls.VersionTLS12,
+ // These ciphersuites support Forward Secrecy: https://en.wikipedia.org/wiki/Forward_secrecy
+ CipherSuites: []uint16{
+ tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+ tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+ tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+ tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
+ tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
+ },
+ {{- end }}
+ }
+
+ // build standard config from server options
+ if s.TLSCertificate != "" && s.TLSCertificateKey != "" {
+ httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1)
+ httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(s.TLSCertificate, s.TLSCertificateKey)
+ if err != nil {
+ return err
+ }
+ }
+
+ if s.TLSCACertificate != "" {
+ // include specified CA certificate
+ caCert, caCertErr := ioutil.ReadFile(s.TLSCACertificate)
+ if caCertErr != nil {
+ return caCertErr
+ }
+ caCertPool := x509.NewCertPool()
+ ok := caCertPool.AppendCertsFromPEM(caCert)
+ if !ok {
+ return fmt.Errorf("cannot parse CA certificate")
+ }
+ httpsServer.TLSConfig.ClientCAs = caCertPool
+ httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert
+ }
+
+ // call custom TLS configurator
+ if s.cfgTLSFn != nil {
+ s.cfgTLSFn(httpsServer.TLSConfig)
+ }
+
+ if len(httpsServer.TLSConfig.Certificates) == 0 && httpsServer.TLSConfig.GetCertificate == nil {
+ // after standard and custom config are passed, this ends up with no certificate
+ if s.TLSCertificate == "" {
+ if s.TLSCertificateKey == "" {
+ s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified")
+ }
+ s.Fatalf("the required flag `--tls-certificate` was not specified")
+ }
+ if s.TLSCertificateKey == "" {
+ s.Fatalf("the required flag `--tls-key` was not specified")
+ }
+ // this happens with a wrong custom TLS configurator
+ s.Fatalf("no certificate was configured for TLS")
+ }
+
+ if s.cfgServerFn !=nil {
+ s.cfgServerFn(httpsServer, "https", s.httpsServerL.Addr().String())
+ }
+
+ servers = append(servers, httpsServer)
+ wg.Add(1)
+ s.Logf("Serving {{ humanize .Name }} at https://%s", s.httpsServerL.Addr())
+ go func(l net.Listener) {
+ defer wg.Done()
+ if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed {
+ s.Fatalf("%v", err)
+ }
+ s.Logf("Stopped serving {{ humanize .Name }} at https://%s", l.Addr())
+ }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig))
+ }
+
+ wg.Add(1)
+ go s.handleShutdown(wg, &servers)
+
+ wg.Wait()
+ return nil
+}
+
+// The TLS configuration before HTTPS server starts.
+func (s *Server) ConfigureTLS(cfgTLS func (tlsConfig *tls.Config)) {
+ s.cfgTLSFn = cfgTLS
+}
+
+// As soon as server is initialized but not run yet, this function will be called.
+// If you need to modify a config, store server instance to stop it individually later, this is the place.
+// This function can be called multiple times, depending on the number of serving schemes.
+// scheme value will be set accordingly: "http", "https" or "unix".
+func (s *Server) ConfigureServer(cfgServer func (s *http.Server, scheme, addr string)) {
+ s.cfgServerFn = cfgServer
+}
+
+// Listen creates the listeners for the server
+func (s *Server) Listen() error {
+ if s.hasListeners { // already done this
+ return nil
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ // Use http listen limit if https listen limit wasn't defined
+ if s.TLSListenLimit == 0 {
+ s.TLSListenLimit = s.ListenLimit
+ }
+ // Use http tcp keep alive if https tcp keep alive wasn't defined
+ if int64(s.TLSKeepAlive) == 0 {
+ s.TLSKeepAlive = s.KeepAlive
+ }
+ // Use http read timeout if https read timeout wasn't defined
+ if int64(s.TLSReadTimeout) == 0 {
+ s.TLSReadTimeout = s.ReadTimeout
+ }
+ // Use http write timeout if https write timeout wasn't defined
+ if int64(s.TLSWriteTimeout) == 0 {
+ s.TLSWriteTimeout = s.WriteTimeout
+ }
+ }
+
+ if s.hasScheme(schemeHTTP) {
+ listener, err := net.Listen("tcp", s.ListenAddress)
+ if err != nil {
+ return err
+ }
+
+ _, _, err = swag.SplitHostPort(listener.Addr().String())
+ if err != nil {
+ return err
+ }
+ s.httpServerL = listener
+ }
+
+ if s.hasScheme(schemeHTTPS) {
+ tlsListener, err := net.Listen("tcp", s.TLSListenAddress)
+ if err != nil {
+ return err
+ }
+
+ _, _, err = swag.SplitHostPort(tlsListener.Addr().String())
+ if err != nil {
+ return err
+ }
+ s.httpsServerL = tlsListener
+ }
+
+ s.hasListeners = true
+ return nil
+}
+
+// Shutdown server and clean up resources
+func (s *Server) Shutdown() error {
+ if atomic.CompareAndSwapInt32(&s.shuttingDown, 0, 1) {
+ close(s.shutdown)
+ }
+ return nil
+}
+
+func (s *Server) handleShutdown(wg *sync.WaitGroup, serversPtr *[]*http.Server) {
+ // wg.Done must occur last, after s.api.ServerShutdown()
+ // (to preserve old behaviour)
+ defer wg.Done()
+
+ <-s.shutdown
+
+ servers := *serversPtr
+
+ ctx, cancel := context.WithTimeout(context.TODO(), s.GracefulTimeout)
+ defer cancel()
+
+ // first execute the pre-shutdown hook
+ s.api.PreServerShutdown()
+
+ shutdownChan := make(chan bool)
+ for i := range servers {
+ server := servers[i]
+ go func() {
+ var success bool
+ defer func() {
+ shutdownChan <- success
+ }()
+ if err := server.Shutdown(ctx); err != nil {
+ // Error from closing listeners, or context timeout:
+ s.Logf("HTTP server Shutdown: %v", err)
+ } else {
+ success = true
+ }
+ }()
+ }
+
+ // Wait until all listeners have successfully shut down before calling ServerShutdown
+ success := true
+ for range servers {
+ success = success && <-shutdownChan
+ }
+ if success {
+ s.api.ServerShutdown()
+ }
+}
+
+// GetHandler returns a handler useful for testing
+func (s *Server) GetHandler() http.Handler {
+ return s.handler
+}
+
+// SetHandler allows for setting a http handler on this server
+func (s *Server) SetHandler(handler http.Handler) {
+ s.handler = handler
+}
+
+// HTTPListener returns the http listener
+func (s *Server) HTTPListener() (net.Listener, error) {
+ if !s.hasListeners {
+ if err := s.Listen(); err != nil {
+ return nil, err
+ }
+ }
+ return s.httpServerL, nil
+}
+
+// TLSListener returns the https listener
+func (s *Server) TLSListener() (net.Listener, error) {
+ if !s.hasListeners {
+ if err := s.Listen(); err != nil {
+ return nil, err
+ }
+ }
+ return s.httpsServerL, nil
+}
+
+func handleInterrupt(once *sync.Once, s *Server) {
+ once.Do(func(){
+ for range s.interrupt {
+ if s.interrupted {
+ s.Logf("Server already shutting down")
+ continue
+ }
+ s.interrupted = true
+ s.Logf("Shutting down... ")
+ if err := s.Shutdown(); err != nil {
+ s.Logf("HTTP server Shutdown: %v", err)
+ }
+ }
+ })
+}
+
+func signalNotify(interrupt chan<- os.Signal) {
+ signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM)
+}