From aa8571a7d67ec82a9635f01b074320b77c17815a Mon Sep 17 00:00:00 2001 From: Vincent Boutour Date: Sat, 3 Sep 2022 10:00:22 +0200 Subject: [PATCH] chore(deps): Bumping deps Signed-off-by: Vincent Boutour --- go.mod | 16 ++++++++-------- go.sum | 36 +++++++++++++++++------------------- pkg/exif/aggregate.go | 8 ++++---- pkg/thumbnail/utils.go | 4 ++-- 4 files changed, 31 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index 137614a9..2e5717fb 100644 --- a/go.mod +++ b/go.mod @@ -3,19 +3,19 @@ module github.com/ViBiOh/fibr go 1.19 require ( - github.com/ViBiOh/ChatPotte v0.2.3 - github.com/ViBiOh/absto v1.0.2 - github.com/ViBiOh/auth/v2 v2.14.1 + github.com/ViBiOh/ChatPotte v0.2.5 + github.com/ViBiOh/absto v1.0.3 + github.com/ViBiOh/auth/v2 v2.14.2 github.com/ViBiOh/exas v0.5.0 github.com/ViBiOh/flags v1.2.0 - github.com/ViBiOh/httputils/v4 v4.46.3 + github.com/ViBiOh/httputils/v4 v4.47.0 github.com/ViBiOh/vith v0.5.0 github.com/golang/mock v1.6.0 github.com/prometheus/client_golang v1.13.0 github.com/streadway/amqp v1.0.0 go.opentelemetry.io/otel v1.9.0 go.opentelemetry.io/otel/trace v1.9.0 - golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d + golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 golang.org/x/text v0.3.7 ) @@ -35,7 +35,7 @@ require ( github.com/klauspost/cpuid/v2 v2.1.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.34 // indirect + github.com/minio/minio-go/v7 v7.0.35 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -44,8 +44,8 @@ require ( github.com/prometheus/procfs v0.8.0 // indirect github.com/rs/xid v1.4.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/tdewolff/minify/v2 v2.12.0 // indirect - github.com/tdewolff/parse/v2 v2.6.2 // indirect + github.com/tdewolff/minify/v2 v2.12.1 // indirect + github.com/tdewolff/parse/v2 v2.6.3 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.9.0 // indirect go.opentelemetry.io/otel/metric v0.31.0 // indirect diff --git a/go.sum b/go.sum index 352b53e6..6b588404 100644 --- a/go.sum +++ b/go.sum @@ -33,18 +33,18 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 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/ViBiOh/ChatPotte v0.2.3 h1:TSiHZ17J72QhJDt3SZ6YiSinm95uCZzIfsRSe5DZlb8= -github.com/ViBiOh/ChatPotte v0.2.3/go.mod h1:9Ybju6YblJO75h+D0lv1kV8b8HCFJY005sCznBbGZdQ= -github.com/ViBiOh/absto v1.0.2 h1:sER2SBJkhzZ138q9KqxsZPYq1XLJOSp2QfONQ+TZ1o8= -github.com/ViBiOh/absto v1.0.2/go.mod h1:WFjkaaoAtkkxdAxWwjCJBRFBmDc0/LDSMTONMtx0Ils= -github.com/ViBiOh/auth/v2 v2.14.1 h1:nWjChOT1AGia6xgNfDLD0Qp5KhRU3+pEE9QY1sxtNz4= -github.com/ViBiOh/auth/v2 v2.14.1/go.mod h1:2/eXcZpZps2aMvajyIX6PZJqmgXyxFzilPlEfGocOAA= +github.com/ViBiOh/ChatPotte v0.2.5 h1:nZrC0RN5RT0DRGHlpVUhhOWUPFeLKq18P35I9ZMacuM= +github.com/ViBiOh/ChatPotte v0.2.5/go.mod h1:H/B3xIv0A3eddp61mlENHg7P0DEu3hJJnVdD6bRkzhs= +github.com/ViBiOh/absto v1.0.3 h1:guwVdRN7mIJM6XO65ABqDjz/7JiFMGJ7+VfmE/Ni3Zw= +github.com/ViBiOh/absto v1.0.3/go.mod h1:nu8N6LQnyxYhdnTAOtlpr4zca2tOcj5uUgI30oCF4vo= +github.com/ViBiOh/auth/v2 v2.14.2 h1:3z89LtCGs8zZFLOTzHiN3YIacZ2UDxzpkQ/sO2XJcfY= +github.com/ViBiOh/auth/v2 v2.14.2/go.mod h1:wktrqt4O8toixNWekhJ6cL8cXXMOLCSlKBhWUIpHDto= github.com/ViBiOh/exas v0.5.0 h1:ZL5v5rUOkkwo6PxhbOVe96L0RUre7SfStaVcqhE/IbU= github.com/ViBiOh/exas v0.5.0/go.mod h1:sKRV/vz85Vj0caT+a3XWVFp0gyzXe36eZWL+XKge93E= github.com/ViBiOh/flags v1.2.0 h1:DaujjNXzD29KxKyp4eZdn7c9+uBN5DokWgDAe7DcUmc= github.com/ViBiOh/flags v1.2.0/go.mod h1:UyMB5zeD/aId7Xw3x7577ZNU298JmukzOcV8p/H2W1s= -github.com/ViBiOh/httputils/v4 v4.46.3 h1:004bv6lCHlNkqcOg7O6vXHGPrgiEePw+SXKJDT95jdg= -github.com/ViBiOh/httputils/v4 v4.46.3/go.mod h1:pnMewID1htYlsK9ibgnl2Rnjd9a0jFYHotIz0LxJcpQ= +github.com/ViBiOh/httputils/v4 v4.47.0 h1:kXqVTt16sHhOm52YR00DDtwYvwsr8/WiHhxo+WgiHtc= +github.com/ViBiOh/httputils/v4 v4.47.0/go.mod h1:ghw8fNnYr+1450CNeTyaDreaMDC7plFutd54ttT3EMs= github.com/ViBiOh/vith v0.5.0 h1:BpmjwWxd4NGmUJF12XpFOngK32539Lw3mvbMOaeOmhE= github.com/ViBiOh/vith v0.5.0/go.mod h1:Wf40eedOBEcxeLzGzGpuO+2G8qe5Ov1WIIBPXohyKco= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -169,7 +169,7 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgx/v4 v4.17.0 h1:Hsx+baY8/zU2WtPLQyZi8WbecgcsWEeyoK1jvg/WgIo= +github.com/jackc/pgx/v4 v4.17.1 h1:tASdE79tX9LOQu3MMvioWT6YaZkf58ZhmLHhV4sv5WM= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -198,8 +198,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.34 h1:JMfS5fudx1mN6V2MMNyCJ7UMrjEzZzIvMgfkWc1Vnjk= -github.com/minio/minio-go/v7 v7.0.34/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= +github.com/minio/minio-go/v7 v7.0.35 h1:JuPPxWLdxQmNLSaS8AWZnO5HBadeI1xg6FGrEELQEVU= +github.com/minio/minio-go/v7 v7.0.35/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -263,12 +263,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/tdewolff/minify/v2 v2.12.0 h1:ZyvMKeciyR3vzJrK/oHyBcSmpttQ/V+ah7qOqTZclaU= -github.com/tdewolff/minify/v2 v2.12.0/go.mod h1:8mvf+KglD7XurfvvFZDUYvVURy6bA/r0oTvmakXMnyg= -github.com/tdewolff/parse/v2 v2.6.1/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho= -github.com/tdewolff/parse/v2 v2.6.2 h1:RDExtQ7ThRGSucatK0nri3p+HD/tSreYh1IDtDDAS/I= -github.com/tdewolff/parse/v2 v2.6.2/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= -github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tdewolff/minify/v2 v2.12.1 h1:zcjJTcO0uI+asdT+nd4TjXi3KUmVV/G2kxOKKrgKlGw= +github.com/tdewolff/minify/v2 v2.12.1/go.mod h1:p5pwbvNs1ghbFED/ZW1towGsnnWwzvM8iz8l0eURi9g= +github.com/tdewolff/parse/v2 v2.6.3 h1:O5rshbkaRmpRtD7k2lG65bEJpcfUMNg5Cx2uRKWVsI8= +github.com/tdewolff/parse/v2 v2.6.3/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM= github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -298,8 +296,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d h1:3qF+Z8Hkrw9sOhrFHti9TlB1Hkac1x+DNRkv0XQiFjo= -golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/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= diff --git a/pkg/exif/aggregate.go b/pkg/exif/aggregate.go index 3c944628..b98b4fe3 100644 --- a/pkg/exif/aggregate.go +++ b/pkg/exif/aggregate.go @@ -32,14 +32,14 @@ func (a App) GetExifFor(ctx context.Context, item absto.Item) (exas.Exif, error) ctx, end := tracer.StartSpan(ctx, a.tracer, "get_exif") defer end() - return cache.Retrieve(ctx, a.redisClient, redisKey(item.ID), func(ctx context.Context) (exas.Exif, error) { + return cache.Retrieve(ctx, a.redisClient, func(ctx context.Context) (exas.Exif, error) { exif, err := a.loadExif(ctx, item) if err != nil && !absto.IsNotExist(err) { return exif, fmt.Errorf("load exif: %w", err) } return exif, nil - }, cacheDuration) + }, cacheDuration, redisKey(item.ID)) } func (a App) GetAggregateFor(ctx context.Context, item absto.Item) (provider.Aggregate, error) { @@ -50,14 +50,14 @@ func (a App) GetAggregateFor(ctx context.Context, item absto.Item) (provider.Agg ctx, end := tracer.StartSpan(ctx, a.tracer, "aggregate") defer end() - return cache.Retrieve(ctx, a.redisClient, redisKey(item.ID), func(ctx context.Context) (provider.Aggregate, error) { + return cache.Retrieve(ctx, a.redisClient, func(ctx context.Context) (provider.Aggregate, error) { aggregate, err := a.loadAggregate(ctx, item) if err != nil && !absto.IsNotExist(err) { return aggregate, fmt.Errorf("load aggregate: %w", err) } return aggregate, nil - }, cacheDuration) + }, cacheDuration, redisKey(item.ID)) } func (a App) SaveExifFor(ctx context.Context, item absto.Item, exif exas.Exif) error { diff --git a/pkg/thumbnail/utils.go b/pkg/thumbnail/utils.go index 854d9ea1..8392f178 100644 --- a/pkg/thumbnail/utils.go +++ b/pkg/thumbnail/utils.go @@ -89,7 +89,7 @@ func (a App) Info(ctx context.Context, pathname string) (absto.Item, error) { ctx, end := tracer.StartSpan(ctx, a.tracer, "info") defer end() - return cache.Retrieve(ctx, a.redisClient, redisKey(pathname), func(ctx context.Context) (absto.Item, error) { + return cache.Retrieve(ctx, a.redisClient, func(ctx context.Context) (absto.Item, error) { return a.storageApp.Info(ctx, pathname) - }, redisCacheDuration) + }, redisCacheDuration, redisKey(pathname)) }