├── noop.go ├── storages.go ├── fs ├── fs_test.go └── fs.go ├── LICENSE ├── gcs ├── gcs_test.go └── gcs.go ├── s3 ├── s3_test.go └── s3.go ├── go.mod ├── README.md ├── .golangci.yml └── go.sum /noop.go: -------------------------------------------------------------------------------- 1 | package gostorages 2 | 3 | import ( 4 | "context" 5 | "io" 6 | ) 7 | 8 | // NewNoop returns a new no-op storage. 9 | func NewNoop() Storage { 10 | return noop{} 11 | } 12 | 13 | type noop struct{} 14 | 15 | func (noop) Save(ctx context.Context, content io.Reader, path string) error { return nil } 16 | func (noop) Stat(ctx context.Context, path string) (*Stat, error) { return nil, nil } 17 | func (noop) Open(ctx context.Context, path string) (io.ReadCloser, error) { return nil, nil } 18 | func (noop) OpenWithStat(ctx context.Context, path string) (io.ReadCloser, *Stat, error) { 19 | return nil, nil, nil 20 | } 21 | func (noop) Delete(ctx context.Context, path string) error { return nil } 22 | -------------------------------------------------------------------------------- /storages.go: -------------------------------------------------------------------------------- 1 | package gostorages 2 | 3 | import ( 4 | "context" 5 | "errors" 6 | "io" 7 | "time" 8 | ) 9 | 10 | // Storage is the storage interface. 11 | type Storage interface { 12 | Save(ctx context.Context, content io.Reader, path string) error 13 | Stat(ctx context.Context, path string) (*Stat, error) 14 | Open(ctx context.Context, path string) (io.ReadCloser, error) 15 | OpenWithStat(ctx context.Context, path string) (io.ReadCloser, *Stat, error) 16 | Delete(ctx context.Context, path string) error 17 | } 18 | 19 | // Stat contains metadata about content stored in storage. 20 | type Stat struct { 21 | ModifiedTime time.Time 22 | Size int64 23 | } 24 | 25 | // ErrNotExist is a sentinel error returned by the Open and the Stat methods. 26 | var ErrNotExist = errors.New("does not exist") 27 | -------------------------------------------------------------------------------- /fs/fs_test.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "errors" 7 | "io/ioutil" 8 | "testing" 9 | "time" 10 | 11 | "github.com/ulule/gostorages" 12 | ) 13 | 14 | func Test(t *testing.T) { 15 | dir, err := ioutil.TempDir("", "gostorages-") 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | storage := NewStorage(Config{Root: dir}) 20 | ctx := context.Background() 21 | 22 | if _, err = storage.Stat(ctx, "doesnotexist"); !errors.Is(err, gostorages.ErrNotExist) { 23 | t.Errorf("expected not exists, got %v", err) 24 | } 25 | 26 | before := time.Now() 27 | if err := storage.Save(ctx, bytes.NewBufferString("hello"), "world"); err != nil { 28 | t.Fatal(err) 29 | } 30 | now := time.Now() 31 | 32 | stat, err := storage.Stat(ctx, "world") 33 | if err != nil { 34 | t.Errorf("unexpected error %v", err) 35 | } 36 | if stat.Size != 5 { 37 | t.Errorf("expected size to be %d, got %d", 5, stat.Size) 38 | } 39 | if stat.ModifiedTime.Before(before) { 40 | t.Errorf("expected modtime to be after %v, got %v", before, stat.ModifiedTime) 41 | } 42 | if stat.ModifiedTime.After(now) { 43 | t.Errorf("expected modtime to be before %v, got %v", now, stat.ModifiedTime) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2017 Ulule 4 | Copyright (c) 2014 Florent Messa 5 | Copyright (c) 2014 Asdine El Hrychy 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /gcs/gcs_test.go: -------------------------------------------------------------------------------- 1 | package gcs 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "errors" 7 | "os" 8 | "testing" 9 | "time" 10 | 11 | "github.com/ulule/gostorages" 12 | ) 13 | 14 | func Test(t *testing.T) { 15 | credFile := os.Getenv("CRED_FILE") 16 | bucket := os.Getenv("GCP_BUCKET") 17 | 18 | if credFile == "" || bucket == "" { 19 | t.SkipNow() 20 | } 21 | ctx := context.Background() 22 | storage, err := NewStorage(ctx, credFile, bucket) 23 | if err != nil { 24 | t.Fatal(err) 25 | } 26 | 27 | if _, err = storage.Stat(ctx, "doesnotexist"); !errors.Is(err, gostorages.ErrNotExist) { 28 | t.Errorf("expected not exists, got %v", err) 29 | } 30 | 31 | before := time.Now() 32 | if err := storage.Save(ctx, bytes.NewBufferString("hello"), "world"); err != nil { 33 | t.Fatal(err) 34 | } 35 | now := time.Now() 36 | 37 | stat, err := storage.Stat(ctx, "world") 38 | if err != nil { 39 | t.Errorf("unexpected error %v", err) 40 | } 41 | if stat.Size != 5 { 42 | t.Errorf("expected size to be %d, got %d", 5, stat.Size) 43 | } 44 | if stat.ModifiedTime.Before(before) { 45 | t.Errorf("expected modtime to be after %v, got %v", before, stat.ModifiedTime) 46 | } 47 | if stat.ModifiedTime.After(now) { 48 | t.Errorf("expected modtime to be before %v, got %v", now, stat.ModifiedTime) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /s3/s3_test.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "errors" 7 | "os" 8 | "testing" 9 | "time" 10 | 11 | "github.com/ulule/gostorages" 12 | ) 13 | 14 | var ( 15 | accessKeyID = os.Getenv("ACCESS_KEY_ID") 16 | secretAccessKey = os.Getenv("SECRET_ACCESS_KEY") 17 | region = os.Getenv("AWS_REGION") 18 | bucket = os.Getenv("S3_BUCKET") 19 | ) 20 | 21 | func Test(t *testing.T) { 22 | if accessKeyID == "" || 23 | secretAccessKey == "" || 24 | region == "" || 25 | bucket == "" { 26 | t.SkipNow() 27 | } 28 | storage, err := NewStorage(Config{ 29 | AccessKeyID: accessKeyID, 30 | SecretAccessKey: secretAccessKey, 31 | Region: region, 32 | Bucket: bucket, 33 | }) 34 | if err != nil { 35 | t.Fatal(err) 36 | } 37 | ctx := context.Background() 38 | 39 | if _, err = storage.Stat(ctx, "doesnotexist"); !errors.Is(err, gostorages.ErrNotExist) { 40 | t.Errorf("expected not exists, got %v", err) 41 | } 42 | 43 | before := time.Now() 44 | if err := storage.Save(ctx, bytes.NewBufferString("hello"), "world"); err != nil { 45 | t.Fatal(err) 46 | } 47 | now := time.Now().Add(time.Second) 48 | 49 | stat, err := storage.Stat(ctx, "world") 50 | if err != nil { 51 | t.Errorf("unexpected error %v", err) 52 | } 53 | if stat.Size != 5 { 54 | t.Errorf("expected size to be %d, got %d", 5, stat.Size) 55 | } 56 | if stat.ModifiedTime.Before(before) { 57 | t.Errorf("expected modtime to be after %v, got %v", before, stat.ModifiedTime) 58 | } 59 | if stat.ModifiedTime.After(now) { 60 | t.Errorf("expected modtime to be before %v, got %v", now, stat.ModifiedTime) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/ulule/gostorages 2 | 3 | go 1.18 4 | 5 | require ( 6 | cloud.google.com/go/storage v1.3.0 7 | github.com/aws/aws-sdk-go-v2 v1.21.2 8 | github.com/aws/aws-sdk-go-v2/credentials v1.13.43 9 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 10 | github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 11 | github.com/pkg/errors v0.9.1 12 | google.golang.org/api v0.14.0 13 | ) 14 | 15 | require ( 16 | cloud.google.com/go v0.46.3 // indirect 17 | github.com/BurntSushi/toml v0.3.1 // indirect 18 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 // indirect 19 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect 20 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect 21 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 // indirect 22 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 // indirect 23 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 // indirect 24 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect 25 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 // indirect 26 | github.com/aws/smithy-go v1.15.0 // indirect 27 | github.com/golang/protobuf v1.3.2 // indirect 28 | github.com/googleapis/gax-go/v2 v2.0.5 // indirect 29 | github.com/hashicorp/golang-lru v0.5.1 // indirect 30 | github.com/jmespath/go-jmespath v0.4.0 // indirect 31 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 // indirect 32 | go.opencensus.io v0.22.0 // indirect 33 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect 34 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect 35 | golang.org/x/mod v0.17.0 // indirect 36 | golang.org/x/net v0.36.0 // indirect 37 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect 38 | golang.org/x/sync v0.11.0 // indirect 39 | golang.org/x/sys v0.30.0 // indirect 40 | golang.org/x/text v0.22.0 // indirect 41 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect 42 | google.golang.org/appengine v1.6.1 // indirect 43 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect 44 | google.golang.org/grpc v1.21.1 // indirect 45 | honnef.co/go/tools v0.0.1-2019.2.3 // indirect 46 | ) 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | gostorages 2 | ========== 3 | 4 | A unified interface to manipulate storage backends in Go. 5 | 6 | gostorages is used in [picfit](https://github.com/thoas/picfit) to allow us switching storage backends. 7 | 8 | The following backends are supported: 9 | 10 | * Amazon S3 11 | * Google Cloud Storage 12 | * File system 13 | 14 | Usage 15 | ===== 16 | 17 | It offers you a small API to manipulate your files on multiple storages. 18 | 19 | ```go 20 | // Storage is the storage interface. 21 | type Storage interface { 22 | Save(ctx context.Context, content io.Reader, path string) error 23 | Stat(ctx context.Context, path string) (*Stat, error) 24 | Open(ctx context.Context, path string) (io.ReadCloser, error) 25 | Delete(ctx context.Context, path string) error 26 | } 27 | 28 | // Stat contains metadata about content stored in storage. 29 | type Stat struct { 30 | ModifiedTime time.Time 31 | Size int64 32 | } 33 | 34 | // ErrNotExist is a sentinel error returned by the Stat method. 35 | var ErrNotExist = errors.New("does not exist") 36 | ``` 37 | 38 | If you are migrating from a File system storage to an Amazon S3, you don't need to migrate all your methods anymore! 39 | 40 | Be lazy again! 41 | 42 | File system 43 | ----------- 44 | 45 | The file system backend requires a root directory. 46 | 47 | ```go 48 | dir := os.TempDir() 49 | storage := fs.NewStorage(fs.Config{Root: dir}) 50 | 51 | // Saving a file named test 52 | storage.Save(ctx, strings.NewReader("(╯°□°)╯︵ ┻━┻"), "test") 53 | 54 | // Deleting the new file on the storage 55 | storage.Delete(ctx, "test") 56 | ``` 57 | 58 | 59 | Amazon S3 60 | --------- 61 | 62 | The S3 backend requires AWS credentials, an AWS region and a S3 bucket name. 63 | 64 | ```go 65 | storage, _ := s3.NewStorage(s3.Config{ 66 | AccessKeyID: accessKeyID, 67 | SecretAccessKey: secretAccessKey, 68 | Region: region, 69 | Bucket: bucket, 70 | }) 71 | 72 | // Saving a file named test 73 | storage.Save(ctx, strings.NewReader("(>_<)"), "test") 74 | 75 | // Deleting the new file on the storage 76 | storage.Delete(ctx, "test") 77 | ``` 78 | 79 | Roadmap 80 | ======= 81 | 82 | See [issues](https://github.com/ulule/gostorages/issues). 83 | 84 | Don't hesitate to send patch or improvements. -------------------------------------------------------------------------------- /fs/fs.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "context" 5 | "github.com/pkg/errors" 6 | "github.com/ulule/gostorages" 7 | "io" 8 | "os" 9 | "path/filepath" 10 | ) 11 | 12 | // Storage is a filesystem storage. 13 | type Storage struct { 14 | root string 15 | } 16 | 17 | // NewStorage returns a new filesystem storage. 18 | func NewStorage(cfg Config) *Storage { 19 | return &Storage{root: cfg.Root} 20 | } 21 | 22 | // Config is the configuration for Storage. 23 | type Config struct { 24 | Root string 25 | } 26 | 27 | func (fs *Storage) abs(path string) string { 28 | return filepath.Join(fs.root, path) 29 | } 30 | 31 | // Save saves content to path. 32 | func (fs *Storage) Save(ctx context.Context, content io.Reader, path string) error { 33 | abs := fs.abs(path) 34 | if err := os.MkdirAll(filepath.Dir(abs), 0755); err != nil { 35 | return errors.WithStack(err) 36 | } 37 | 38 | w, err := os.Create(abs) 39 | if err != nil { 40 | return errors.WithStack(err) 41 | } 42 | defer w.Close() 43 | 44 | if _, err := io.Copy(w, content); err != nil { 45 | return errors.WithStack(err) 46 | } 47 | return nil 48 | } 49 | 50 | // Stat returns path metadata. 51 | func (fs *Storage) Stat(ctx context.Context, path string) (*gostorages.Stat, error) { 52 | fi, err := os.Stat(fs.abs(path)) 53 | if os.IsNotExist(err) { 54 | return nil, gostorages.ErrNotExist 55 | } else if err != nil { 56 | return nil, errors.WithStack(err) 57 | } 58 | 59 | return &gostorages.Stat{ 60 | ModifiedTime: fi.ModTime(), 61 | Size: fi.Size(), 62 | }, nil 63 | } 64 | 65 | // Open opens path for reading. 66 | func (fs *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error) { 67 | f, err := os.Open(fs.abs(path)) 68 | if os.IsNotExist(err) { 69 | return nil, gostorages.ErrNotExist 70 | } 71 | return f, errors.WithStack(err) 72 | } 73 | 74 | // Delete deletes path. 75 | func (fs *Storage) Delete(ctx context.Context, path string) error { 76 | return os.Remove(fs.abs(path)) 77 | } 78 | 79 | // OpenWithStat opens path for reading with file stats. 80 | func (fs *Storage) OpenWithStat(ctx context.Context, path string) (io.ReadCloser, *gostorages.Stat, error) { 81 | f, err := os.Open(fs.abs(path)) 82 | if os.IsNotExist(err) { 83 | return nil, nil, gostorages.ErrNotExist 84 | } 85 | stat, err := f.Stat() 86 | if err != nil { 87 | return nil, nil, errors.WithStack(err) 88 | } 89 | return f, &gostorages.Stat{ 90 | ModifiedTime: stat.ModTime(), 91 | Size: stat.Size(), 92 | }, nil 93 | } 94 | -------------------------------------------------------------------------------- /gcs/gcs.go: -------------------------------------------------------------------------------- 1 | package gcs 2 | 3 | import ( 4 | "cloud.google.com/go/storage" 5 | "context" 6 | "github.com/pkg/errors" 7 | "github.com/ulule/gostorages" 8 | "google.golang.org/api/option" 9 | "io" 10 | "mime" 11 | "path/filepath" 12 | ) 13 | 14 | // Storage is a gcs storage. 15 | type Storage struct { 16 | bucket *storage.BucketHandle 17 | } 18 | 19 | // NewStorage returns a new Storage. 20 | func NewStorage(ctx context.Context, credentialsFile, bucket string) (*Storage, error) { 21 | client, err := storage.NewClient(ctx, option.WithCredentialsFile(credentialsFile)) 22 | if err != nil { 23 | return nil, errors.WithStack(err) 24 | } 25 | 26 | return &Storage{bucket: client.Bucket(bucket)}, nil 27 | } 28 | 29 | // Save saves content to path. 30 | func (g *Storage) Save(ctx context.Context, content io.Reader, path string) (rerr error) { 31 | w := g.bucket.Object(path).NewWriter(ctx) 32 | w.ContentType = mime.TypeByExtension(filepath.Ext(path)) 33 | 34 | defer func() { 35 | if err := w.Close(); err != nil { 36 | rerr = err 37 | } 38 | }() 39 | 40 | if _, err := io.Copy(w, content); err != nil { 41 | return errors.WithStack(err) 42 | } 43 | 44 | return errors.WithStack(rerr) 45 | } 46 | 47 | // Stat returns path metadata. 48 | func (g *Storage) Stat(ctx context.Context, path string) (*gostorages.Stat, error) { 49 | attrs, err := g.bucket.Object(path).Attrs(ctx) 50 | if errors.Is(err, storage.ErrObjectNotExist) { 51 | return nil, gostorages.ErrNotExist 52 | } else if err != nil { 53 | return nil, err 54 | } 55 | 56 | return &gostorages.Stat{ 57 | ModifiedTime: attrs.Updated, 58 | Size: attrs.Size, 59 | }, nil 60 | } 61 | 62 | // Open opens path for reading. 63 | func (g *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error) { 64 | r, err := g.bucket.Object(path).NewReader(ctx) 65 | if errors.Is(err, storage.ErrObjectNotExist) { 66 | return nil, gostorages.ErrNotExist 67 | } 68 | 69 | return r, errors.WithStack(err) 70 | } 71 | 72 | // Delete deletes path. 73 | func (g *Storage) Delete(ctx context.Context, path string) error { 74 | return errors.WithStack(g.bucket.Object(path).Delete(ctx)) 75 | } 76 | 77 | // OpenWithStat opens path for reading with file stats. 78 | func (g *Storage) OpenWithStat(ctx context.Context, path string) (io.ReadCloser, *gostorages.Stat, error) { 79 | r, err := g.bucket.Object(path).NewReader(ctx) 80 | if errors.Is(err, storage.ErrObjectNotExist) { 81 | return nil, nil, gostorages.ErrNotExist 82 | } 83 | return r, &gostorages.Stat{ 84 | ModifiedTime: r.Attrs.LastModified, 85 | Size: r.Attrs.Size, 86 | }, errors.WithStack(err) 87 | } 88 | -------------------------------------------------------------------------------- /s3/s3.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "github.com/aws/aws-sdk-go-v2/aws" 7 | "github.com/aws/aws-sdk-go-v2/credentials" 8 | "github.com/aws/aws-sdk-go-v2/feature/s3/manager" 9 | "github.com/aws/aws-sdk-go-v2/service/s3" 10 | "github.com/aws/aws-sdk-go-v2/service/s3/types" 11 | "github.com/pkg/errors" 12 | "github.com/ulule/gostorages" 13 | "io" 14 | "mime" 15 | "net/http" 16 | "path/filepath" 17 | ) 18 | 19 | type CustomAPIHTTPClient interface { 20 | Do(*http.Request) (*http.Response, error) 21 | } 22 | 23 | func withUploaderConcurrency(concurrency int64) func(uploader *manager.Uploader) { 24 | return func(uploader *manager.Uploader) { 25 | uploader.Concurrency = int(concurrency) 26 | } 27 | } 28 | 29 | // Storage is a s3 storage. 30 | type Storage struct { 31 | bucket string 32 | s3 *s3.Client 33 | uploader *manager.Uploader 34 | } 35 | 36 | // NewStorage returns a new Storage. 37 | func NewStorage(cfg Config) (*Storage, error) { 38 | awscfg := aws.Config{ 39 | Credentials: credentials.NewStaticCredentialsProvider(cfg.AccessKeyID, cfg.SecretAccessKey, ""), 40 | Region: *aws.String(cfg.Region), 41 | } 42 | var uploaderopts []func(uploader *manager.Uploader) 43 | client := s3.NewFromConfig(awscfg, func(o *s3.Options) { 44 | if cfg.Endpoint != "" { 45 | o.BaseEndpoint = aws.String(cfg.Endpoint) 46 | } 47 | if cfg.CustomHTTPClient != nil { 48 | o.HTTPClient = cfg.CustomHTTPClient 49 | } 50 | }) 51 | 52 | if cfg.UploadConcurrency != nil { 53 | uploaderopts = append(uploaderopts, withUploaderConcurrency(*cfg.UploadConcurrency)) 54 | } 55 | return &Storage{ 56 | bucket: cfg.Bucket, 57 | s3: client, 58 | uploader: manager.NewUploader(client, uploaderopts...), 59 | }, nil 60 | } 61 | 62 | // Config is the configuration for Storage. 63 | type Config struct { 64 | AccessKeyID string 65 | Bucket string 66 | Endpoint string 67 | Region string 68 | SecretAccessKey string 69 | 70 | UploadConcurrency *int64 71 | 72 | CustomHTTPClient CustomAPIHTTPClient 73 | } 74 | 75 | // Save saves content to path. 76 | func (s *Storage) Save(ctx context.Context, content io.Reader, path string) error { 77 | input := &s3.PutObjectInput{ 78 | ACL: types.ObjectCannedACLPublicRead, 79 | Body: content, 80 | Bucket: aws.String(s.bucket), 81 | Key: aws.String(path), 82 | } 83 | 84 | contenttype := mime.TypeByExtension(filepath.Ext(path)) // first, detect content type from extension 85 | if contenttype == "" { 86 | // second, detect content type from first 512 bytes of content 87 | data := make([]byte, 512) 88 | n, err := content.Read(data) 89 | if err != nil { 90 | return err 91 | } 92 | contenttype = http.DetectContentType(data) 93 | input.Body = io.MultiReader(bytes.NewReader(data[:n]), content) 94 | } 95 | if contenttype != "" { 96 | input.ContentType = aws.String(contenttype) 97 | } 98 | _, err := s.uploader.Upload(ctx, input) 99 | return errors.WithStack(err) 100 | } 101 | 102 | // Stat returns path metadata. 103 | func (s *Storage) Stat(ctx context.Context, path string) (*gostorages.Stat, error) { 104 | input := &s3.HeadObjectInput{ 105 | Bucket: aws.String(s.bucket), 106 | Key: aws.String(path), 107 | } 108 | out, err := s.s3.HeadObject(ctx, input) 109 | var notfounderr *types.NotFound 110 | if errors.As(err, ¬founderr) { 111 | return nil, gostorages.ErrNotExist 112 | } else if err != nil { 113 | return nil, errors.WithStack(err) 114 | } 115 | 116 | return &gostorages.Stat{ 117 | ModifiedTime: *out.LastModified, 118 | Size: out.ContentLength, 119 | }, nil 120 | } 121 | 122 | // Open opens path for reading. 123 | func (s *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error) { 124 | input := &s3.GetObjectInput{ 125 | Bucket: aws.String(s.bucket), 126 | Key: aws.String(path), 127 | } 128 | out, err := s.s3.GetObject(ctx, input) 129 | var notsuckkeyerr *types.NoSuchKey 130 | if errors.As(err, ¬suckkeyerr) { 131 | return nil, gostorages.ErrNotExist 132 | } else if err != nil { 133 | return nil, errors.WithStack(err) 134 | } 135 | return out.Body, nil 136 | } 137 | 138 | // Delete deletes path. 139 | func (s *Storage) Delete(ctx context.Context, path string) error { 140 | input := &s3.DeleteObjectInput{ 141 | Bucket: aws.String(s.bucket), 142 | Key: aws.String(path), 143 | } 144 | _, err := s.s3.DeleteObject(ctx, input) 145 | return errors.WithStack(err) 146 | } 147 | 148 | // OpenWithStat opens path for reading with file stats. 149 | func (s *Storage) OpenWithStat(ctx context.Context, path string) (io.ReadCloser, *gostorages.Stat, error) { 150 | input := &s3.GetObjectInput{ 151 | Bucket: aws.String(s.bucket), 152 | Key: aws.String(path), 153 | } 154 | 155 | out, err := s.s3.GetObject(ctx, input) 156 | var notsuckkeyerr *types.NoSuchKey 157 | if errors.As(err, ¬suckkeyerr) { 158 | return nil, nil, errors.Wrapf(gostorages.ErrNotExist, 159 | "%s does not exist in bucket %s, code: %s", path, s.bucket, notsuckkeyerr.Error()) 160 | } else if err != nil { 161 | return nil, nil, errors.WithStack(err) 162 | } 163 | 164 | return out.Body, &gostorages.Stat{ 165 | ModifiedTime: *out.LastModified, 166 | Size: out.ContentLength, 167 | }, nil 168 | } 169 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | gocritic: 3 | enabled-tags: 4 | - diagnostic 5 | - experimental 6 | - opinionated 7 | - performance 8 | - style 9 | disabled-checks: 10 | - dupImport # https://github.com/go-critic/go-critic/issues/845 11 | - ifElseChain 12 | - octalLiteral 13 | - whyNoLint 14 | - wrapperFunc 15 | - hugeParam 16 | - rangeValCopy 17 | - unnamedResult 18 | - badRegexp 19 | - stringConcatSimplify 20 | golint: 21 | min-confidence: 0 22 | govet: 23 | check-shadowing: false 24 | nolintlint: 25 | allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 26 | allow-unused: false # report any unused nolint directives 27 | require-explanation: false # don't require an explanation for nolint directives 28 | require-specific: false # don't require nolint directives to be specific about which linter is being skipped 29 | allow-errcheck: false 30 | staticcheck: false 31 | ineffassign: false 32 | revive: 33 | # When set to false, ignores files with "GENERATED" header, similar to golint. 34 | # See https://github.com/mgechev/revive#available-rules for details. 35 | # Default: false 36 | ignore-generated-header: true 37 | # Sets the default severity. 38 | # See https://github.com/mgechev/revive#configuration 39 | # Default: warning 40 | severity: error 41 | # Enable all available rules. 42 | # Default: false 43 | enable-all-rules: true 44 | # Sets the default failure confidence. 45 | # This means that linting errors with less than 0.8 confidence will be ignored. 46 | # Default: 0.8 47 | confidence: 0.1 48 | rules: 49 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant 50 | - name: add-constant 51 | severity: warning 52 | disabled: true 53 | arguments: 54 | - maxLitCount: "3" 55 | allowStrs: '""' 56 | allowInts: "0,1,2" 57 | allowFloats: "0.0,0.,1.0,1.,2.0,2." 58 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit 59 | - name: argument-limit 60 | severity: warning 61 | disabled: true 62 | arguments: [ 4 ] 63 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic 64 | - name: atomic 65 | severity: warning 66 | disabled: false 67 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters 68 | - name: banned-characters 69 | severity: warning 70 | disabled: true 71 | arguments: [ "Ω", "Σ", "σ", "7" ] 72 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return 73 | - name: bare-return 74 | severity: warning 75 | disabled: false 76 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports 77 | - name: blank-imports 78 | severity: warning 79 | disabled: true 80 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr 81 | - name: bool-literal-in-expr 82 | severity: warning 83 | disabled: true 84 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc 85 | - name: call-to-gc 86 | severity: warning 87 | disabled: false 88 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity 89 | - name: cognitive-complexity 90 | severity: warning 91 | disabled: true 92 | arguments: [ 7 ] 93 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming 94 | - name: confusing-naming 95 | severity: warning 96 | disabled: true 97 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results 98 | - name: confusing-results 99 | severity: warning 100 | disabled: true 101 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr 102 | - name: constant-logical-expr 103 | severity: warning 104 | disabled: false 105 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument 106 | - name: context-as-argument 107 | severity: warning 108 | disabled: false 109 | arguments: 110 | - allowTypesBefore: "*testing.T,*github.com/user/repo/testing.Harness" 111 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type 112 | - name: context-keys-type 113 | severity: warning 114 | disabled: false 115 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic 116 | - name: cyclomatic 117 | severity: warning 118 | disabled: true 119 | arguments: [ 3 ] 120 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace 121 | - name: datarace 122 | severity: warning 123 | disabled: false 124 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit 125 | - name: deep-exit 126 | severity: warning 127 | disabled: false 128 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer 129 | - name: defer 130 | severity: warning 131 | disabled: true 132 | arguments: 133 | - [ "call-chain", "loop" ] 134 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports 135 | - name: dot-imports 136 | severity: warning 137 | disabled: false 138 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports 139 | - name: duplicated-imports 140 | severity: warning 141 | disabled: false 142 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return 143 | - name: early-return 144 | severity: warning 145 | disabled: false 146 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block 147 | - name: empty-block 148 | severity: warning 149 | disabled: true 150 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines 151 | - name: empty-lines 152 | severity: warning 153 | disabled: true 154 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming 155 | - name: error-naming 156 | severity: warning 157 | disabled: false 158 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return 159 | - name: error-return 160 | severity: warning 161 | disabled: false 162 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings 163 | - name: error-strings 164 | severity: warning 165 | disabled: false 166 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf 167 | - name: errorf 168 | severity: warning 169 | disabled: false 170 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported 171 | - name: exported 172 | severity: warning 173 | disabled: false 174 | arguments: 175 | - "checkPrivateReceivers" 176 | - "sayRepetitiveInsteadOfStutters" 177 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header 178 | - name: file-header 179 | severity: warning 180 | disabled: true 181 | arguments: 182 | - This is the text that must appear at the top of source files. 183 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter 184 | - name: flag-parameter 185 | severity: warning 186 | disabled: true 187 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit 188 | - name: function-result-limit 189 | severity: warning 190 | disabled: true 191 | arguments: [ 2 ] 192 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length 193 | - name: function-length 194 | severity: warning 195 | disabled: true 196 | arguments: [ 10, 0 ] 197 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return 198 | - name: get-return 199 | severity: warning 200 | disabled: false 201 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches 202 | - name: identical-branches 203 | severity: warning 204 | disabled: false 205 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return 206 | - name: if-return 207 | severity: warning 208 | disabled: false 209 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement 210 | - name: increment-decrement 211 | severity: warning 212 | disabled: false 213 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow 214 | - name: indent-error-flow 215 | severity: warning 216 | disabled: true 217 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist 218 | - name: imports-blacklist 219 | severity: warning 220 | disabled: false 221 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing 222 | - name: import-shadowing 223 | severity: warning 224 | disabled: false 225 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit 226 | - name: line-length-limit 227 | severity: warning 228 | disabled: true 229 | arguments: [ 80 ] 230 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs 231 | - name: max-public-structs 232 | severity: warning 233 | disabled: true 234 | arguments: [ 3 ] 235 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter 236 | - name: modifies-parameter 237 | severity: warning 238 | disabled: true 239 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver 240 | - name: modifies-value-receiver 241 | severity: warning 242 | disabled: true 243 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs 244 | - name: nested-structs 245 | severity: warning 246 | disabled: true 247 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order 248 | - name: optimize-operands-order 249 | severity: warning 250 | disabled: true 251 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments 252 | - name: package-comments 253 | severity: warning 254 | disabled: false 255 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range 256 | - name: range 257 | severity: warning 258 | disabled: false 259 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure 260 | - name: range-val-in-closure 261 | severity: warning 262 | disabled: false 263 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address 264 | - name: range-val-address 265 | severity: error 266 | disabled: false 267 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming 268 | - name: receiver-naming 269 | severity: warning 270 | disabled: false 271 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id 272 | - name: redefines-builtin-id 273 | severity: warning 274 | disabled: false 275 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int 276 | - name: string-of-int 277 | severity: warning 278 | disabled: false 279 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format 280 | - name: string-format 281 | severity: warning 282 | disabled: false 283 | arguments: 284 | - - 'core.WriteError[1].Message' 285 | - '/^([^A-Z]|$)/' 286 | - must not start with a capital letter 287 | - - 'fmt.Errorf[0]' 288 | - '/(^|[^\.!?])$/' 289 | - must not end in punctuation 290 | - - panic 291 | - '/^[^\n]*$/' 292 | - must not contain line breaks 293 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag 294 | - name: struct-tag 295 | severity: warning 296 | disabled: true 297 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else 298 | - name: superfluous-else 299 | severity: warning 300 | disabled: false 301 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal 302 | - name: time-equal 303 | severity: warning 304 | disabled: false 305 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming 306 | - name: time-naming 307 | severity: warning 308 | disabled: false 309 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming 310 | - name: var-naming 311 | severity: warning 312 | disabled: false 313 | arguments: 314 | - [ "ID" ] # AllowList 315 | - [ "VM" ] # DenyList 316 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration 317 | - name: var-declaration 318 | severity: warning 319 | disabled: false 320 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion 321 | - name: unconditional-recursion 322 | severity: warning 323 | disabled: false 324 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming 325 | - name: unexported-naming 326 | severity: warning 327 | disabled: false 328 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return 329 | - name: unexported-return 330 | severity: warning 331 | disabled: false 332 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error 333 | - name: unhandled-error 334 | severity: warning 335 | disabled: false 336 | arguments: 337 | - "fmt.Println" 338 | - "fmt.Printf" 339 | - "myFunction" 340 | - "buffer.WriteString" 341 | - "fmt.Fprintf" 342 | - "w.Write" 343 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt 344 | - name: unnecessary-stmt 345 | severity: warning 346 | disabled: false 347 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code 348 | - name: unreachable-code 349 | severity: warning 350 | disabled: false 351 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter 352 | - name: unused-parameter 353 | severity: warning 354 | disabled: true 355 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver 356 | - name: unused-receiver 357 | severity: warning 358 | disabled: true 359 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break 360 | - name: useless-break 361 | severity: warning 362 | disabled: false 363 | # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value 364 | - name: waitgroup-by-value 365 | severity: warning 366 | disabled: false 367 | gosec: 368 | # To select a subset of rules to run. 369 | # Available rules: https://github.com/securego/gosec#available-rules 370 | # Default: [] - means include all rules 371 | includes: 372 | - G101 # Look for hard coded credentials 373 | - G102 # Bind to all interfaces 374 | - G103 # Audit the use of unsafe block 375 | - G104 # Audit errors not checked 376 | - G106 # Audit the use of ssh.InsecureIgnoreHostKey 377 | - G107 # Url provided to HTTP request as taint input 378 | - G108 # Profiling endpoint automatically exposed on /debug/pprof 379 | - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 380 | - G110 # Potential DoS vulnerability via decompression bomb 381 | - G111 # Potential directory traversal 382 | - G112 # Potential slowloris attack 383 | - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772) 384 | - G114 # Use of net/http serve function that has no support for setting timeouts 385 | - G201 # SQL query construction using format string 386 | - G202 # SQL query construction using string concatenation 387 | - G203 # Use of unescaped data in HTML templates 388 | - G204 # Audit use of command execution 389 | - G301 # Poor file permissions used when creating a directory 390 | - G302 # Poor file permissions used with chmod 391 | - G303 # Creating tempfile using a predictable path 392 | - G304 # File path provided as taint input 393 | - G305 # File traversal when extracting zip/tar archive 394 | - G306 # Poor file permissions used when writing to a new file 395 | - G307 # Deferring a method which returns an error 396 | - G401 # Detect the usage of DES, RC4, MD5 or SHA1 397 | - G402 # Look for bad TLS connection settings 398 | - G403 # Ensure minimum RSA key length of 2048 bits 399 | - G404 # Insecure random number source (rand) 400 | - G501 # Import blocklist: crypto/md5 401 | - G502 # Import blocklist: crypto/des 402 | - G503 # Import blocklist: crypto/rc4 403 | - G504 # Import blocklist: net/http/cgi 404 | - G505 # Import blocklist: crypto/sha1 405 | - G601 # Implicit memory aliasing of items from a range statement 406 | # To specify a set of rules to explicitly exclude. 407 | # Available rules: https://github.com/securego/gosec#available-rules 408 | # Default: [] 409 | excludes: 410 | - G101 # Look for hard coded credentials 411 | - G102 # Bind to all interfaces 412 | - G103 # Audit the use of unsafe block 413 | - G104 # Audit errors not checked 414 | - G106 # Audit the use of ssh.InsecureIgnoreHostKey 415 | - G107 # Url provided to HTTP request as taint input 416 | - G108 # Profiling endpoint automatically exposed on /debug/pprof 417 | - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 418 | - G110 # Potential DoS vulnerability via decompression bomb 419 | - G111 # Potential directory traversal 420 | - G112 # Potential slowloris attack 421 | - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772) 422 | - G114 # Use of net/http serve function that has no support for setting timeouts 423 | - G201 # SQL query construction using format string 424 | - G202 # SQL query construction using string concatenation 425 | - G203 # Use of unescaped data in HTML templates 426 | - G204 # Audit use of command execution 427 | - G301 # Poor file permissions used when creating a directory 428 | - G302 # Poor file permissions used with chmod 429 | - G303 # Creating tempfile using a predictable path 430 | - G304 # File path provided as taint input 431 | - G305 # File traversal when extracting zip/tar archive 432 | - G306 # Poor file permissions used when writing to a new file 433 | - G307 # Deferring a method which returns an error 434 | - G401 # Detect the usage of DES, RC4, MD5 or SHA1 435 | - G402 # Look for bad TLS connection settings 436 | - G403 # Ensure minimum RSA key length of 2048 bits 437 | - G404 # Insecure random number source (rand) 438 | - G501 # Import blocklist: crypto/md5 439 | - G502 # Import blocklist: crypto/des 440 | - G503 # Import blocklist: crypto/rc4 441 | - G504 # Import blocklist: net/http/cgi 442 | - G505 # Import blocklist: crypto/sha1 443 | - G601 # Implicit memory aliasing of items from a range statement 444 | 445 | # See explanation of linters at https://golangci-lint.run/usage/linters/ 446 | linters: 447 | disable-all: true 448 | enable: 449 | - gocritic 450 | - bodyclose 451 | - dogsled 452 | - errcheck 453 | - goprintffuncname 454 | - gosimple 455 | - govet 456 | - ineffassign 457 | - nakedret 458 | - staticcheck 459 | - stylecheck 460 | - typecheck 461 | - unconvert 462 | - unused 463 | - whitespace 464 | - unparam 465 | - gosec 466 | - revive 467 | - usestdlibvars 468 | - tenv 469 | - reassign 470 | - predeclared 471 | - makezero 472 | 473 | run: 474 | timeout: 5m -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= 8 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 9 | cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= 10 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 11 | cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= 12 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 13 | cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= 14 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 15 | cloud.google.com/go/storage v1.3.0 h1:2Ze/3nQD5F+HfL0xOPM2EeawDWs+NPRtzgcre+17iZU= 16 | cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= 17 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 18 | github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= 19 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 20 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 21 | github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA= 22 | github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= 23 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 h1:Sc82v7tDQ/vdU1WtuSyzZ1I7y/68j//HJ6uozND1IDs= 24 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14/go.mod h1:9NCTOURS8OpxvoAVHq79LK81/zC78hfRWFn+aL0SPcY= 25 | github.com/aws/aws-sdk-go-v2/config v1.19.0 h1:AdzDvwH6dWuVARCl3RTLGRc4Ogy+N7yLFxVxXe1ClQ0= 26 | github.com/aws/aws-sdk-go-v2/config v1.19.0/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= 27 | github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8= 28 | github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= 29 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ= 30 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= 31 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 h1:haAyxKHwoE+y/TJt+qHcPQf1dCViyyGbWcKjjYUllTE= 32 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91/go.mod h1:ACQ6ta5YFlfSOz2c9A+EVYawLxFMZ0rI3Q0A0tGieKo= 33 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y= 34 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= 35 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc= 36 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= 37 | github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4= 38 | github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= 39 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 h1:wmGLw2i8ZTlHLw7a9ULGfQbuccw8uIiNr6sol5bFzc8= 40 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6/go.mod h1:Q0Hq2X/NuL7z8b1Dww8rmOFl+jzusKEcyvkKspwdpyc= 41 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 h1:7R8uRYyXzdD71KWVCL78lJZltah6VVznXBazvKjfH58= 42 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15/go.mod h1:26SQUPcTNgV1Tapwdt4a1rOsYRsnBsJHLMPoxK2b0d8= 43 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 h1:skaFGzv+3kA+v2BPKhuekeb1Hbb105+44r8ASC+q5SE= 44 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38/go.mod h1:epIZoRSSbRIwLPJU5F+OldHhwZPBdpDeQkRdCeY3+00= 45 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k= 46 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= 47 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 h1:9ulSU5ClouoPIYhDQdg9tpl83d5Yb91PXTKK+17q+ow= 48 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6/go.mod h1:lnc2taBsR9nTlz9meD+lhFZZ9EWY712QHrRflWpTcOA= 49 | github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 h1:Ll5/YVCOzRB+gxPqs2uD0R7/MyATC0w85626glSKmp4= 50 | github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2/go.mod h1:Zjfqt7KhQK+PO1bbOsFNzKgaq7TcxzmEoDWN8lM0qzQ= 51 | github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k= 52 | github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= 53 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk= 54 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= 55 | github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU= 56 | github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= 57 | github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= 58 | github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= 59 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 60 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 61 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 62 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 63 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= 64 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 65 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 66 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 67 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 68 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 69 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 70 | github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= 71 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 72 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 73 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 74 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 75 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 76 | github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 77 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 78 | github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= 79 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 80 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 81 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 82 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 83 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 84 | github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= 85 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 86 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 87 | github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= 88 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 89 | github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= 90 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 91 | github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= 92 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 93 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= 94 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 95 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 96 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 97 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 98 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 99 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 100 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 101 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 102 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 103 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 104 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 105 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 106 | go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= 107 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 108 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 109 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 110 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 111 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 112 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 113 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 114 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 115 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= 116 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 117 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 118 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 119 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 120 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 121 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 122 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 123 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 124 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 125 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= 126 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 127 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 128 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 129 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 130 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 131 | golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= 132 | golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 133 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 134 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 135 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 136 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 137 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 138 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 139 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 140 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 141 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 142 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 143 | golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= 144 | golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= 145 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 146 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 147 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= 148 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 149 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 150 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 151 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 152 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 153 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 154 | golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= 155 | golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 156 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 157 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 158 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 159 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 160 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 161 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 162 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 163 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 164 | golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= 165 | golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 166 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 167 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 168 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 169 | golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= 170 | golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= 171 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 172 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 173 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 174 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 175 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 176 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 177 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 178 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 179 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 180 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 181 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 182 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 183 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 184 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 185 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 186 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 187 | golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 188 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= 189 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 190 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 191 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 192 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 193 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 194 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 195 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 196 | google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= 197 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 198 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 199 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 200 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 201 | google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= 202 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 203 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 204 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 205 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 206 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 207 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 208 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 209 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 210 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 211 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= 212 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 213 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 214 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 215 | google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= 216 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 217 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 218 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 219 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 220 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= 221 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 222 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 223 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 224 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 225 | honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= 226 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 227 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 228 | --------------------------------------------------------------------------------