From d30d1314888c1f07516645a1aceeb7081ad7ed0c Mon Sep 17 00:00:00 2001 From: Major Date: Sun, 10 Nov 2024 13:53:50 +0100 Subject: [PATCH] chores: caching lib --- cmd/server.go | 155 ++++++++++++++++++++------- data/meta/strategies/1.json | 6 +- data/meta/tokens/1.json | 2 +- data/meta/vaults/1.json | 112 +++++++++---------- external/vaults/prepare.getVaults.go | 9 +- external/vaults/route.vaults.go | 32 +++--- go.mod | 5 + go.sum | 10 ++ 8 files changed, 210 insertions(+), 121 deletions(-) diff --git a/cmd/server.go b/cmd/server.go index 1e3dabec..d54a1655 100755 --- a/cmd/server.go +++ b/cmd/server.go @@ -6,8 +6,12 @@ import ( "github.com/gin-contrib/cors" "github.com/gin-contrib/gzip" + + "github.com/gin-contrib/cache" + goCache "github.com/patrickmn/go-cache" + + "github.com/gin-contrib/cache/persistence" "github.com/gin-gonic/gin" - "github.com/patrickmn/go-cache" "github.com/yearn/ydaemon/common/helpers" "github.com/yearn/ydaemon/external/prices" "github.com/yearn/ydaemon/external/strategies" @@ -16,10 +20,10 @@ import ( "github.com/yearn/ydaemon/external/vaults" ) -var cachingStore *cache.Cache +var cachingStore *goCache.Cache func init() { - cachingStore = cache.New(1*time.Minute, 5*time.Minute) + cachingStore = goCache.New(1*time.Minute, 5*time.Minute) } /************************************************************************************************** @@ -28,6 +32,7 @@ func init() { func NewRouter() *gin.Engine { gin.EnableJsonDecoderDisallowUnknownFields() gin.SetMode(gin.ReleaseMode) + store := persistence.NewInMemoryStore(10 * time.Minute) // gin.DefaultWriter = nil router := gin.New() // pprof.Register(router) @@ -54,65 +59,133 @@ func NewRouter() *gin.Engine { // Vaults section { - c := vaults.Controller{} + v := vaults.Controller{} // Retrieve the vaults for all chains // router.GET(`vaults`, c.GetIsYearn) - router.GET(`vaults/detected`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetAll)) - router.GET(`vaults`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsYearn)) - router.GET(`vaults/all`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsYearn)) - router.GET(`vaults/underthesea/v2`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetV2)) - router.GET(`vaults/v2`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetV2IsYearn)) - router.GET(`vaults/underthesea/v3`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetV3)) - router.GET(`vaults/v3`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetV3IsYearn)) - router.GET(`vaults/juiced`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsYearnJuiced)) - router.GET(`vaults/gimme`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsGimme)) - router.GET(`vaults/retired`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetRetired)) - router.GET(`vaults/pendle`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsYearnPendle)) - router.GET(`vaults/optimism`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsOptimism)) - router.GET(`vaults/pooltogether`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsYearnPoolTogether)) - router.GET(`vaults/ajna`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsAjna)) - router.GET(`vaults/velodrome`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsVelodrome)) - router.GET(`vaults/aerodrome`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsAerodrome)) - router.GET(`vaults/curve`, CacheSimplifiedVaults(cachingStore, 10*time.Minute, c.GetIsCurve)) + router.GET(`vaults/detected`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetAll(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsYearn(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/all`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsYearn(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/underthesea/v2`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetV2(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/v2`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetV2IsYearn(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/underthesea/v3`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetV3(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/v3`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetV3IsYearn(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/juiced`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsYearnJuiced(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/gimme`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsGimme(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/retired`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetRetired(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/pendle`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsYearnPendle(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/optimism`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsOptimism(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/pooltogether`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsYearnPoolTogether(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/ajna`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsAjna(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/velodrome`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsVelodrome(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/aerodrome`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsAerodrome(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) + router.GET(`vaults/curve`, cache.CachePage(store, time.Minute, func(ctx *gin.Context) { + if result, err := v.GetIsCurve(ctx); err == nil { + ctx.JSON(http.StatusOK, result) + } + })) /****************************************************************************************** ** Retrieve some/all vaults based on some specific criteria. This is chain specific and ** will return the vaults for a specific chain. ******************************************************************************************/ - router.GET(`:chainID/vaults/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyIsYearn)) - router.GET(`:chainID/vaults/v2/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyV2IsYearn)) - router.GET(`:chainID/vaults/v3/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyV3IsYearn)) - router.GET(`:chainID/vaults/juiced/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyIsYearnJuiced)) - router.GET(`:chainID/vaults/gimme/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyIsGimme)) - router.GET(`:chainID/vaults/retired`, CacheLegacyVaults(cachingStore, 10*time.Minute, c.GetLegacyRetired)) - router.GET(`:chainID/vaults/some/:addresses`, c.GetLegacySomeVaults) + router.GET(`:chainID/vaults/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyIsYearn)) + router.GET(`:chainID/vaults/v2/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyV2IsYearn)) + router.GET(`:chainID/vaults/v3/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyV3IsYearn)) + router.GET(`:chainID/vaults/juiced/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyIsYearnJuiced)) + router.GET(`:chainID/vaults/gimme/all`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyIsGimme)) + router.GET(`:chainID/vaults/retired`, CacheLegacyVaults(cachingStore, 10*time.Minute, v.GetLegacyRetired)) + router.GET(`:chainID/vaults/some/:addresses`, v.GetLegacySomeVaults) /****************************************************************************************** ** Vaults for a custom integration ******************************************************************************************/ - router.GET(`rotki/list/vaults`, CacheCustomVaults(cachingStore, 10*time.Minute, c.GetVaultsForRotki)) - router.GET(`rotki/count/vaults`, c.CountVaultsForRotki) + router.GET(`rotki/list/vaults`, CacheCustomVaults(cachingStore, 10*time.Minute, v.GetVaultsForRotki)) + router.GET(`rotki/count/vaults`, v.CountVaultsForRotki) /****************************************************************************************** ** Retrieve a specific vault based on the address. This is chain specific and will return ** the vault for a specific chain. ******************************************************************************************/ - router.GET(`:chainID/vaults/:address`, c.GetSimplifiedVault) - router.GET(`:chainID/vault/:address`, c.GetSimplifiedVault) + router.GET(`:chainID/vaults/:address`, v.GetSimplifiedVault) + router.GET(`:chainID/vault/:address`, v.GetSimplifiedVault) - router.GET(`:chainID/vaults/harvests/:addresses`, c.GetHarvestsForVault) - router.GET(`:chainID/earned/:address/:vaults`, c.GetEarnedPerVaultPerUser) - router.GET(`:chainID/earned/:address`, c.GetEarnedPerUser) - router.GET(`earned/:address`, c.GetEarnedPerUserForAllChains) + router.GET(`:chainID/vaults/harvests/:addresses`, v.GetHarvestsForVault) + router.GET(`:chainID/earned/:address/:vaults`, v.GetEarnedPerVaultPerUser) + router.GET(`:chainID/earned/:address`, v.GetEarnedPerUser) + router.GET(`earned/:address`, v.GetEarnedPerUserForAllChains) // Retrieve the strategies for a specific chainID - router.GET(`:chainID/strategies/all`, c.GetAllStrategies) - router.GET(`:chainID/strategies/:address`, c.GetStrategy) - router.GET(`:chainID/strategy/:address`, c.GetStrategy) + router.GET(`:chainID/strategies/all`, v.GetAllStrategies) + router.GET(`:chainID/strategies/:address`, v.GetStrategy) + router.GET(`:chainID/strategy/:address`, v.GetStrategy) // Retrieve the TVL - router.GET(`vaults/tvl`, c.GetAllVaultsTVL) - router.GET(`:chainID/vaults/tvl`, c.GetVaultsTVL) + router.GET(`vaults/tvl`, v.GetAllVaultsTVL) + router.GET(`:chainID/vaults/tvl`, v.GetVaultsTVL) } // Strategies section diff --git a/data/meta/strategies/1.json b/data/meta/strategies/1.json index ce274a40..ce69c539 100644 --- a/data/meta/strategies/1.json +++ b/data/meta/strategies/1.json @@ -1,9 +1,9 @@ { - "lastUpdate": "2024-11-10T12:51:48.210428+01:00", + "lastUpdate": "2024-11-10T13:53:44.00498+01:00", "version": { "major": 0, "minor": 3, - "patch": 204 + "patch": 262 }, "shouldRefresh": false, "strategies": { @@ -26373,7 +26373,7 @@ "keepCRV": null, "keepCRVPercent": null, "keepCVX": null, - "lastTotalDebt": "44677825785839173855597653", + "lastTotalDebt": "44676383104793015803089105", "lastTotalLoss": "0", "lastTotalGain": "1123305542539830424482856", "lastPerformanceFee": "0", diff --git a/data/meta/tokens/1.json b/data/meta/tokens/1.json index 4dd9dcd3..7b08b8cd 100644 --- a/data/meta/tokens/1.json +++ b/data/meta/tokens/1.json @@ -1,5 +1,5 @@ { - "lastUpdate": "2024-11-10T12:51:10.612472+01:00", + "lastUpdate": "2024-11-10T13:53:06.742784+01:00", "version": { "major": 0, "minor": 73, diff --git a/data/meta/vaults/1.json b/data/meta/vaults/1.json index 3226e52c..acb11f62 100644 --- a/data/meta/vaults/1.json +++ b/data/meta/vaults/1.json @@ -1,9 +1,9 @@ { - "lastUpdate": "2024-11-10T12:51:47.811951+01:00", + "lastUpdate": "2024-11-10T13:53:43.666155+01:00", "version": { - "major": 7, + "major": 10, "minor": 0, - "patch": 15 + "patch": 11 }, "shouldRefresh": false, "vaults": { @@ -716,7 +716,7 @@ "0x11829e810afcca3e28b0c7d9e560a3f3e1294ba3", "0xccb65389cdcf52ab636973a93aa9b518b7f3b933" ], - "lastPricePerShare": "1653502902845860603", + "lastPricePerShare": "1653545149147879390", "lastTotalAssets": "65782049795402273342711", "metadata": { "isRetired": false, @@ -924,7 +924,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1065465069735733525", + "lastPricePerShare": "1065511716681112984", "lastTotalAssets": "316654497022054478194390", "metadata": { "isRetired": false, @@ -1061,8 +1061,8 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1007747657621159500", - "lastTotalAssets": "1949542387112038122881603", + "lastPricePerShare": "1007769699644071751", + "lastTotalAssets": "1954550199580258628869225", "metadata": { "isRetired": false, "isHidden": false, @@ -1126,7 +1126,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1104035178101303897", + "lastPricePerShare": "1104073681738133565", "lastTotalAssets": "1515208415546211927346604", "metadata": { "isRetired": false, @@ -1942,7 +1942,7 @@ "lastActiveStrategies": [ "0xa323cccbcbade7806ca5bb9951bebd89a7882bf8" ], - "lastPricePerShare": "1477681861948184881", + "lastPricePerShare": "1477752594759194908", "lastTotalAssets": "8194744530827735764823315", "metadata": { "isRetired": false, @@ -2636,7 +2636,7 @@ "0x4ce9c93513dff543bc392870d57df8c04e89ba0a", "0xef0faf0bb4102164c9af5a657e2c410bbba1bd7f" ], - "lastPricePerShare": "1003040964753918366", + "lastPricePerShare": "1003050528670220591", "lastTotalAssets": "6431183058631743635885923", "metadata": { "isRetired": false, @@ -3657,7 +3657,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1071006702291148331", + "lastPricePerShare": "1071014260444148131", "lastTotalAssets": "105601852957835388494498", "metadata": { "isRetired": false, @@ -3790,7 +3790,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1019468", + "lastPricePerShare": "1019479", "lastTotalAssets": "821368063092", "metadata": { "isRetired": false, @@ -4129,7 +4129,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1257846073756526926", + "lastPricePerShare": "1257847115069005422", "lastTotalAssets": "422713475735409048735", "metadata": { "isRetired": false, @@ -4611,8 +4611,8 @@ "lastActiveStrategies": [ "0xe3974e44bc08f435da2c6db7d01e1758496da119" ], - "lastPricePerShare": "1830828680414388765", - "lastTotalAssets": "44677825785839173855597653", + "lastPricePerShare": "1830862050283177854", + "lastTotalAssets": "44676383104793015803089105", "metadata": { "isRetired": false, "isHidden": false, @@ -6538,7 +6538,7 @@ "0x206db0a0af10bec57784045e089a418771d20227", "0xed48069a2b9982b4eec646cbfa7b81d181f9400b" ], - "lastPricePerShare": "1010157", + "lastPricePerShare": "1010162", "lastTotalAssets": "6374839946939", "metadata": { "isRetired": false, @@ -7228,7 +7228,7 @@ "0x473f0adec308dc82440665d9fc7d5e26ebcf0e05" ], "lastPricePerShare": "1000000000000000000", - "lastTotalAssets": "122232455527536079133870772", + "lastTotalAssets": "121513774613200449483949909", "metadata": { "isRetired": false, "isHidden": true, @@ -9407,7 +9407,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1159029", + "lastPricePerShare": "1159036", "lastTotalAssets": "913249908", "metadata": { "isRetired": false, @@ -10504,7 +10504,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1005365136846378170", + "lastPricePerShare": "1005375776612950490", "lastTotalAssets": "6468452903836174108821552", "metadata": { "isRetired": false, @@ -11949,7 +11949,7 @@ "0x472f4e5533fb8f7fee97dacd3dbae9d83867ab07", "0x045b76468342d765bdaa6d2d74bacee4ecdb6f5b" ], - "lastPricePerShare": "1040448363259703536", + "lastPricePerShare": "1040459379144642576", "lastTotalAssets": "697995331380859633627", "metadata": { "isRetired": false, @@ -13404,7 +13404,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1002168", + "lastPricePerShare": "1002175", "lastTotalAssets": "1876905102191", "metadata": { "isRetired": false, @@ -13539,7 +13539,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "2466604344248669755", + "lastPricePerShare": "2466617184519865007", "lastTotalAssets": "240193176813233652181", "metadata": { "isRetired": false, @@ -14515,7 +14515,7 @@ "0xfa5c4a53d49fd936ca2b757f2c64d4007dd87e5b", "0xa279b480428e58c248ae6cc110aaf67fb8237baa" ], - "lastPricePerShare": "1441714370361652038", + "lastPricePerShare": "1441792679674445884", "lastTotalAssets": "2785264524977070384278", "metadata": { "isRetired": false, @@ -14790,7 +14790,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1002080516191664812", + "lastPricePerShare": "1002087432526146878", "lastTotalAssets": "4509950525747848197264067", "metadata": { "isRetired": false, @@ -15270,7 +15270,7 @@ "0xda64d669b3fd915f58d4cac799a57aeae0593ae7", "0x7bba4a580b97cfbb0f100fb3ea74ae9f1377d039" ], - "lastPricePerShare": "1282152645338721200", + "lastPricePerShare": "1282178189683376556", "lastTotalAssets": "5935242310582366020859854", "metadata": { "isRetired": false, @@ -17633,7 +17633,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1078513", + "lastPricePerShare": "1078526", "lastTotalAssets": "506520154808", "metadata": { "isRetired": false, @@ -18390,7 +18390,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1335741942847677366", + "lastPricePerShare": "1335752271935015657", "lastTotalAssets": "178186435892083773091920", "metadata": { "isRetired": false, @@ -18596,7 +18596,7 @@ "0x1149c471e605101b7095344d43be777474f707cf", "0x592b487f078d9b4d22b230f8c5b6509b82aded5a" ], - "lastPricePerShare": "1204481141758584136", + "lastPricePerShare": "1204507276917414582", "lastTotalAssets": "108504093466136535321", "metadata": { "isRetired": false, @@ -20172,7 +20172,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "3294522604662207006", + "lastPricePerShare": "3294530104902718359", "lastTotalAssets": "19728645015228633", "metadata": { "isRetired": false, @@ -20374,7 +20374,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1005628894491800476", + "lastPricePerShare": "1005637895875890111", "lastTotalAssets": "357643922831243003019", "metadata": { "isRetired": false, @@ -20444,7 +20444,7 @@ "0x3927c4ad1d63bf9629fdae1318aa31df9135f544", "0x6164045fc2b2b269ffcab2197736a74b1725b6c6" ], - "lastPricePerShare": "1076175181023734569", + "lastPricePerShare": "1076209874551615532", "lastTotalAssets": "996846218415126727225038", "metadata": { "isRetired": false, @@ -21115,7 +21115,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1007449034758016842", + "lastPricePerShare": "1007454207846575119", "lastTotalAssets": "623806222376191187211", "metadata": { "isRetired": false, @@ -22009,7 +22009,7 @@ "0x64e4779bff8588ccdca9f290b9bc346a798f5277", "0x120fa5738751b275aed7f7b46b98beb38679e093" ], - "lastPricePerShare": "1081360109355624911", + "lastPricePerShare": "1081364218402950909", "lastTotalAssets": "21152608884182590729356", "metadata": { "isRetired": false, @@ -22146,7 +22146,7 @@ "0x0fd45d4fb70d1ec95264da30934095443dc6af6a", "0xbbca1111ec2204bd9c546b755f91979e32a15b2e" ], - "lastPricePerShare": "1110060", + "lastPricePerShare": "1110068", "lastTotalAssets": "10694408734704", "metadata": { "isRetired": false, @@ -22281,7 +22281,7 @@ "0xf4b4464d03c1f3226c23fe58407b558489510dab", "0x34ec144cbcf4ced98bd00209fad37d1010c214fe" ], - "lastPricePerShare": "1345898946790507386", + "lastPricePerShare": "1345926236446720604", "lastTotalAssets": "1187043626748914009413218", "metadata": { "isRetired": false, @@ -22422,7 +22422,7 @@ "0xf87d078899626cf1a4ef49acba0b60138bac37b2", "0x51d749df68ecf652de70f587a92c119d454b7563" ], - "lastPricePerShare": "1129146085074689897", + "lastPricePerShare": "1129217069394682161", "lastTotalAssets": "697555870157570019405408", "metadata": { "isRetired": false, @@ -23181,7 +23181,7 @@ "0x0472d09b1eecea082245b88c22b2a52e8892b018", "0x9ad3047d578e79187f0faeef26729097a4973325" ], - "lastPricePerShare": "1116794975448444174", + "lastPricePerShare": "1116804349816533735", "lastTotalAssets": "799883565197003279405", "metadata": { "isRetired": false, @@ -23667,7 +23667,7 @@ "0xd8b27cf359b7d15710a5be299af6e7bf904984c2", "0x9861708f2ad2bd1ed8d4d12436c0d8eb1ed36f1c" ], - "lastPricePerShare": "1024895911733058578", + "lastPricePerShare": "1024933717184454619", "lastTotalAssets": "652108364520318646641", "metadata": { "isRetired": false, @@ -24018,7 +24018,7 @@ "0xf6e2d36c489e5b361cdc962d4568cea663ad5ddc", "0x797dd80692c3b2dadabce8e30c07fde5307d48a9" ], - "lastPricePerShare": "1025859", + "lastPricePerShare": "1025863", "lastTotalAssets": "28899976335", "metadata": { "isRetired": false, @@ -24222,7 +24222,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1462303090896847934", + "lastPricePerShare": "1462306778926232523", "lastTotalAssets": "30175380150414715254143", "metadata": { "isRetired": false, @@ -25652,7 +25652,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1025586121099354877", + "lastPricePerShare": "1025587126334600676", "lastTotalAssets": "198945591207117497376", "metadata": { "isRetired": false, @@ -25993,7 +25993,7 @@ "0xee0a6d15f526f00b73a084ad1c5a81cff09cd2c5", "0xaef9ae268c601606679c8afb7f5285bdb9c58f54" ], - "lastPricePerShare": "2540588331781627957", + "lastPricePerShare": "2540773846791323899", "lastTotalAssets": "4728862092879368255287755", "metadata": { "isRetired": false, @@ -26885,7 +26885,7 @@ "0x602da189f5ada033e9ac7096fc39c7f44a77e942", "0x522478b54046ab7197880f2626b74a96d45b9b02" ], - "lastPricePerShare": "1030632", + "lastPricePerShare": "1030635", "lastTotalAssets": "5098643502062", "metadata": { "isRetired": false, @@ -26950,7 +26950,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1008201832711146784", + "lastPricePerShare": "1008205183543280644", "lastTotalAssets": "493062611223406494851706", "metadata": { "isRetired": false, @@ -27021,7 +27021,7 @@ "0xbf2e5bed692c09af8b39677e315f36adf39bd685", "0x0655977feb2f289a4ab78af67bab0d17aab84367" ], - "lastPricePerShare": "1033204474262996428", + "lastPricePerShare": "1033213886777580911", "lastTotalAssets": "1072964080043846431680908", "metadata": { "isRetired": false, @@ -27985,7 +27985,7 @@ "0x365cc9c28df1663fa37c565a3ac1addc3a219e15", "0xc7bae383738274ea8c3292d53afbb3b42b348df0" ], - "lastPricePerShare": "1013458011213432341", + "lastPricePerShare": "1013461374349208076", "lastTotalAssets": "565221983265424763317", "metadata": { "isRetired": false, @@ -28191,7 +28191,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1004421194002932210", + "lastPricePerShare": "1004437572814734915", "lastTotalAssets": "144059686122813170568", "metadata": { "isRetired": false, @@ -29028,7 +29028,7 @@ "0xbbbe0410ac3e0cd29bb1e8fbfad4caf36b0018f0", "0x74e37a751e163f66148402198da13df5dc47cfaf" ], - "lastPricePerShare": "1008468609283175043", + "lastPricePerShare": "1008488187273122192", "lastTotalAssets": "1807517421781009310030634", "metadata": { "isRetired": false, @@ -30954,7 +30954,7 @@ "0x3280499298ace3fd3cd9c2558e9e8746ace3e52d", "0x01d127d90513ccb6071f83efe15611c4d9890668" ], - "lastPricePerShare": "1144195608754570565", + "lastPricePerShare": "1144212165404008494", "lastTotalAssets": "17169123139153312280237437", "metadata": { "isRetired": false, @@ -32059,7 +32059,7 @@ "lastActiveStrategies": [ "0x83f20f44975d03b1b09e64809b757c47f942beea" ], - "lastPricePerShare": "1036807001927414707", + "lastPricePerShare": "1036814008157804126", "lastTotalAssets": "1652521551103875458848141", "metadata": { "isRetired": false, @@ -32871,7 +32871,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1003610", + "lastPricePerShare": "1003618", "lastTotalAssets": "5562073293292", "metadata": { "isRetired": false, @@ -33009,7 +33009,7 @@ "0x9141c81776595426f4bfd0c589b5472549475ea5", "0xe359def55cf9e310aef759dc0ef7dbfc584f27bf" ], - "lastPricePerShare": "1692331028827513277", + "lastPricePerShare": "1692366622560017380", "lastTotalAssets": "1270133194415622569662863", "metadata": { "isRetired": false, @@ -33624,7 +33624,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1033539912366298452", + "lastPricePerShare": "1033543228385883167", "lastTotalAssets": "19930241686545509172", "metadata": { "isRetired": false, @@ -34300,7 +34300,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "2015892916313482209", + "lastPricePerShare": "2015906201175080215", "lastTotalAssets": "344959443969220713431", "metadata": { "isRetired": false, @@ -35332,7 +35332,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1035291", + "lastPricePerShare": "1035297", "lastTotalAssets": "13071345098", "metadata": { "isRetired": false, @@ -35465,7 +35465,7 @@ "managementFee": 0, "emergencyShutdown": false, "lastActiveStrategies": [], - "lastPricePerShare": "1008118", + "lastPricePerShare": "1008122", "lastTotalAssets": "2750035981775", "metadata": { "isRetired": false, diff --git a/external/vaults/prepare.getVaults.go b/external/vaults/prepare.getVaults.go index 90b8a02e..cdd07644 100644 --- a/external/vaults/prepare.getVaults.go +++ b/external/vaults/prepare.getVaults.go @@ -1,6 +1,7 @@ package vaults import ( + "errors" "net/http" "strings" @@ -17,7 +18,7 @@ import ( func getVaults( c *gin.Context, filterFunc func(vault models.TVault) bool, -) []TSimplifiedExternalVault { +) ([]TSimplifiedExternalVault, error) { /** 🔵 - Yearn ************************************************************************************* ** orderBy: A string that determines the order in which the vaults are returned. It is obtained ** from the 'orderBy' query parameter in the request. If the parameter is not provided, @@ -48,7 +49,7 @@ func getVaults( migrable := selectMigrableCondition(getQuery(c, `migrable`)) if migrable != `none` && hideAlways { c.String(http.StatusBadRequest, `migrable and hideAlways cannot be true at the same time`) - return []TSimplifiedExternalVault{} + return []TSimplifiedExternalVault{}, errors.New(`migrable and hideAlways cannot be true at the same time`) } /** 🔵 - Yearn ************************************************************************************* @@ -214,11 +215,11 @@ func getVaults( end = uint64(len(data)) } if start >= uint64(len(data)) { - return []TSimplifiedExternalVault{} + return []TSimplifiedExternalVault{}, nil } data = data[start:end] - return data + return data, nil } func isV3Vault(vault models.TVault) bool { diff --git a/external/vaults/route.vaults.go b/external/vaults/route.vaults.go index 369dd372..43485de6 100755 --- a/external/vaults/route.vaults.go +++ b/external/vaults/route.vaults.go @@ -8,7 +8,7 @@ import ( /************************************************************************************************** ** GetAll is a gin handler function to retrieve all the vaults **************************************************************************************************/ -func (y Controller) GetAll(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetAll(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return true }) @@ -18,7 +18,7 @@ func (y Controller) GetAll(c *gin.Context) []TSimplifiedExternalVault { ** GetIsYearn is a gin handler function to retrieve all the vaults matching the ** inclusion.IsYearn filter. **************************************************************************************************/ -func (y Controller) GetIsYearn(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsYearn(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn }) @@ -27,7 +27,7 @@ func (y Controller) GetIsYearn(c *gin.Context) []TSimplifiedExternalVault { /************************************************************************************************** ** GetV3 is a gin handler function to retrieve all the v3 vaults **************************************************************************************************/ -func (y Controller) GetV3(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetV3(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return isV3Vault(vault) }) @@ -36,7 +36,7 @@ func (y Controller) GetV3(c *gin.Context) []TSimplifiedExternalVault { /************************************************************************************************** ** GetV2 is a gin handler function to retrieve all the v2 vaults **************************************************************************************************/ -func (y Controller) GetV2(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetV2(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return isV2Vault(vault) }) @@ -45,7 +45,7 @@ func (y Controller) GetV2(c *gin.Context) []TSimplifiedExternalVault { /************************************************************************************************** ** GetV2 is a gin handler function to retrieve all the retired vaults **************************************************************************************************/ -func (y Controller) GetRetired(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetRetired(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.IsRetired }) @@ -55,7 +55,7 @@ func (y Controller) GetRetired(c *gin.Context) []TSimplifiedExternalVault { ** GetV2IsYearn is a gin handler function to retrieve all the V2 vaults matching the ** inclusion.IsYearn filter. **************************************************************************************************/ -func (y Controller) GetV2IsYearn(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetV2IsYearn(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return isV2Vault(vault) && vault.Metadata.Inclusion.IsYearn }) @@ -65,7 +65,7 @@ func (y Controller) GetV2IsYearn(c *gin.Context) []TSimplifiedExternalVault { ** GetV3IsYearn is a gin handler function to retrieve all the V3 vaults matching the ** inclusion.IsYearn filter. **************************************************************************************************/ -func (y Controller) GetV3IsYearn(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetV3IsYearn(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return isV3Vault(vault) && vault.Metadata.Inclusion.IsYearn }) @@ -75,7 +75,7 @@ func (y Controller) GetV3IsYearn(c *gin.Context) []TSimplifiedExternalVault { ** GetIsYearnJuiced is a gin handler function to retrieve all the vaults matching the ** inclusion.IsYearnJuiced filter. **************************************************************************************************/ -func (y Controller) GetIsYearnJuiced(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsYearnJuiced(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearnJuiced }) @@ -85,7 +85,7 @@ func (y Controller) GetIsYearnJuiced(c *gin.Context) []TSimplifiedExternalVault ** GetIsGimme is a gin handler function to retrieve all the vaults matching the inclusion.IsGimme ** filter. **************************************************************************************************/ -func (y Controller) GetIsGimme(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsGimme(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsGimme }) @@ -95,7 +95,7 @@ func (y Controller) GetIsGimme(c *gin.Context) []TSimplifiedExternalVault { ** GetIsYearnPendle is a gin handler function to retrieve all the vaults matching the pendle ** category and the inclusion.IsYearn filter. **************************************************************************************************/ -func (y Controller) GetIsYearnPendle(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsYearnPendle(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.Metadata.Category == "Pendle" || vault.Metadata.Category == "Pendle Autorollover" }) @@ -105,7 +105,7 @@ func (y Controller) GetIsYearnPendle(c *gin.Context) []TSimplifiedExternalVault ** GetIsOptimism is a gin handler function to retrieve all the optimism vaults matching the ** inclusion.IsYearn filter. **************************************************************************************************/ -func (y Controller) GetIsOptimism(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsOptimism(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.ChainID == 10 }) @@ -115,7 +115,7 @@ func (y Controller) GetIsOptimism(c *gin.Context) []TSimplifiedExternalVault { ** GetIsYearnPoolTogether is a gin handler function to retrieve all the vaults matching the ** inclusion.isPoolTogether filter. **************************************************************************************************/ -func (y Controller) GetIsYearnPoolTogether(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsYearnPoolTogether(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsPoolTogether }) @@ -125,7 +125,7 @@ func (y Controller) GetIsYearnPoolTogether(c *gin.Context) []TSimplifiedExternal ** GetIsAjna is a gin handler function to retrieve all the vaults with a name matching `AJNA` or ** with the inclusion.IsYearnJuiced filter. **************************************************************************************************/ -func (y Controller) GetIsAjna(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsAjna(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.Metadata.Category == "Ajna" }) @@ -135,7 +135,7 @@ func (y Controller) GetIsAjna(c *gin.Context) []TSimplifiedExternalVault { ** GetIsVelodrome is a gin handler function to retrieve all the vaults with a name matching the ** Velodrome category **************************************************************************************************/ -func (y Controller) GetIsVelodrome(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsVelodrome(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.Metadata.Category == "Velodrome" }) @@ -145,7 +145,7 @@ func (y Controller) GetIsVelodrome(c *gin.Context) []TSimplifiedExternalVault { ** GetIsAerodrome is a gin handler function to retrieve all the vaults with a name matching the ** Aerodrome category **************************************************************************************************/ -func (y Controller) GetIsAerodrome(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsAerodrome(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.Metadata.Category == "Aerodrome" }) @@ -155,7 +155,7 @@ func (y Controller) GetIsAerodrome(c *gin.Context) []TSimplifiedExternalVault { ** GetIsCurve is a gin handler function to retrieve all the vaults with a name matching the ** Curve category **************************************************************************************************/ -func (y Controller) GetIsCurve(c *gin.Context) []TSimplifiedExternalVault { +func (y Controller) GetIsCurve(c *gin.Context) ([]TSimplifiedExternalVault, error) { return getVaults(c, func(vault models.TVault) bool { return vault.Metadata.Inclusion.IsYearn && vault.Metadata.Category == "Curve" }) diff --git a/go.mod b/go.mod index 6961e629..125b6365 100755 --- a/go.mod +++ b/go.mod @@ -26,6 +26,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/bits-and-blooms/bitset v1.9.0 // indirect + github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/bytedance/sonic v1.11.3 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -38,6 +39,7 @@ require ( github.com/ethereum/c-kzg-4844 v0.3.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gin-contrib/cache v1.3.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect @@ -46,6 +48,7 @@ require ( github.com/go-stack/stack v1.8.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/gomodule/redigo v1.8.9 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect @@ -62,6 +65,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/memcachier/mc/v3 v3.0.3 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -71,6 +75,7 @@ require ( github.com/prometheus/client_golang v1.14.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect + github.com/robfig/go-cache v0.0.0-20130306151617-9fc39e0dbf62 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect diff --git a/go.sum b/go.sum index aacec97e..6e819e7d 100755 --- a/go.sum +++ b/go.sum @@ -5,6 +5,8 @@ github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/bits-and-blooms/bitset v1.9.0 h1:g1YivPG8jOtrN013Fe8OBXubkiTwvm7/vG2vXz03ANU= github.com/bits-and-blooms/bitset v1.9.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8bttX0bfZGmcGkjz7DLQXhAn3DNd3T0ous= +github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= @@ -54,6 +56,8 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gin-contrib/cache v1.3.0 h1:wEEw38uvb4rTraQJVpd9ex4ZotXNlc0fSaSUsuPXS/w= +github.com/gin-contrib/cache v1.3.0/go.mod h1:EA63LrWGI5vwSI95TS5fgBrtxZ1tM2NKx+NrEeyEDcU= github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= @@ -96,6 +100,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws= +github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -159,6 +165,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/memcachier/mc/v3 v3.0.3 h1:qii+lDiPKi36O4Xg+HVKwHu6Oq+Gt17b+uEiA0Drwv4= +github.com/memcachier/mc/v3 v3.0.3/go.mod h1:GzjocBahcXPxt2cmqzknrgqCOmMxiSzhVKPOe90Tpug= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= @@ -190,6 +198,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/robfig/go-cache v0.0.0-20130306151617-9fc39e0dbf62 h1:pyecQtsPmlkCsMkYhT5iZ+sUXuwee+OvfuJjinEA3ko= +github.com/robfig/go-cache v0.0.0-20130306151617-9fc39e0dbf62/go.mod h1:65XQgovT59RWatovFwnwocoUxiI/eENTnOY5GK3STuY= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=