mirror of
				https://github.com/gofiber/storage.git
				synced 2025-10-31 11:46:32 +08:00 
			
		
		
		
	Compare commits
	
		
			522 Commits
		
	
	
		
			mssql/v1.3
			...
			rueidis/v1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | f8afad537f | ||
|   | 468d82d9f7 | ||
|   | 54245b2520 | ||
|   | 1af49ff41d | ||
|   | a21d4daae0 | ||
|   | 7825d579b4 | ||
|   | 2e4b0128fa | ||
|   | a19da2b7c9 | ||
|   | 57e79dffb1 | ||
|   | 8c18ced1a7 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 8dd8253afb | ||
|   | 29370b8740 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 4501c4f5cd | ||
|   | 192b1a1bd1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | abc64d7e19 | ||
|   | 6c47c82c78 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | edb86a96cc | ||
|   | 0f229274e6 | ||
|   | 78cfcf3206 | ||
|   | e41f3e4131 | ||
|   | 0170bdc737 | ||
|   | d38f0f35f9 | ||
|   | c1055478ef | ||
|   | 88ce7d5d82 | ||
|   | 7eec5856a3 | ||
|   | e357a9c813 | ||
|   | 967b2258b9 | ||
|   | f5c4a78fb1 | ||
|   | 7e2c6a3e62 | ||
|   | 89c473aac7 | ||
|   | c9efab145d | ||
|   | 89be8f9d56 | ||
|   | a5b0a78828 | ||
|   | 6be213707b | ||
|   | 0e55883f05 | ||
|   | 033c8f432d | ||
|   | dc9bb23ade | ||
|   | 629c25208d | ||
|   | bf6aa0132c | ||
|   | 4dfe51aa01 | ||
|   | e735c69371 | ||
|   | ae41d2f5c1 | ||
|   | dc00bab703 | ||
|   | d06fbfc7f3 | ||
|   | e09d83368c | ||
|   | 1ddcc7b3fc | ||
|   | db6c457d5c | ||
|   | 1e3b3f6a5e | ||
|   | 26c755f312 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 095dbdbf59 | ||
|   | f9a87273bb | ||
|   | b6dbad7d88 | ||
|   | 8400db5161 | ||
|   | 2e2f6ca4de | ||
|   | 04d063e759 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e50171cdf4 | ||
|   | ffd79887c1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 994023df1e | ||
|   | e8756d084b | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 919f7f5ae7 | ||
|   | f98f6ff9e0 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b70ea3d72a | ||
|   | 6eba76bd26 | ||
|   | fee5f98406 | ||
|   | 551552f67f | ||
|   | 6cff923227 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 1399f55ed4 | ||
|   | 79fdc2ef78 | ||
|   | f4a12a2a3b | ||
|   | edf7bf23e3 | ||
|   | 1887a32ca2 | ||
|   | a1405af086 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | de487d56be | ||
|   | 5fd9819f5f | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b86255479c | ||
|   | 67218b0d19 | ||
|   | cdad22386e | ||
|   | cb6a705473 | ||
|   | e0523db53d | ||
|   | c49bca76d7 | ||
|   | 3d598445e3 | ||
|   | 949c597508 | ||
|   | ca32702aa0 | ||
|   | 0ccc5d3faa | ||
|   | 4c8f4dcdfc | ||
|   | d64fa185db | ||
|   | cd33dc926f | ||
|   | fd63105282 | ||
|   | dda7fcf987 | ||
|   | b597a36454 | ||
|   | b2636aa4c1 | ||
|   | b3fe37dd3d | ||
|   | d62aeb54b9 | ||
|   | dab578a096 | ||
|   | 42ff8d51c0 | ||
|   | 68fe393de4 | ||
|   | 4493457cfa | ||
|   | 5b49d3629c | ||
|   | 244330f96e | ||
|   | 7f002b3158 | ||
|   | d3d3a58f6e | ||
|   | bec8bb64e1 | ||
|   | 580a711cb1 | ||
|   | 23de4dd79e | ||
|   | 21eb34fec7 | ||
|   | 4248a8dadd | ||
|   | 5ac0392c81 | ||
|   | 10e4f45ac0 | ||
|   | 52531187b6 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 91238492d9 | ||
|   | cd048ea1e4 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 72a1732d4f | ||
|   | 3c4d46ec33 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | ef8b444526 | ||
|   | cb5c20b678 | ||
|   | 9a076a7d97 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b3bc9aa5a8 | ||
|   | ae0bd1f240 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 2f08be65dd | ||
|   | 1276f80f98 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | dc747fad0b | ||
|   | bbbf496e55 | ||
|   | 0be0639df2 | ||
|   | aa41235bb1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 67e0819a58 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c34cb47590 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 3bad978a1a | ||
|   | eb9a8113a3 | ||
|   | bceeafc8fd | ||
|   | 7ce64c3b69 | ||
|   | e567a01fec | ||
|   | 41ad317a6d | ||
|   | 9ca7b53525 | ||
|   | 63dc8d573e | ||
|   | 5d97bb6ee7 | ||
|   | 9d99e7dd5b | ||
|   | 1a8785d923 | ||
|   | b8ff60572a | ||
|   | e197f1da4f | ||
|   | 2d528c3c8d | ||
|   | dc20615b37 | ||
|   | 047ac39af8 | ||
|   | 4c1b8b2c6f | ||
|   | 861ed0de56 | ||
|   | 97864349cc | ||
|   | e8fd10468f | ||
|   | 332e9e8a34 | ||
|   | cf1a09c9a7 | ||
|   | 146884c135 | ||
|   | b875ca4ec9 | ||
|   | 9570205b8a | ||
|   | 947221b4fb | ||
|   | 0579065c4c | ||
|   | df27520950 | ||
|   | aacefe5192 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 62a7e09e0d | ||
|   | a6d0384463 | ||
|   | dc81749d44 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 11423e276a | ||
|   | 4ca664384d | ||
|   | 287ddc84da | ||
|   | 5c80a1463b | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 943166ff54 | ||
|   | ff142d955f | ||
|   | 8d2fbb7eb6 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d91fcfedd7 | ||
|   | ffc4ad7fd3 | ||
|   | fe8f993a09 | ||
|   | 2e0424da1b | ||
|   | 4b24a4110d | ||
|   | d732f1fc51 | ||
|   | c0cc07ca93 | ||
|   | 32af1f92eb | ||
|   | d2e42fb3ee | ||
|   | 96f78dabcc | ||
|   | 7b58635b7a | ||
|   | a638b6d4f2 | ||
|   | 9291b82212 | ||
|   | c338ddedc1 | ||
|   | 02d809987a | ||
|   | 2779bfdf01 | ||
|   | 1cfebe3f24 | ||
|   | c08ed0777d | ||
|   | 7378b389fe | ||
|   | 68c7f58148 | ||
|   | 9e70dd7aea | ||
|   | 9afd1a7e2a | ||
|   | 67893bd836 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c9d759856f | ||
|   | 52575a7a8c | ||
|   | cbd74dfa4b | ||
|   | cc1606c4f0 | ||
|   | 34a3d09c10 | ||
|   | 53b7ad097a | ||
|   | c06825e675 | ||
|   | 9913f90294 | ||
|   | 7c47f7c73b | ||
|   | 8cacec6c93 | ||
|   | 600279ff2b | ||
|   | 8b678034a2 | ||
|   | b846e12cee | ||
|   | c739918a1d | ||
|   | ca369ed8d1 | ||
|   | b3ebd57893 | ||
|   | b88fd4b669 | ||
|   | acf5d5e908 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b04c6f55ab | ||
|   | 7aac904d3c | ||
|   | 77f2925eb3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a90bf53050 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e1a47955c4 | ||
|   | 1c64281504 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 4f767a442f | ||
|   | d8196abb41 | ||
|   | efd18a5221 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c13002a7cf | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 16297b41e4 | ||
|   | 9efee1f3fd | ||
|   | 97801c76d1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f0c98a8d8a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 9a68dda690 | ||
|   | 9703f07095 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e3348774d5 | ||
|   | 5b6ee8d932 | ||
|   | c226e12e98 | ||
|   | 02a2c19bf6 | ||
|   | 7d3e9bd163 | ||
|   | 5e68bddd6b | ||
|   | 1d3b96559f | ||
|   | 65350fb284 | ||
|   | 882dfc4741 | ||
|   | 83671bae11 | ||
|   | f38613bb8d | ||
|   | 43daa3c38f | ||
|   | f3982278e6 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d214e31e38 | ||
|   | ce198b356f | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | aa3e354dd5 | ||
|   | cd50c3984e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 7780bb0835 | ||
|   | 5e41163c09 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e2dbf474d8 | ||
|   | 9bc2d17db3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f09e7dd6b3 | ||
|   | 171768b257 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 2ba75947e3 | ||
|   | 6ec8ea5fe1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d6d4099b08 | ||
|   | 7d20c7c120 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a422c6c644 | ||
|   | 9737e2d4ed | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a3d7a1a2ed | ||
|   | 2290b36a60 | ||
|   | 758db5b001 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 399f853aa9 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 9cd1c62ffa | ||
|   | e3d9a2c985 | ||
|   | 498f5148a1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 8640390354 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 56e6944f92 | ||
|   | e47c2094dd | ||
|   | 1adda1a865 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 356396f6c3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 5ef6847c83 | ||
|   | 155170e061 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 13685e4388 | ||
|   | 0be3deac04 | ||
|   | 3729e3401a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | de5476b910 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | ba2542e0c2 | ||
|   | 6efab9994b | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 6984822651 | ||
|   | 7e1e44dc62 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 59b17408c6 | ||
|   | 4cc0f4f2f4 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d0d7be2983 | ||
|   | f5c7691e7a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | cbca7ba17a | ||
|   | e460e37927 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 782c77def0 | ||
|   | 3d3cecf34d | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c67907f872 | ||
|   | 7f45922477 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b75a6767e8 | ||
|   | 0150f5f926 | ||
|   | 98bebea186 | ||
|   | 56a4cbfc19 | ||
|   | 60220b5b83 | ||
|   | 304146395d | ||
|   | a5635a782f | ||
|   | df66fb784c | ||
|   | 9a9a1ce716 | ||
|   | 5c3a1ca3eb | ||
|   | 95226eed34 | ||
|   | 33a61daca9 | ||
|   | 6c71397839 | ||
|   | 9fba60d754 | ||
|   | a115ee2fba | ||
|   | 31e2d80802 | ||
|   | bbbd3e8ad1 | ||
|   | 9edc233ee7 | ||
|   | c030fac063 | ||
|   | 36401996a5 | ||
|   | c4a57d2fbe | ||
|   | f0e4fda91b | ||
|   | d95d8e93b9 | ||
|   | 2ce3ae15bf | ||
|   | c592c8b549 | ||
|   | 9f8afc3ce9 | ||
|   | 2b4e7abe21 | ||
|   | 3c0ea943b0 | ||
|   | 9757af64f1 | ||
|   | b24255db5e | ||
|   | 5aa726f723 | ||
|   | e42a4816ac | ||
|   | 4137501136 | ||
|   | f72d263ecb | ||
|   | 41bc99cc17 | ||
|   | e71c5057ac | ||
|   | 4190ba4790 | ||
|   | 1f1e7edd2a | ||
|   | b4151987ad | ||
|   | 6fbb923377 | ||
|   | 1743f57c9c | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 4c06b1802d | ||
|   | 5c222a8684 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | ad837a4f68 | ||
|   | 8f9884ade2 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 8ae4fed70a | ||
|   | 349820a7d1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 5bbdaaf114 | ||
|   | 455eb537ac | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a37efaa61b | ||
|   | 3a98e867cb | ||
|   | 15d7b9ed6d | ||
|   | cc87dce84d | ||
|   | c651866df3 | ||
|   | e19782fb04 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 17d0b6dd0b | ||
|   | 201e025ee8 | ||
|   | 448c43ff43 | ||
|   | cd292b687f | ||
|   | 19ee2e65b8 | ||
|   | a276545019 | ||
|   | b892818d23 | ||
|   | 28b8432101 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 772f808741 | ||
|   | cdd6008fbb | ||
|   | e1214a9ccc | ||
|   | 426e8266c5 | ||
|   | 821232a3c4 | ||
|   | 6a8f254286 | ||
|   | 1af4aa7ac9 | ||
|   | b031cab8df | ||
|   | 56a60b7f0a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 1e6d856921 | ||
|   | 53ecdac6f1 | ||
|   | 3b6636b0ef | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 5102a5d757 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 869d99ce0f | ||
|   | 2d2739c33a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b7bd9bd90e | ||
|   | b7954d8a33 | ||
|   | 7b7c79acb3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 4b76119c68 | ||
|   | 10b721602f | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 21297be965 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 85f3189476 | ||
|   | cf1a4a6345 | ||
|   | 9294e3e676 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 85c4df40cd | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 62e0250560 | ||
|   | cd72744191 | ||
|   | c38fc91d9d | ||
|   | b76d1302b1 | ||
|   | bbbcbd2b23 | ||
|   | 6c53b6664f | ||
|   | 6f49a10c0c | ||
|   | ad190e72fe | ||
|   | 259782bc5e | ||
|   | 98ed2982ec | ||
|   | 27dd8f698e | ||
|   | 0bb88f2eda | ||
|   | 0886756196 | ||
|   | 1232a9d64c | ||
|   | a0ef0d32fe | ||
|   | 96d14d009d | ||
|   | 1fcc337ab7 | ||
|   | 0f2c58a7cc | ||
|   | f4c8d08849 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 5effaf1761 | ||
|   | 940432bfee | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 3fa3b411f6 | ||
|   | 59aaa96760 | ||
|   | f07e3fd77f | ||
|   | 0fdcdfd35b | ||
|   | ed3de3f984 | ||
|   | f1840c82ae | ||
|   | b1ae386d8f | ||
|   | 55d0e8bf1e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d5ffdf4330 | ||
|   | 08b47b0ba7 | ||
|   | bae367bf31 | ||
|   | d7e05cabb9 | ||
|   | 7cf8aa2e57 | ||
|   | 8225ee4fc6 | ||
|   | ae72763b86 | ||
|   | 2653a66f19 | ||
|   | 0272238cb6 | ||
|   | 87bb8a408c | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 38c7d87300 | ||
|   | 544251e681 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 79079a1588 | ||
|   | c90677d575 | ||
|   | 544eab8907 | ||
|   | 9b8fbbe710 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 3cf40177fb | ||
|   | 3a9b0d3b4f | ||
|   | 30046f9723 | ||
|   | 1944178657 | ||
|   | aa82816129 | ||
|   | ae6582d8c7 | ||
|   | d865a554b1 | ||
|   | a5b87a0d48 | ||
|   | 56366d252e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 40d0bbcd04 | ||
|   | 337863256a | ||
|   | d536bf88ec | ||
|   | 5a94b0cafc | ||
|   | d50dbef8b0 | ||
|   | 6c22baa03c | ||
|   | 7e6c59b984 | ||
|   | 1e53c43669 | ||
|   | e1d6198d07 | ||
|   | 3e95f45a26 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 932bb5bb7c | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | bc217cf94d | ||
|   | 9cd63043c7 | ||
|   | d574b31723 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f9f90a78aa | ||
|   | 2751b27d8e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 763cd2a116 | ||
|   | e35c881c60 | ||
|   | 5ddd49417e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a536aeb484 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d556f0600c | ||
|   | 86a070ba95 | ||
|   | 8b43d65db7 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a442a10435 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 0f19d7e7a3 | ||
|   | 40b55f8623 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f0a9cb7eb5 | ||
|   | baf1cd6f6f | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 363da11e66 | ||
|   | a6ed269baf | ||
|   | bdd345a093 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c5ebba6a5f | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f22219bc24 | ||
|   | b2c586c124 | ||
|   | d4e2e3855a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c14486d19c | ||
|   | 59b965453e | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 7202c98a32 | ||
|   | 4216da2c74 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | f095be3ebf | ||
|   | 6581ab3f07 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | c8ef22ea1f | ||
|   | bd32283899 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | ef180673e3 | ||
|   | 50b0432d75 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 7de9b3831a | ||
|   | cca505e8d7 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | dc1a243d40 | ||
|   | a905829b4b | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b02409072e | ||
|   | b4a187a288 | ||
|   | afcdf55278 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 57009f9900 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 30088827f8 | ||
|   | 3cb256e558 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | cc387a31a8 | ||
|   | 255d499dd1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 035e220e4a | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 12ef109fb1 | ||
|   | 7d72f76698 | ||
|   | 33e4902051 | ||
|   | 5bbdf2fba6 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 6f259cefd2 | ||
|   | 8ab3b8216d | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e93f03c1e4 | ||
|   | 38c207c315 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 2bdc69ea0b | ||
|   | 6daf9a2b07 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 9f6ffa3b2e | ||
|   | e0d5aef2a3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | b61bc913ca | ||
|   | 2ac08c9d70 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 9e37910ee5 | ||
|   | 0b8805bc3d | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | eadf410bbe | ||
|   | b735c4a72a | ||
|   | 98f78cf864 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 7d726253df | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 91824ad6c8 | ||
|   | 55dc0cf6e0 | ||
|   | 808cf6778b | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | d1c3493765 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 85c11d850d | ||
|   | 10680abda7 | ||
|   | 200738a370 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 6a8b73a2f3 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | a66b7764f6 | ||
|   | 0be1c37af5 | ||
|   | afe52a9cf8 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 6ef0db07d1 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 960163ea48 | ||
|   | ec9d4c1f18 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | 7f67534357 | ||
|   | f411b856f8 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e37cc98b6d | ||
|   | ac5787fa65 | ||
| ![dependabot[bot]](/assets/img/avatar_default.png)  | e7e03c2743 | 
							
								
								
									
										79
									
								
								.github/ISSUE_TEMPLATE/bug-report.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								.github/ISSUE_TEMPLATE/bug-report.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,79 @@ | ||||
| name: "\U0001F41B Bug Report" | ||||
| title: "\U0001F41B [Bug]: " | ||||
| description: Create a bug report to help us fix it. | ||||
| labels: ["☢️ Bug"] | ||||
|  | ||||
| body: | ||||
|   - type: markdown | ||||
|     id: notice | ||||
|     attributes: | ||||
|       value: | | ||||
|         ### Notice | ||||
|         - Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord). | ||||
|         - If you think Fiber storage don't have a nice feature that you think, open the issue with **✏️ Feature Request** template. | ||||
|         - Write your issue with clear and understandable English. | ||||
|   - type: textarea | ||||
|     id: description | ||||
|     attributes: | ||||
|       label: "Bug Description" | ||||
|       description: "A clear and detailed description of what the bug is." | ||||
|       placeholder: "Explain your problem as clear and detailed." | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: textarea | ||||
|     id: how-to-reproduce | ||||
|     attributes: | ||||
|       label: How to Reproduce | ||||
|       description: "Steps to reproduce the behavior and what should be observed in the end." | ||||
|       placeholder: "Tell us step by step how we can replicate your problem and what we should see in the end." | ||||
|       value: | | ||||
|           Steps to reproduce the behavior: | ||||
|           1. Go to '....' | ||||
|           2. Click on '....' | ||||
|           3. Do '....' | ||||
|           4. See '....' | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: textarea | ||||
|     id: expected-behavior | ||||
|     attributes: | ||||
|       label: Expected Behavior | ||||
|       description: "A clear and detailed description of what you think should happens." | ||||
|       placeholder: "Tell us what storage should normally do." | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: input | ||||
|     id: version | ||||
|     attributes: | ||||
|       label: "Storage package Version" | ||||
|       description: "Some bugs may be fixed in future storage releases, so we have to know your storage package version." | ||||
|       placeholder: "Write your storage version. (v1.0.0, v1.1.0...)" | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: textarea | ||||
|     id: snippet | ||||
|     attributes: | ||||
|       label: "Code Snippet (optional)" | ||||
|       description: "For some issues, we need to know some parts of your code." | ||||
|       placeholder: "Share a code you think related to the issue." | ||||
|       render: go | ||||
|       value: | | ||||
|         package main | ||||
|  | ||||
|         import "github.com/gofiber/storage/%package%" | ||||
|  | ||||
|         func main() { | ||||
|           // Steps to reproduce | ||||
|         } | ||||
|   - type: checkboxes | ||||
|     id: terms | ||||
|     attributes: | ||||
|       label: "Checklist:" | ||||
|       description: "By submitting this issue, you confirm that:" | ||||
|       options: | ||||
|         - label: "I agree to follow Fiber's [Code of Conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md)." | ||||
|           required: true | ||||
|         - label: "I have checked for existing issues that describe my problem prior to opening this one." | ||||
|           required: true | ||||
|         - label: "I understand that improperly formatted bug reports may be closed without explanation." | ||||
|           required: true | ||||
							
								
								
									
										55
									
								
								.github/ISSUE_TEMPLATE/feature-request.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								.github/ISSUE_TEMPLATE/feature-request.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| name: "\U0001F680 Feature Request" | ||||
| title: "\U0001F680 [Feature]: " | ||||
| description: Suggest an idea to improve this project. | ||||
| labels: ["✏️ Feature"] | ||||
|  | ||||
| body: | ||||
|   - type: markdown | ||||
|     id: notice | ||||
|     attributes: | ||||
|       value: | | ||||
|         ### Notice | ||||
|         - Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord). | ||||
|         - If you think this is just a bug, open the issue with **☢️ Bug Report** template. | ||||
|         - Write your issue with clear and understandable English. | ||||
|   - type: textarea | ||||
|     id: description | ||||
|     attributes: | ||||
|       label: "Feature Description" | ||||
|       description: "A clear and detailed description of the feature we need to do." | ||||
|       placeholder: "Explain your feature as clear and detailed." | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: textarea | ||||
|     id: additional-context | ||||
|     attributes: | ||||
|       label: "Additional Context (optional)" | ||||
|       description: "If you have something else to describe, write them here." | ||||
|       placeholder: "Write here what you can describe differently." | ||||
|   - type: textarea | ||||
|     id: snippet | ||||
|     attributes: | ||||
|       label: "Code Snippet (optional)" | ||||
|       description: "Code snippet may be really helpful to describe some features." | ||||
|       placeholder: "Share a code to explain the feature better." | ||||
|       render: go | ||||
|       value: | | ||||
|         package main | ||||
|  | ||||
|         import "github.com/gofiber/storage/%package%" | ||||
|  | ||||
|         func main() { | ||||
|           // Steps to reproduce | ||||
|         } | ||||
|   - type: checkboxes | ||||
|     id: terms | ||||
|     attributes: | ||||
|       label: "Checklist:" | ||||
|       description: "By submitting this issue, you confirm that:" | ||||
|       options: | ||||
|         - label: "I agree to follow Fiber's [Code of Conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md)." | ||||
|           required: true | ||||
|         - label: "I have checked for existing issues that describe my suggestion prior to opening this one." | ||||
|           required: true | ||||
|         - label: "I understand that improperly formatted feature requests may be closed without explanation." | ||||
|           required: true | ||||
							
								
								
									
										50
									
								
								.github/ISSUE_TEMPLATE/question.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/ISSUE_TEMPLATE/question.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name: "🤔 Question" | ||||
| title: "\U0001F917 [Question]: " | ||||
| description: Ask a question so we can help you easily. | ||||
| labels: ["🤔 Question"] | ||||
|  | ||||
| body: | ||||
|   - type: markdown | ||||
|     id: notice | ||||
|     attributes: | ||||
|       value: | | ||||
|         ### Notice | ||||
|         - Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord). | ||||
|         - If you think this is just a bug, open the issue with **☢️ Bug Report** template. | ||||
|         - If you think Fiber storage don't have a nice feature that you think, open the issue with **✏️ Feature Request** template. | ||||
|         - Write your issue with clear and understandable English. | ||||
|   - type: textarea | ||||
|     id: description | ||||
|     attributes: | ||||
|       label: "Question Description" | ||||
|       description: "A clear and detailed description of the question." | ||||
|       placeholder: "Explain your question as clear and detailed." | ||||
|     validations: | ||||
|       required: true | ||||
|   - type: textarea | ||||
|     id: snippet | ||||
|     attributes: | ||||
|       label: "Code Snippet (optional)" | ||||
|       description: "Code snippet may be really helpful to describe some features." | ||||
|       placeholder: "Share a code to explain the feature better." | ||||
|       render: go | ||||
|       value: | | ||||
|         package main | ||||
|  | ||||
|         import "github.com/gofiber/storage/%package%" | ||||
|  | ||||
|         func main() { | ||||
|           // Steps to reproduce | ||||
|         } | ||||
|   - type: checkboxes | ||||
|     id: terms | ||||
|     attributes: | ||||
|       label: "Checklist:" | ||||
|       description: "By submitting this issue, you confirm that:" | ||||
|       options: | ||||
|         - label: "I agree to follow Fiber's [Code of Conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md)." | ||||
|           required: true | ||||
|         - label: "I have checked for existing issues that describe my questions prior to opening this one." | ||||
|           required: true | ||||
|         - label: "I understand that improperly formatted questions may be closed without explanation." | ||||
|           required: true | ||||
							
								
								
									
										37
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							| @@ -26,6 +26,30 @@ updates: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/couchbase/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/coherence/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/etcd/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/pebble/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/dynamodb/" # Location of package manifests | ||||
|         labels: | ||||
| @@ -44,6 +68,12 @@ updates: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     - package-ecosystem: "gomod" | ||||
|       directory: "/minio/" # Location of package manifests | ||||
|       labels: | ||||
|           - "🤖 Dependencies" | ||||
|       schedule: | ||||
|           interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/mongodb/" # Location of package manifests | ||||
|         labels: | ||||
| @@ -98,8 +128,15 @@ updates: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/mssql/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|     -   package-ecosystem: "gomod" | ||||
|         directory: "/rueidis/" # Location of package manifests | ||||
|         labels: | ||||
|             - "🤖 Dependencies" | ||||
|         schedule: | ||||
|             interval: "daily" | ||||
|   | ||||
							
								
								
									
										9
									
								
								.github/logo-dark.svg
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.github/logo-dark.svg
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| After Width: | Height: | Size: 14 KiB | 
							
								
								
									
										9
									
								
								.github/logo.svg
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.github/logo.svg
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| After Width: | Height: | Size: 14 KiB | 
							
								
								
									
										7
									
								
								.github/release-drafter-arangodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-arangodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: arangodb/v | ||||
| include-paths: | ||||
|   - arangodb | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-azureblob.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-azureblob.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: azureblob/v | ||||
| include-paths: | ||||
|   - azureblob | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-badger.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-badger.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: badger/v | ||||
| include-paths: | ||||
|   - badger | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-bbolt.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-bbolt.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: bbolt/v | ||||
| include-paths: | ||||
|   - bbolt | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: 'Coherence - v$RESOLVED_VERSION' | ||||
| tag-template: 'coherence/v$RESOLVED_VERSION' | ||||
| tag-prefix: coherence/v | ||||
| include-paths: | ||||
|   - coherence | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|     $CHANGES | ||||
|  | ||||
|     **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...coherence/v$RESOLVED_VERSION | ||||
|  | ||||
|     Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: 'Couchbase - v$RESOLVED_VERSION' | ||||
| tag-template: 'couchbase/v$RESOLVED_VERSION' | ||||
| tag-prefix: couchbase/v | ||||
| include-paths: | ||||
|   - couchbase | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|   $CHANGES | ||||
|  | ||||
|   **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...couchbase/v$RESOLVED_VERSION | ||||
|  | ||||
|   Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-dynamodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-dynamodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: dynamodb/v | ||||
| include-paths: | ||||
|   - dynamodb | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: 'Etcd - v$RESOLVED_VERSION' | ||||
| tag-template: 'etcd/v$RESOLVED_VERSION' | ||||
| tag-prefix: etcd/v | ||||
| include-paths: | ||||
|     - etcd | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|     $CHANGES | ||||
|  | ||||
|     **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...etcd/v$RESOLVED_VERSION | ||||
|  | ||||
|     Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-memcache.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-memcache.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: memcache/v | ||||
| include-paths: | ||||
|   - memcache | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-memory.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-memory.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: memory/v | ||||
| include-paths: | ||||
|   - memory | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: 'Minio - v$RESOLVED_VERSION' | ||||
| tag-template: 'minio/v$RESOLVED_VERSION' | ||||
| tag-prefix: minio/v | ||||
| include-paths: | ||||
|   - minio | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|     $CHANGES | ||||
|  | ||||
|     **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...minio/v$RESOLVED_VERSION | ||||
|  | ||||
|     Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-mongodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-mongodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: mongodb/v | ||||
| include-paths: | ||||
|   - mongodb | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-mssql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-mssql.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: mssql/v | ||||
| include-paths: | ||||
|   - mssql | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-mysql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-mysql.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: mysql/v | ||||
| include-paths: | ||||
|   - mysql | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: "Pebble - v$RESOLVED_VERSION" | ||||
| tag-template: "pebble/v$RESOLVED_VERSION" | ||||
| tag-prefix: pebble/v | ||||
| include-paths: | ||||
|   - pebble | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|   $CHANGES | ||||
|  | ||||
|   **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...pebble/v$RESOLVED_VERSION | ||||
|  | ||||
|   Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-postgres.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-postgres.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: postgres/v | ||||
| include-paths: | ||||
|   - postgres | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-redis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-redis.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: redis/v | ||||
| include-paths: | ||||
|   - redis | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-ristretto.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-ristretto.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: ristretto/v | ||||
| include-paths: | ||||
|   - ristretto | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										50
									
								
								.github/release-drafter-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								.github/release-drafter-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| name-template: 'Rueidis - v$RESOLVED_VERSION' | ||||
| tag-template: 'rueidis/v$RESOLVED_VERSION' | ||||
| tag-prefix: rueidis/v | ||||
| include-paths: | ||||
|   - rueidis | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
|     - title: '🧹 Updates' | ||||
|       labels: | ||||
|           - '🧹 Updates' | ||||
|           - '🤖 Dependencies' | ||||
|     - title: '🐛 Fixes' | ||||
|       labels: | ||||
|           - '☢️ Bug' | ||||
|     - title: '📚 Documentation' | ||||
|       labels: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|             - '✏️ Feature' | ||||
|     patch: | ||||
|         labels: | ||||
|             - 'patch' | ||||
|             - '📒 Documentation' | ||||
|             - '☢️ Bug' | ||||
|             - '🤖 Dependencies' | ||||
|             - '🧹 Updates' | ||||
|     default: patch | ||||
| template: | | ||||
|     $CHANGES | ||||
|  | ||||
|     **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...rueidis/v$RESOLVED_VERSION | ||||
|  | ||||
|     Thank you $CONTRIBUTORS for making this update possible. | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-s3.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-s3.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: s3/v | ||||
| include-paths: | ||||
|   - s3 | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/release-drafter-sqlite3.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/release-drafter-sqlite3.yml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,9 @@ tag-prefix: sqlite3/v | ||||
| include-paths: | ||||
|   - sqlite3 | ||||
| categories: | ||||
|     - title: '❗ Breaking Changes' | ||||
|       labels: | ||||
|           - '❗ BreakingChange' | ||||
|     - title: '🚀 New' | ||||
|       labels: | ||||
|           - '✏️ Feature' | ||||
| @@ -19,10 +22,14 @@ categories: | ||||
|           - '📒 Documentation' | ||||
| change-template: '- $TITLE (#$NUMBER)' | ||||
| change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||||
| exclude-contributors: | ||||
|     - dependabot | ||||
|     - dependabot[bot] | ||||
| version-resolver: | ||||
|     major: | ||||
|         labels: | ||||
|             - 'major' | ||||
|             - '❗ BreakingChange' | ||||
|     minor: | ||||
|         labels: | ||||
|             - 'minor' | ||||
|   | ||||
							
								
								
									
										11
									
								
								redis/tests/gen-test-certs.sh → .github/scripts/gen-test-certs.sh
									
									
									
									
										vendored
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										11
									
								
								redis/tests/gen-test-certs.sh → .github/scripts/gen-test-certs.sh
									
									
									
									
										vendored
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -6,7 +6,8 @@ | ||||
| #   ./tls/redis.{crt,key}       A certificate with no key usage/policy restrictions. | ||||
| #   ./tls/client.{crt,key}      A certificate restricted for SSL client usage. | ||||
| #   ./tls/server.{crt,key}      A certificate restricted for SSL server usage. | ||||
| #   ./tls/redis.dh              DH Params file. | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
| generate_cert() { | ||||
|     local name=$1 | ||||
| @@ -45,6 +46,8 @@ cat > ./tls/openssl.cnf <<_END_ | ||||
| [ server_cert ] | ||||
| keyUsage = digitalSignature, keyEncipherment | ||||
| nsCertType = server | ||||
| subjectAltName = DNS:localhost" | ||||
| 
 | ||||
| [ client_cert ] | ||||
| keyUsage = digitalSignature, keyEncipherment | ||||
| nsCertType = client | ||||
| @@ -52,6 +55,8 @@ _END_ | ||||
| 
 | ||||
| generate_cert server "Server-only" "-extfile ./tls/openssl.cnf -extensions server_cert" | ||||
| generate_cert client "Client-only" "-extfile ./tls/openssl.cnf -extensions client_cert" | ||||
| generate_cert redis "Generic-cert" | ||||
| generate_cert redis "localhost" "-extfile ./tls/openssl.cnf -extensions server_cert" | ||||
| 
 | ||||
| [ -f ./tls/redis.dh ] || openssl dhparam -out ./tls/redis.dh 2048 | ||||
| # List generated certs | ||||
| ls -la ./tls | ||||
| echo "$PWD" | ||||
							
								
								
									
										83
									
								
								.github/scripts/sync_docs.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										83
									
								
								.github/scripts/sync_docs.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							| @@ -0,0 +1,83 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| # Some env variables | ||||
| BRANCH="main" | ||||
| REPO_URL="github.com/gofiber/docs.git" | ||||
| AUTHOR_EMAIL="github-actions[bot]@users.noreply.github.com" | ||||
| AUTHOR_USERNAME="github-actions[bot]" | ||||
| VERSION_FILE="storage_versions.json" | ||||
| REPO_DIR="storage" | ||||
| COMMIT_URL="https://github.com/gofiber/storage" | ||||
| DOCUSAURUS_COMMAND="npm run docusaurus -- docs:version:storage" | ||||
|  | ||||
| # Set commit author | ||||
| git config --global user.email "${AUTHOR_EMAIL}" | ||||
| git config --global user.name "${AUTHOR_USERNAME}" | ||||
|  | ||||
| git clone https://${TOKEN}@${REPO_URL} fiber-docs | ||||
|  | ||||
| # Handle push event | ||||
| if [ "$EVENT" == "push" ]; then | ||||
| latest_commit=$(git rev-parse --short HEAD) | ||||
|  | ||||
| for f in $(find . -type f -name "*.md" -not -path "./fiber-docs/*"); do | ||||
|   log_output=$(git log --oneline "${BRANCH}" HEAD~1..HEAD --name-status -- "${f}") | ||||
|  | ||||
|     if [[ $log_output != "" || ! -f "fiber-docs/docs/${REPO_DIR}/$f" ]]; then | ||||
|       mkdir -p fiber-docs/docs/${REPO_DIR}/$(dirname $f) | ||||
|       cp "${f}" fiber-docs/docs/${REPO_DIR}/$f | ||||
|   fi | ||||
| done | ||||
|  | ||||
| # Handle release event | ||||
| elif [ "$EVENT" == "release" ]; then | ||||
|   # Extract package name from tag | ||||
|   package_name="${TAG_NAME%/*}" | ||||
|   major_version="${TAG_NAME#*/}" | ||||
|   major_version="${major_version%%.*}" | ||||
|  | ||||
|   # Form new version name | ||||
|   new_version="${package_name}_${major_version}.x.x" | ||||
|  | ||||
|   cd fiber-docs/ || true | ||||
|   npm ci | ||||
|  | ||||
|   # Check if contrib_versions.json exists and modify it if required | ||||
|   if [[ -f $VERSION_FILE ]]; then | ||||
|     jq --arg new_version "$new_version" 'del(.[] | select(. == $new_version))' $VERSION_FILE > temp.json && mv temp.json $VERSION_FILE | ||||
|   fi | ||||
|  | ||||
|   # Run docusaurus versioning command | ||||
|   $DOCUSAURUS_COMMAND "${new_version}" | ||||
|  | ||||
|   if [[ -f $VERSION_FILE ]]; then | ||||
|     jq 'sort | reverse' ${VERSION_FILE} > temp.json && mv temp.json ${VERSION_FILE} | ||||
|   fi | ||||
| fi | ||||
|  | ||||
| # Push changes | ||||
| cd fiber-docs/ || true | ||||
| git add . | ||||
| if [[ $EVENT == "push" ]]; then | ||||
|     git commit -m "Add docs from ${COMMIT_URL}/commit/${latest_commit}" | ||||
| elif [[ $EVENT == "release" ]]; then | ||||
|     git commit -m "Sync docs for release ${COMMIT_URL}/releases/tag/${TAG_NAME}" | ||||
| fi | ||||
|  | ||||
| MAX_RETRIES=5 | ||||
| DELAY=5 | ||||
| retry=0 | ||||
|  | ||||
| while ((retry < MAX_RETRIES)) | ||||
| do | ||||
|     git push https://${TOKEN}@${REPO_URL} && break | ||||
|     retry=$((retry + 1)) | ||||
|     git pull --rebase | ||||
|     sleep $DELAY | ||||
| done | ||||
|  | ||||
| if ((retry == MAX_RETRIES)) | ||||
| then | ||||
|     echo "Failed to push after $MAX_RETRIES attempts. Exiting with 1." | ||||
|     exit 1 | ||||
| fi | ||||
							
								
								
									
										2
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							| @@ -16,7 +16,7 @@ jobs: | ||||
|  | ||||
|     steps: | ||||
|     - name: Checkout repository | ||||
|       uses: actions/checkout@v3 | ||||
|       uses: actions/checkout@v4 | ||||
|       with: | ||||
|         # We must fetch at least the immediate parents so that if this is | ||||
|         # a pull request then we can checkout the head. | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/dependabot_automerge.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/dependabot_automerge.yml
									
									
									
									
										vendored
									
									
								
							| @@ -28,7 +28,7 @@ jobs: | ||||
|     steps: | ||||
|       - name: Dependabot metadata | ||||
|         id: metadata | ||||
|         uses: dependabot/fetch-metadata@v1.3.6 | ||||
|         uses: dependabot/fetch-metadata@v1.6.0 | ||||
|         with: | ||||
|           github-token: "${{ secrets.PR_TOKEN }}" | ||||
|       - name: Enable auto-merge for Dependabot PRs | ||||
|   | ||||
							
								
								
									
										31
									
								
								.github/workflows/golangci-lint.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/golangci-lint.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| name: Golangci Lint Check | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - "master" | ||||
|       - "main" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - "*" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|  | ||||
| jobs: | ||||
|   golangci-lint: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Fetch Repository | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Run golangci-lint | ||||
|         uses: reviewdog/action-golangci-lint@v2 | ||||
|         with: | ||||
|           golangci_lint_flags: "--tests=false" | ||||
							
								
								
									
										126
									
								
								.github/workflows/gosec.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								.github/workflows/gosec.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,126 @@ | ||||
| name: Gosec Security Scan | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - "master" | ||||
|       - "main" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - "*" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|  | ||||
| jobs: | ||||
|   gosec-scan: | ||||
|     runs-on: ubuntu-latest | ||||
|     env: | ||||
|       GO111MODULE: on | ||||
|     steps: | ||||
|       - name: Fetch Repository | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Install Go | ||||
|         uses: actions/setup-go@v4 | ||||
|         with: | ||||
|           go-version: '^1.19.x' | ||||
|           check-latest: true | ||||
|           cache: false | ||||
|       - name: Install Gosec | ||||
|         run: go install github.com/securego/gosec/v2/cmd/gosec@latest | ||||
|       - name: Run Gosec (root) | ||||
|         working-directory: . | ||||
|         run: | | ||||
|           gosec . | ||||
|         # ----- | ||||
|       - name: Run Gosec (arangodb) | ||||
|         working-directory: ./arangodb | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (badger) | ||||
|         working-directory: ./badger | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (couchbase) | ||||
|         working-directory: ./couchbase | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (coherence) | ||||
|         working-directory: ./coherence | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (dynamodb) | ||||
|         working-directory: ./dynamodb | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (etcd) | ||||
|         working-directory: ./etcd | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (memcache) | ||||
|         working-directory: ./memcache | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (memory) | ||||
|         working-directory: ./memory | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (minio) | ||||
|         working-directory: ./minio | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (mongodb) | ||||
|         working-directory: ./mongodb | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (mysql) | ||||
|         working-directory: ./mysql | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (postgres) | ||||
|         working-directory: ./postgres | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (redis) | ||||
|         working-directory: ./redis | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (sqlite3) | ||||
|         working-directory: ./sqlite3 | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (s3) | ||||
|         working-directory: ./s3 | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (ristretto) | ||||
|         working-directory: ./ristretto | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (bbolt) | ||||
|         working-directory: ./bbolt | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (azureblob) | ||||
|         working-directory: ./azureblob | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (mssql) | ||||
|         working-directory: ./mssql | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (pebble) | ||||
|         working-directory: ./pebble | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
|       - name: Run Gosec (rueidis) | ||||
|         working-directory: ./rueidis | ||||
|         run: gosec ./... | ||||
|         # ----- | ||||
							
								
								
									
										39
									
								
								.github/workflows/govulncheck.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/govulncheck.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| name: Govulncheck Security Scan | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - "master" | ||||
|       - "main" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - "*" | ||||
|     paths-ignore: | ||||
|       - "**.md" | ||||
|       - LICENSE | ||||
|       - ".github/ISSUE_TEMPLATE/*.yml" | ||||
|       - ".github/dependabot.yml" | ||||
|  | ||||
| jobs: | ||||
|   govulncheck-check: | ||||
|     runs-on: ubuntu-latest | ||||
|     env: | ||||
|       GO111MODULE: on | ||||
|     steps: | ||||
|     - name: Fetch Repository | ||||
|       uses: actions/checkout@v4 | ||||
|     - name: Install Go | ||||
|       uses: actions/setup-go@v4 | ||||
|       with: | ||||
|         go-version: 'stable' | ||||
|         check-latest: true | ||||
|         cache: false | ||||
|     - name: Install Govulncheck | ||||
|       run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||||
|     - name: Run Govulncheck | ||||
|       run: govulncheck ./... | ||||
							
								
								
									
										17
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,17 +0,0 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|     pull_request: | ||||
| name: Linter | ||||
| jobs: | ||||
|   Golint: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Fetch Repository | ||||
|         uses: actions/checkout@v3 | ||||
|       - name: Run Golint | ||||
|         uses: reviewdog/action-golangci-lint@v2 | ||||
|         with: | ||||
|           golangci_lint_flags: "--tests=false" | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Coherence | ||||
| on: | ||||
|     push: | ||||
|         # branches to consider in the event; optional, defaults to all | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'coherence/**' | ||||
| jobs: | ||||
|     draft_release_coherence: | ||||
|         runs-on: ubuntu-latest | ||||
|         timeout-minutes: 30 | ||||
|         steps: | ||||
|             -   uses: release-drafter/release-drafter@v5 | ||||
|                 with: | ||||
|                     config-name: release-drafter-coherence.yml | ||||
|                 env: | ||||
|                     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Couchbase | ||||
| on: | ||||
|   push: | ||||
|     # branches to consider in the event; optional, defaults to all | ||||
|     branches: | ||||
|       - master | ||||
|       - main | ||||
|     paths: | ||||
|       - 'couchbase/**' | ||||
| jobs: | ||||
|   draft_release_couchbase: | ||||
|     runs-on: ubuntu-latest | ||||
|     timeout-minutes: 30 | ||||
|     steps: | ||||
|       -   uses: release-drafter/release-drafter@v5 | ||||
|           with: | ||||
|             config-name: release-drafter-couchbase.yml | ||||
|           env: | ||||
|             GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Etcd | ||||
| on: | ||||
|     push: | ||||
|         # branches to consider in the event; optional, defaults to all | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'etcd/**' | ||||
| jobs: | ||||
|     draft_release_etcd: | ||||
|         runs-on: ubuntu-latest | ||||
|         timeout-minutes: 30 | ||||
|         steps: | ||||
|             -   uses: release-drafter/release-drafter@v5 | ||||
|                 with: | ||||
|                     config-name: release-drafter-etcd.yml | ||||
|                 env: | ||||
|                     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-memory.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-memory.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Memory | ||||
| on: | ||||
|     push: | ||||
|         # branches to consider in the event; optional, defaults to all | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'memory/**' | ||||
| jobs: | ||||
|     draft_release_memcache: | ||||
|         runs-on: ubuntu-latest | ||||
|         timeout-minutes: 30 | ||||
|         steps: | ||||
|             -   uses: release-drafter/release-drafter@v5 | ||||
|                 with: | ||||
|                     config-name: release-drafter-memory.yml | ||||
|                 env: | ||||
|                     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Minio | ||||
| on: | ||||
|     push: | ||||
|         # branches to consider in the event; optional, defaults to all | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'minio/**' | ||||
| jobs: | ||||
|     draft_release_minio: | ||||
|         runs-on: ubuntu-latest | ||||
|         timeout-minutes: 30 | ||||
|         steps: | ||||
|             -   uses: release-drafter/release-drafter@v5 | ||||
|                 with: | ||||
|                     config-name: release-drafter-minio.yml | ||||
|                 env: | ||||
|                     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Pebble | ||||
| on: | ||||
|   push: | ||||
|     # branches to consider in the event; optional, defaults to all | ||||
|     branches: | ||||
|       - master | ||||
|       - main | ||||
|     paths: | ||||
|       - "pebble/**" | ||||
| jobs: | ||||
|   draft_release_pebble: | ||||
|     runs-on: ubuntu-latest | ||||
|     timeout-minutes: 30 | ||||
|     steps: | ||||
|       - uses: release-drafter/release-drafter@v5 | ||||
|         with: | ||||
|           config-name: release-drafter-pebble.yml | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										19
									
								
								.github/workflows/release-drafter-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release-drafter-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| name: Release Drafter Rueidis | ||||
| on: | ||||
|     push: | ||||
|         # branches to consider in the event; optional, defaults to all | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'rueidis/**' | ||||
| jobs: | ||||
|     draft_release_rueidis: | ||||
|         runs-on: ubuntu-latest | ||||
|         timeout-minutes: 30 | ||||
|         steps: | ||||
|             -   uses: release-drafter/release-drafter@v5 | ||||
|                 with: | ||||
|                     config-name: release-drafter-rueidis.yml | ||||
|                 env: | ||||
|                     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										85
									
								
								.github/workflows/security.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										85
									
								
								.github/workflows/security.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,85 +0,0 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|     pull_request: | ||||
| name: Security | ||||
| jobs: | ||||
|     Gosec: | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '^1.17.x' | ||||
|             -   name: Install Gosec | ||||
|                 run: | | ||||
|                     export PATH=${PATH}:`go env GOPATH`/bin | ||||
|                     go install github.com/securego/gosec/v2/cmd/gosec@latest | ||||
|             -   name: Run Gosec (root) | ||||
|                 working-directory: . | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal -exclude-dir=arangodb -exclude-dir=badger -exclude-dir=dynamodb -exclude-dir=memcache -exclude-dir=memory -exclude-dir=mongodb -exclude-dir=mysql -exclude-dir=postgres -exclude-dir=redis -exclude-dir=ristretto -exclude-dir=sqlite3 -exclude-dir=s3 -exclude-dir=bbolt -exclude-dir=azureblob -exclude-dir=mssql ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (arangodb) | ||||
|                 working-directory: ./arangodb | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (badger) | ||||
|                 working-directory: ./badger | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (dynamodb) | ||||
|                 working-directory: ./dynamodb | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (memcache) | ||||
|                 working-directory: ./memcache | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (memory) | ||||
|                 working-directory: ./memory | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (mongodb) | ||||
|                 working-directory: ./mongodb | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (mysql) | ||||
|                 working-directory: ./mysql | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (postgres) | ||||
|                 working-directory: ./postgres | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (redis) | ||||
|                 working-directory: ./redis | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (sqlite3) | ||||
|                 working-directory: ./sqlite3 | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (s3) | ||||
|                 working-directory: ./s3 | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (ristretto) | ||||
|                 working-directory: ./ristretto | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (bbolt) | ||||
|                 working-directory: ./bbolt | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (azureblob) | ||||
|                 working-directory: ./azureblob | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
|             -   name: Run Gosec (mssql) | ||||
|                 working-directory: ./mssql | ||||
|                 run: "`go env GOPATH`/bin/gosec -exclude-dir=internal ./..." | ||||
|                 # ----- | ||||
							
								
								
									
										38
									
								
								.github/workflows/sync-docs.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/sync-docs.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| name: 'Sync docs' | ||||
|  | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - '**/*.md' | ||||
|     release: | ||||
|         types: [published] | ||||
|         branches: | ||||
|             - '*/v[0-9]+.[0-9]+.[0-9]+' | ||||
|  | ||||
| jobs: | ||||
|     sync-docs: | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             - name: Checkout | ||||
|               uses: actions/checkout@v4 | ||||
|               with: | ||||
|                   ref: ${{ github.event.pull_request.head.sha }} | ||||
|                   fetch-depth: 2 | ||||
|  | ||||
|             - name: Setup Node.js environment | ||||
|               uses: actions/setup-node@v3 | ||||
|               with: | ||||
|                   node-version: '18' | ||||
|  | ||||
|             - name: Install JQ | ||||
|               run: sudo apt-get install jq | ||||
|  | ||||
|             - name: Sync docs | ||||
|               run: ./.github/scripts/sync_docs.sh | ||||
|               env: | ||||
|                   EVENT: ${{ github.event_name }} | ||||
|                   TAG_NAME: ${{ github.ref_name }} | ||||
|                   TOKEN: ${{ secrets.DOC_SYNC_TOKEN }} | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-arangodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-arangodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -22,32 +22,15 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./arangodb && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										22
									
								
								.github/workflows/test-azureblob.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/test-azureblob.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,34 +15,18 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|         -   name: Install Azurite | ||||
|             run: | | ||||
|                 docker run -d -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0 --blobPort 10000 | ||||
|         -   name: Fetch Repository | ||||
|             uses: actions/checkout@v4 | ||||
|         -   name: Install Go | ||||
|             uses: actions/setup-go@v4 | ||||
|             with: | ||||
|                 go-version: '${{ matrix.go-version }}' | ||||
|         -   name: Setup Golang caches | ||||
|             uses: actions/cache@v3 | ||||
|             with: | ||||
|                 # In order: | ||||
|                 # * Module download cache | ||||
|                 # * Build cache (Linux) | ||||
|                 # * Build cache (Mac) | ||||
|                 # * Build cache (Windows) | ||||
|                 path: | | ||||
|                     ~/go/pkg/mod | ||||
|                     ~/.cache/go-build | ||||
|                     ~/Library/Caches/go-build | ||||
|                     ~\AppData\Local\go-build | ||||
|                 key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                 restore-keys: | | ||||
|                     ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|         -   name: Fetch Repository | ||||
|             uses: actions/checkout@v3 | ||||
|         -   name: Run Test | ||||
|             run: cd ./azureblob && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-badger.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-badger.yml
									
									
									
									
										vendored
									
									
								
							| @@ -14,33 +14,16 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|  | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Test Badger | ||||
|                 run: cd ./badger && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										22
									
								
								.github/workflows/test-bbolt.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/test-bbolt.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,31 +15,15 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./bbolt && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										33
									
								
								.github/workflows/test-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/test-coherence.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|       - main | ||||
|     paths: | ||||
|       - 'coherence/**' | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - 'coherence/**' | ||||
| name: "Tests Coherence" | ||||
| jobs: | ||||
|   Tests: | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         go-version: | ||||
|           - 1.19.x | ||||
|           - 1.20.x | ||||
|           - 1.21.x | ||||
|     steps: | ||||
|       - name: Fetch Repository | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Startup Coherence | ||||
|         run: | | ||||
|           docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:22.06.5 | ||||
|           sleep 30 | ||||
|       -   name: Install Go | ||||
|           uses: actions/setup-go@v4 | ||||
|           with: | ||||
|             go-version: '${{ matrix.go-version }}' | ||||
|       -   name: Run Test | ||||
|           run: cd ./coherence && go clean -testcache && go test ./... -v | ||||
							
								
								
									
										36
									
								
								.github/workflows/test-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.github/workflows/test-couchbase.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|       - main | ||||
|     paths: | ||||
|       - 'couchbase/**' | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - 'couchbase/**' | ||||
| name: "Tests Couchbase" | ||||
| jobs: | ||||
|   Tests: | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         go-version: | ||||
|           - 1.19.x | ||||
|           - 1.20.x | ||||
|           - 1.21.x | ||||
|     steps: | ||||
|       - name: Fetch Repository | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Install couchbase | ||||
|         run: | | ||||
|           docker run --name couchbase -d -p 8091-8097:8091-8097 -p 9123:9123 -p 11207:11207 -p 11210:11210 -p 11280:11280 -p 18091-18097:18091-18097 couchbase:enterprise-7.1.1 | ||||
|           sleep 10 | ||||
|           docker exec --tty couchbase couchbase-cli cluster-init -c localhost:8091 --cluster-username admin --cluster-password 123456 --cluster-ramsize 256 --services data | ||||
|           sleep 10 | ||||
|           docker exec --tty couchbase couchbase-cli bucket-create -c localhost:8091 --username admin --password 123456 --bucket fiber_storage --bucket-type couchbase --bucket-ramsize 100 --enable-flush 1 | ||||
|       -   name: Install Go | ||||
|           uses: actions/setup-go@v4 | ||||
|           with: | ||||
|             go-version: '${{ matrix.go-version }}' | ||||
|       -   name: Run Test | ||||
|           run: cd ./couchbase && go test ./... -v -race | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-dynamodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-dynamodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -20,32 +20,15 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./dynamodb && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										38
									
								
								.github/workflows/test-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/test-etcd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'etcd/**' | ||||
|     pull_request: | ||||
|         paths: | ||||
|             - 'etcd/**' | ||||
| name: "Tests Etcd" | ||||
| jobs: | ||||
|     Tests: | ||||
|         runs-on: ubuntu-latest | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install etcd | ||||
|                 run: | | ||||
|                     docker run -d --name Etcd-server \ | ||||
|                       --publish 2379:2379 \ | ||||
|                       --publish 2380:2380 \ | ||||
|                       --env ALLOW_NONE_AUTHENTICATION=yes \ | ||||
|                       --env ETCD_ADVERTISE_CLIENT_URLS=http://etcd-server:2379 \ | ||||
|                       bitnami/etcd:latest | ||||
|  | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Run Test | ||||
|                 run: cd ./etcd && go test ./... -v -race | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-memcache.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-memcache.yml
									
									
									
									
										vendored
									
									
								
							| @@ -20,32 +20,15 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./memcache && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										29
									
								
								.github/workflows/test-memory.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/test-memory.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'memory/**' | ||||
|     pull_request: | ||||
|         paths: | ||||
|             - 'memory/**' | ||||
| name: "Tests Local Storage" | ||||
| jobs: | ||||
|     Tests: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Test Memory | ||||
|                 run: cd ./memory && go test ./... -v -race | ||||
							
								
								
									
										33
									
								
								.github/workflows/test-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/test-minio.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'minio/**' | ||||
|     pull_request: | ||||
|         paths: | ||||
|             - 'minio/**' | ||||
| name: "Tests Minio" | ||||
| jobs: | ||||
|     Tests: | ||||
|         runs-on: ubuntu-latest | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Install MinIO | ||||
|                 run: | | ||||
|                     docker run -d --restart always -p 9000:9000 --name storage-minio -e MINIO_ROOT_USER='minio-user' -e MINIO_ROOT_PASSWORD='minio-password' minio/minio server /data | ||||
|  | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Run Test | ||||
|                 run: cd ./minio && go test ./... -v -race | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-mongodb.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-mongodb.yml
									
									
									
									
										vendored
									
									
								
							| @@ -20,33 +20,16 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./mongodb && go test ./... -v -race | ||||
|  | ||||
|   | ||||
							
								
								
									
										22
									
								
								.github/workflows/test-mssql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/test-mssql.yml
									
									
									
									
										vendored
									
									
								
							| @@ -32,32 +32,16 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./mssql && go test ./... -v -race | ||||
|                 env: | ||||
|   | ||||
							
								
								
									
										23
									
								
								.github/workflows/test-mysql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test-mysql.yml
									
									
									
									
										vendored
									
									
								
							| @@ -28,33 +28,16 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./mysql && go test ./... -v -race | ||||
|                 env: | ||||
|   | ||||
							
								
								
									
										29
									
								
								.github/workflows/test-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/test-pebble.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|       - main | ||||
|     paths: | ||||
|       - "pebble/**" | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - "pebble/**" | ||||
| name: "Tests pebble" | ||||
| jobs: | ||||
|   Tests: | ||||
|     strategy: | ||||
|       matrix: | ||||
|         go-version: | ||||
|           - 1.19.x | ||||
|           - 1.20.x | ||||
|           - 1.21.x | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     -   name: Fetch Repository | ||||
|         uses: actions/checkout@v4 | ||||
|     -   name: Install Go | ||||
|         uses: actions/setup-go@v4 | ||||
|         with: | ||||
|             go-version: '${{ matrix.go-version }}' | ||||
|     -   name: Test Pebble | ||||
|         run: cd ./pebble && go test ./... -v -race | ||||
							
								
								
									
										21
									
								
								.github/workflows/test-postgres.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/test-postgres.yml
									
									
									
									
										vendored
									
									
								
							| @@ -29,29 +29,14 @@ jobs: | ||||
|                 go-version: | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Run Test | ||||
|                 run: cd ./postgres && go test ./... -v -race | ||||
|                 env: | ||||
|   | ||||
							
								
								
									
										48
									
								
								.github/workflows/test-redis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										48
									
								
								.github/workflows/test-redis.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,33 +15,48 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|                 redis: | ||||
|                     - '6.x' | ||||
|                     - '7.x' | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|                 uses: actions/checkout@v4 | ||||
|  | ||||
|             -   name: Generate TLS certs | ||||
|                 run: ./.github/scripts/gen-test-certs.sh | ||||
|  | ||||
|             -   name: Add Custom CA cert | ||||
|                 run: sudo cp /home/runner/work/storage/storage/tls/ca.crt /usr/local/share/ca-certificates/custom.crt | ||||
|  | ||||
|             -   name: Trust Custom CA Cert | ||||
|                 run: sudo update-ca-certificates | ||||
|  | ||||
|             -   name: Setup Redis | ||||
|                 uses: shogo82148/actions-setup-redis@v1 | ||||
|                 with: | ||||
|                     redis-version: ${{ matrix.redis }} | ||||
|                     auto-start: 'false' | ||||
|                     redis-port: '6379' | ||||
|                     redis-tls-port: '6380' | ||||
|  | ||||
|             -   name: Run Redis | ||||
|                 run: | | ||||
|                     redis-server --tls-port 6380 --port 6379 \ | ||||
|                     --tls-cert-file ./redis/tests/tls/redis.crt \ | ||||
|                     --tls-key-file ./redis/tests/tls/redis.key \ | ||||
|                     --tls-ca-cert-file ./redis/tests/tls/ca.crt& | ||||
|                     --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ | ||||
|                     --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ | ||||
|                     --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt & | ||||
|  | ||||
|             -   name: Run Redis instance with MTLS disabled | ||||
|                 run: | | ||||
|                     redis-server --tls-port 16380 --port 16379 \ | ||||
|                     --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ | ||||
|                     --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ | ||||
|                     --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt \ | ||||
|                     --tls-auth-clients no & | ||||
|  | ||||
|             -   name: Setup Redis Cluster | ||||
|                 uses: vishnudxb/redis-cluster@1.0.5 | ||||
|                 uses: vishnudxb/redis-cluster@1.0.8 | ||||
|                 with: | ||||
|                     master1-port: 7000 | ||||
|                     master2-port: 7001 | ||||
| @@ -55,22 +70,5 @@ jobs: | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|  | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|  | ||||
|             -   name: Run Test | ||||
|                 run: cd ./redis && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										34
									
								
								.github/workflows/test-ristretto.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/test-ristretto.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,31 +15,15 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|         -   name: Install Go | ||||
|             uses: actions/setup-go@v4 | ||||
|             with: | ||||
|                 go-version: '${{ matrix.go-version }}' | ||||
|         -   name: Setup Golang caches | ||||
|             uses: actions/cache@v3 | ||||
|             with: | ||||
|                 # In order: | ||||
|                 # * Module download cache | ||||
|                 # * Build cache (Linux) | ||||
|                 # * Build cache (Mac) | ||||
|                 # * Build cache (Windows) | ||||
|                 path: | | ||||
|                     ~/go/pkg/mod | ||||
|                     ~/.cache/go-build | ||||
|                     ~/Library/Caches/go-build | ||||
|                     ~\AppData\Local\go-build | ||||
|                 key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                 restore-keys: | | ||||
|                     ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|         -   name: Fetch Repository | ||||
|             uses: actions/checkout@v3 | ||||
|         -   name: Run Test | ||||
|             run: cd ./ristretto && go test ./... -v -race | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Run Test | ||||
|                 run: cd ./ristretto && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										61
									
								
								.github/workflows/test-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								.github/workflows/test-rueidis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'rueidis/**' | ||||
|     pull_request: | ||||
|         paths: | ||||
|             - 'rueidis/**' | ||||
| name: "Tests Rueidis" | ||||
| jobs: | ||||
|     Tests: | ||||
|         runs-on: ubuntu-latest | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|                 redis: | ||||
|                     - '6.x' | ||||
|                     - '7.x' | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|  | ||||
|             -   name: Generate TLS certs | ||||
|                 run: ./.github/scripts/gen-test-certs.sh | ||||
|  | ||||
|             -   name: Setup Redis | ||||
|                 uses: shogo82148/actions-setup-redis@v1 | ||||
|                 with: | ||||
|                     redis-version: ${{ matrix.redis }} | ||||
|                     auto-start: 'false' | ||||
|                     redis-port: '6379' | ||||
|                     redis-tls-port: '6380' | ||||
|  | ||||
|             -   name: Run Redis | ||||
|                 run: | | ||||
|                     redis-server --tls-port 6380 --port 6379 \ | ||||
|                     --tls-cert-file /home/runner/work/storage/storage/tls/redis.crt \ | ||||
|                     --tls-key-file /home/runner/work/storage/storage/tls/redis.key \ | ||||
|                     --tls-ca-cert-file /home/runner/work/storage/storage/tls/ca.crt & | ||||
|  | ||||
|             -   name: Setup Redis Cluster | ||||
|                 uses: vishnudxb/redis-cluster@1.0.8 | ||||
|                 with: | ||||
|                     master1-port: 7000 | ||||
|                     master2-port: 7001 | ||||
|                     master3-port: 7002 | ||||
|                     slave1-port: 7003 | ||||
|                     slave2-port: 7004 | ||||
|                     slave3-port: 7005 | ||||
|  | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|  | ||||
|             -   name: Run Test | ||||
|                 run: cd ./rueidis && go test ./... -v -race | ||||
							
								
								
									
										31
									
								
								.github/workflows/test-s3.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/test-s3.yml
									
									
									
									
										vendored
									
									
								
							| @@ -15,40 +15,17 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         steps: | ||||
|         -   name: Install MinIO | ||||
|             run: | | ||||
|                 docker run -d -p 9000:9000 --name minio minio/minio server /data | ||||
|  | ||||
|                 export AWS_ACCESS_KEY_ID=minioadmin | ||||
|                 export AWS_SECRET_ACCESS_KEY=minioadmin | ||||
|                 export AWS_EC2_METADATA_DISABLED=true | ||||
|  | ||||
|                 aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://testbucket | ||||
|             run: docker run -d -p 9000:9000 --name minio minio/minio server /data | ||||
|         -   name: Fetch Repository | ||||
|             uses: actions/checkout@v4 | ||||
|         -   name: Install Go | ||||
|             uses: actions/setup-go@v4 | ||||
|             with: | ||||
|                 go-version: '${{ matrix.go-version }}' | ||||
|         -   name: Setup Golang caches | ||||
|             uses: actions/cache@v3 | ||||
|             with: | ||||
|                 # In order: | ||||
|                 # * Module download cache | ||||
|                 # * Build cache (Linux) | ||||
|                 # * Build cache (Mac) | ||||
|                 # * Build cache (Windows) | ||||
|                 path: | | ||||
|                     ~/go/pkg/mod | ||||
|                     ~/.cache/go-build | ||||
|                     ~/Library/Caches/go-build | ||||
|                     ~\AppData\Local\go-build | ||||
|                 key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                 restore-keys: | | ||||
|                     ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|         -   name: Fetch Repository | ||||
|             uses: actions/checkout@v3 | ||||
|         -   name: Run Test | ||||
|             run: cd ./s3 && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										24
									
								
								.github/workflows/test-sqlite3.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/test-sqlite3.yml
									
									
									
									
										vendored
									
									
								
							| @@ -14,35 +14,17 @@ jobs: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|                     - 1.21.x | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v4 | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|  | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Test SQLite3 - with -race check | ||||
|                 if: runner.os != 'Windows' | ||||
|                 run: cd ./sqlite3 && go test ./... -v -race | ||||
|   | ||||
							
								
								
									
										47
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										47
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,47 +0,0 @@ | ||||
| on: | ||||
|     push: | ||||
|         branches: | ||||
|             - master | ||||
|             - main | ||||
|         paths: | ||||
|             - 'memory/**' | ||||
|     pull_request: | ||||
|         paths: | ||||
|             - 'memory/**' | ||||
| name: "Tests Local Storage" | ||||
| jobs: | ||||
|     Tests: | ||||
|         strategy: | ||||
|             matrix: | ||||
|                 go-version: | ||||
|                     - 1.17.x | ||||
|                     - 1.18.x | ||||
|                     - 1.19.x | ||||
|                     - 1.20.x | ||||
|         runs-on: ubuntu-latest | ||||
|         steps: | ||||
|             -   name: Install Go | ||||
|                 uses: actions/setup-go@v4 | ||||
|                 with: | ||||
|                     go-version: '${{ matrix.go-version }}' | ||||
|             -   name: Setup Golang caches | ||||
|                 uses: actions/cache@v3 | ||||
|                 with: | ||||
|                     # In order: | ||||
|                     # * Module download cache | ||||
|                     # * Build cache (Linux) | ||||
|                     # * Build cache (Mac) | ||||
|                     # * Build cache (Windows) | ||||
|                     path: | | ||||
|                         ~/go/pkg/mod | ||||
|                         ~/.cache/go-build | ||||
|                         ~/Library/Caches/go-build | ||||
|                         ~\AppData\Local\go-build | ||||
|                     key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||||
|                     restore-keys: | | ||||
|                         ${{ runner.os }}-go-${{ matrix.go-version }}- | ||||
|  | ||||
|             -   name: Fetch Repository | ||||
|                 uses: actions/checkout@v3 | ||||
|             -   name: Test Memory | ||||
|                 run: cd ./memory && go test ./... -v -race | ||||
							
								
								
									
										19
									
								
								.github/workflows/vulncheck.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/vulncheck.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,19 +0,0 @@ | ||||
| on: [push, pull_request_target] | ||||
| name: Vulnerability Check | ||||
| jobs: | ||||
|   Security: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - name: Install Go | ||||
|       uses: actions/setup-go@v4 | ||||
|       with: | ||||
|         go-version: 1.18.x | ||||
|     - name: Fetch Repository | ||||
|       uses: actions/checkout@v3 | ||||
|     - name: Install Govulncheck | ||||
|       run: | | ||||
|           export GO111MODULE=on | ||||
|           export PATH=${PATH}:`go env GOPATH`/bin | ||||
|           go install golang.org/x/vuln/cmd/govulncheck@latest | ||||
|     - name: Run Govulncheck | ||||
|       run: "`go env GOPATH`/bin/govulncheck ./..." | ||||
							
								
								
									
										22
									
								
								MIGRATE.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								MIGRATE.md
									
									
									
									
									
								
							| @@ -1,22 +0,0 @@ | ||||
| This document contains instructions for migrating to various storage versions. | ||||
|  | ||||
| ### 0.1 -> 0.2 | ||||
| v0.2 fixes [a bug](https://github.com/gofiber/fiber/issues/1258) in MYSQL, Postgres and Arangodb in which  | ||||
| inserting non-UTF8 characters would trigger a panic due to the values being saved in a TEXT column instead of a  | ||||
| BYTEA/BLOB column. Migration instructions (note you may need to adjust the table names if you have supplied a custom | ||||
| config to the storage): | ||||
|  | ||||
| **Postgres** | ||||
| ```sql | ||||
| ALTER TABLE fiber_storage | ||||
| ALTER COLUMN v TYPE BYTEA USING v::bytea; | ||||
| ``` | ||||
|  | ||||
| **MYSQL** | ||||
| ```sql | ||||
| ALTER TABLE fiber_storage MODIFY COLUMN v BLOB; | ||||
| ``` | ||||
|  | ||||
| **Arangodb** | ||||
|  | ||||
| No migration other then updating the library is necessary. | ||||
							
								
								
									
										167
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										167
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,94 +1,73 @@ | ||||
| <p align="center"> | ||||
|   <!-- <a href="https://gofiber.io"> | ||||
|     <img alt="Fiber" height="125" src="https://raw.githubusercontent.com/gofiber/docs/master/static/fiber_v2_logo.svg"> | ||||
|    </a> | ||||
|   <br>   --> | ||||
|  | ||||
|   # 📦 Storage | ||||
|  | ||||
|   <a href="https://pkg.go.dev/github.com/gofiber/storage?tab=doc"> | ||||
|     <img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"> | ||||
|   </a> | ||||
|   <a href="https://goreportcard.com/report/github.com/gofiber/storage"> | ||||
|     <img src="https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"> | ||||
|   </a> | ||||
|   <a href="https://gocover.io/github.com/gofiber/storage"> | ||||
|     <img src="https://img.shields.io/badge/%F0%9F%94%8E%20gocover-97.8%25-75C46B.svg?style=flat"> | ||||
|   </a> | ||||
|   <a href="https://gofiber.io/discord"> | ||||
|     <img src="https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"> | ||||
|   </a> | ||||
| </p> | ||||
|  | ||||
| Premade storage drivers that implement the [`Storage`](https://github.com/gofiber/storage/blob/main/storage.go) interface, designed to be used with various [Fiber middlewares](https://github.com/gofiber/fiber/tree/master/middleware). | ||||
|  | ||||
| ```go | ||||
| // Storage interface for communicating with different database/key-value | ||||
| // providers. Visit https://github.com/gofiber/storage for more info. | ||||
| type Storage interface { | ||||
| 	// Get gets the value for the given key. | ||||
| 	// `nil, nil` is returned when the key does not exist | ||||
| 	Get(key string) ([]byte, error) | ||||
|  | ||||
| 	// Set stores the given value for the given key along | ||||
| 	// with an expiration value, 0 means no expiration. | ||||
| 	// Empty key or value will be ignored without an error. | ||||
| 	Set(key string, val []byte, exp time.Duration) error | ||||
|  | ||||
| 	// Delete deletes the value for the given key. | ||||
| 	// It returns no error if the storage does not contain the key, | ||||
| 	Delete(key string) error | ||||
|  | ||||
| 	// Reset resets the storage and delete all keys. | ||||
| 	Reset() error | ||||
|  | ||||
| 	// Close closes the storage and will stop any running garbage | ||||
| 	// collectors and open connections. | ||||
| 	Close() error | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ## 📑 Storage Implementations | ||||
|  | ||||
| * [ArangoDB](/arangodb) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [AzureBlob](/azureblob) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"> | ||||
|   <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Badger](/badger) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Bbolt](/bbolt) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [DynamoDB](/dynamodb) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Memcache](/memcache) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Memory](/memory) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [MongoDB](/mongodb) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [MSSQL](/mssql) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [MySQL](/mysql) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Postgres](/postgres) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [Redis](/redis) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [SQLite3](/sqlite3) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| * [S3](/s3) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"> | ||||
|     <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"> | ||||
|   </a> | ||||
| --- | ||||
| title: 👋 Welcome | ||||
| description: 📦 Premade storage drivers for 🚀 Fiber. | ||||
| sidebar_position: 1 | ||||
| --- | ||||
|  | ||||
| <p align="center"> | ||||
|   <img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only" /> | ||||
|   <img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only" /> | ||||
|   <br/> | ||||
|  | ||||
|   <a href="https://pkg.go.dev/github.com/gofiber/storage?tab=doc"> | ||||
|     <img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"/> | ||||
|   </a> | ||||
|   <a href="https://goreportcard.com/report/github.com/gofiber/storage"> | ||||
|     <img src="https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"/> | ||||
|   </a> | ||||
|   <a href="https://gofiber.io/discord"> | ||||
|     <img src="https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"/> | ||||
|   </a> | ||||
| </p> | ||||
|  | ||||
| Premade storage drivers that implement the [`Storage`](https://github.com/gofiber/storage/blob/main/storage.go) interface, designed to be used with various [Fiber middlewares](https://github.com/gofiber/fiber/tree/master/middleware). | ||||
|  | ||||
| ```go | ||||
| // Storage interface for communicating with different database/key-value | ||||
| // providers. Visit https://github.com/gofiber/storage for more info. | ||||
| type Storage interface { | ||||
| 	// Get gets the value for the given key. | ||||
| 	// `nil, nil` is returned when the key does not exist | ||||
| 	Get(key string) ([]byte, error) | ||||
|  | ||||
| 	// Set stores the given value for the given key along | ||||
| 	// with an expiration value, 0 means no expiration. | ||||
| 	// Empty key or value will be ignored without an error. | ||||
| 	Set(key string, val []byte, exp time.Duration) error | ||||
|  | ||||
| 	// Delete deletes the value for the given key. | ||||
| 	// It returns no error if the storage does not contain the key, | ||||
| 	Delete(key string) error | ||||
|  | ||||
| 	// Reset resets the storage and delete all keys. | ||||
| 	Reset() error | ||||
|  | ||||
| 	// Close closes the storage and will stop any running garbage | ||||
| 	// collectors and open connections. | ||||
| 	Close() error | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ## 📑 Storage Implementations | ||||
|  | ||||
| - [ArangoDB](./arangodb/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [AzureBlob](./azureblob/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Badger](./badger/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Bbolt](./bbolt) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Coherence](./coherence/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Coherence%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-coherence.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Couchbase](./couchbase/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [DynamoDB](./dynamodb/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Etcd](./etcd/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Memcache](./memcache/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Memory](./memory/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Minio](./minio/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Minio%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-minio.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [MongoDB](./mongodb/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [MSSQL](./mssql/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [MySQL](./mysql/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Pebble](./pebble/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Postgres](./postgres/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Redis](./redis/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [Rueidis](./rueidis/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+rueidis%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-rueidis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [S3](./s3/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
| - [SQLite3](./sqlite3/README.md) <a href="https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B" /> </a> | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,18 @@ | ||||
| # ArangoDB | ||||
| --- | ||||
| id: arangodb | ||||
| title: ArangoDB | ||||
| --- | ||||
|  | ||||
|  | ||||
| [](https://gofiber.io/discord) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| A ArangoDB storage driver using `arangodb/go-driver` and [arangodb/go-driver](https://github.com/arangodb/go-driver). | ||||
|  | ||||
| **Note: Requires Go 1.19 and above** | ||||
|  | ||||
| ### Table of Contents | ||||
| - [Signatures](#signatures) | ||||
| - [Installation](#installation) | ||||
| @@ -25,13 +37,13 @@ go mod init github.com/<user>/<repo> | ||||
| ``` | ||||
| And then install the mysql implementation: | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/arangodb | ||||
| go get github.com/gofiber/storage/arangodb/v2 | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| Import the storage package. | ||||
| ```go | ||||
| import "github.com/gofiber/storage/arangodb" | ||||
| import "github.com/gofiber/storage/arangodb/v2" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
|  | ||||
| 	"github.com/arangodb/go-driver" | ||||
| 	"github.com/arangodb/go-driver/http" | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/gofiber/utils/v2" | ||||
| ) | ||||
|  | ||||
| // Storage interface that is implemented by storage providers | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
|  | ||||
| var testStore = New(Config{ | ||||
| @@ -18,7 +18,7 @@ func Test_ARANGODB_Set(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Upsert(t *testing.T) { | ||||
| @@ -28,10 +28,10 @@ func Test_ARANGODB_Upsert(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Get(t *testing.T) { | ||||
| @@ -41,11 +41,11 @@ func Test_ARANGODB_Get(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, val, result) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, val, result) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Set_Expiration(t *testing.T) { | ||||
| @@ -56,26 +56,23 @@ func Test_ARANGODB_Set_Expiration(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, exp) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	time.Sleep(1100 * time.Millisecond) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Get_Expired(t *testing.T) { | ||||
| 	var ( | ||||
| 		key = "john" | ||||
| 	) | ||||
| 	key := "john" | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Get_NotExist(t *testing.T) { | ||||
|  | ||||
| 	result, err := testStore.Get("notexist") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Delete(t *testing.T) { | ||||
| @@ -85,54 +82,52 @@ func Test_ARANGODB_Delete(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Delete(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Reset(t *testing.T) { | ||||
| 	var ( | ||||
| 		val = []byte("doe") | ||||
| 	) | ||||
| 	val := []byte("doe") | ||||
|  | ||||
| 	err := testStore.Set("john1", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set("john2", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Reset() | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get("john1") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
|  | ||||
| 	result, err = testStore.Get("john2") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Non_UTF8(t *testing.T) { | ||||
| 	val := []byte("0xF5") | ||||
|  | ||||
| 	err := testStore.Set("0xF6", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get("0xF6") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, val, result) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, val, result) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Close(t *testing.T) { | ||||
| 	utils.AssertEqual(t, nil, testStore.Close()) | ||||
| 	require.Nil(t, testStore.Close()) | ||||
| } | ||||
|  | ||||
| func Test_ARANGODB_Conn(t *testing.T) { | ||||
| 	utils.AssertEqual(t, true, testStore.Conn() != nil) | ||||
| 	require.True(t, testStore.Conn() != nil) | ||||
| } | ||||
|   | ||||
| @@ -1,13 +1,18 @@ | ||||
| module github.com/gofiber/storage/arangodb | ||||
| module github.com/gofiber/storage/arangodb/v2 | ||||
|  | ||||
| go 1.17 | ||||
| go 1.19 | ||||
|  | ||||
| require ( | ||||
| 	github.com/arangodb/go-driver v1.5.2 | ||||
| 	github.com/gofiber/utils v1.0.1 | ||||
| 	github.com/arangodb/go-driver v1.6.0 | ||||
| 	github.com/gofiber/utils/v2 v2.0.0-beta.3 | ||||
| 	github.com/stretchr/testify v1.8.4 | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/google/uuid v1.3.1 // indirect | ||||
| 	github.com/pkg/errors v0.9.1 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -1,56 +1,24 @@ | ||||
| github.com/arangodb/go-driver v1.5.2 h1:/gmUh2XbNJKvEMgldlZ465KfKfL8aHlsjen0AF50VgY= | ||||
| github.com/arangodb/go-driver v1.5.2/go.mod h1:VQNm7LN7ZzKZ8TxYQ3JJ7U/JTtb8y9fRiF11YMCjOTA= | ||||
| github.com/arangodb/go-driver v1.6.0 h1:NFWj/idqXZxhFVueihMSI2R9NotNIsgvNfM/xmpekb4= | ||||
| github.com/arangodb/go-driver v1.6.0/go.mod h1:HQmdGkvNMVBTE3SIPSQ8T/ZddC6iwNsfMR+dDJQxIsI= | ||||
| github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e h1:Xg+hGrY2LcQBbxd0ZFdbGSyRKTYMZCfBbw/pMJFOk1g= | ||||
| github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e/go.mod h1:mq7Shfa/CaixoDxiyAAc5jZ6CVBAyPaNQCGS7mkj4Ho= | ||||
| github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= | ||||
| github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | ||||
| github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= | ||||
| github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||||
| github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4= | ||||
| github.com/gofiber/utils v1.0.1 h1:knct4cXwBipWQqFrOy1Pv6UcgPM+EXo9jDgc66V1Qio= | ||||
| github.com/gofiber/utils v1.0.1/go.mod h1:pacRFtghAE3UoknMOUiXh2Io/nLWSUHtQCi/3QASsOc= | ||||
| github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= | ||||
| github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||||
| github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||||
| github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3 h1:pfOhUDDVjBJpkWv6C5jaDyYLvpui7zQ97zpyFFsUOKw= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3/go.mod h1:jsl17+MsKfwJjM3ONCE9Rzji/j8XNbwjhUVTjzgfDCo= | ||||
| github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= | ||||
| github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||||
| github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||||
| github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||||
| github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||||
| github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= | ||||
| github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= | ||||
| github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||||
| github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= | ||||
| github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= | ||||
| github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | ||||
| golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||||
| golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||||
| golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | ||||
| golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | ||||
| golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||||
| golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||||
| golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= | ||||
| golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||||
| golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= | ||||
| golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||
| golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||
| golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||||
| golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | ||||
| golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | ||||
| golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||||
| golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||||
| golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | ||||
| golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= | ||||
| golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||||
| golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||||
| golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||||
| golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | ||||
| golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||||
| github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||||
| github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= | ||||
| gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
|   | ||||
| @@ -1,8 +1,17 @@ | ||||
| # Azure blob | ||||
| --- | ||||
| id: azureblob | ||||
| title: Azure Blob | ||||
| --- | ||||
|  | ||||
|  | ||||
| [](https://gofiber.io/discord) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| [Azure Blob storage](https://azure.microsoft.com/en-us/products/storage/blobs/#overview) is Microsoft's object storage solution for the cloud. | ||||
|  | ||||
| > NOTE: Go **1.18** or later is required. Source: [link](https://github.com/Azure/azure-sdk-for-go/blob/main/README.md) | ||||
| **Note: Requires Go 1.19 and above** | ||||
|  | ||||
| ### Table of Contents | ||||
|  | ||||
| @@ -35,7 +44,7 @@ go mod init github.com/<user>/<repo> | ||||
| And then install the azure blob implementation: | ||||
|  | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/azureblob | ||||
| go get github.com/gofiber/storage/azureblob/v2 | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @@ -43,7 +52,7 @@ go get github.com/gofiber/storage/azureblob | ||||
| Import the storage package. | ||||
|  | ||||
| ```go | ||||
| import "github.com/gofiber/storage/azureblob" | ||||
| import "github.com/gofiber/storage/azureblob/v2" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
|   | ||||
| @@ -4,10 +4,11 @@ import ( | ||||
| 	"context" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" | ||||
| ) | ||||
|  | ||||
| // Storage interface that is implemented by storage providers | ||||
|   | ||||
| @@ -1,9 +1,10 @@ | ||||
| package azureblob | ||||
|  | ||||
| import ( | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" | ||||
| 	"github.com/gofiber/fiber/v2/utils" | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
|  | ||||
| func newStore() *Storage { | ||||
| @@ -17,6 +18,7 @@ func newStore() *Storage { | ||||
| 		}, | ||||
| 	}) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Get(t *testing.T) { | ||||
| 	var ( | ||||
| 		key = "john" | ||||
| @@ -25,11 +27,11 @@ func Test_AzureBlob_Get(t *testing.T) { | ||||
| 	testStore := newStore() | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, val, result) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, val, result) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Set(t *testing.T) { | ||||
| @@ -40,7 +42,7 @@ func Test_AzureBlob_Set(t *testing.T) { | ||||
|  | ||||
| 	testStore := newStore() | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Delete(t *testing.T) { | ||||
| @@ -51,10 +53,10 @@ func Test_AzureBlob_Delete(t *testing.T) { | ||||
| 	testStore := newStore() | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Delete(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	if err != nil { | ||||
| @@ -62,8 +64,8 @@ func Test_AzureBlob_Delete(t *testing.T) { | ||||
| 			err = nil | ||||
| 		} | ||||
| 	} | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Override(t *testing.T) { | ||||
| @@ -74,10 +76,10 @@ func Test_AzureBlob_Override(t *testing.T) { | ||||
| 	testStore := newStore() | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Get_NotExist(t *testing.T) { | ||||
| @@ -88,24 +90,22 @@ func Test_AzureBlob_Get_NotExist(t *testing.T) { | ||||
| 			err = nil | ||||
| 		} | ||||
| 	} | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Reset(t *testing.T) { | ||||
| 	var ( | ||||
| 		val = []byte("doe") | ||||
| 	) | ||||
| 	val := []byte("doe") | ||||
| 	testStore := newStore() | ||||
|  | ||||
| 	err := testStore.Set("john1", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set("john2", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Reset() | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get("john1") | ||||
| 	if err != nil { | ||||
| @@ -113,8 +113,8 @@ func Test_AzureBlob_Reset(t *testing.T) { | ||||
| 			err = nil | ||||
| 		} | ||||
| 	} | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
|  | ||||
| 	result, err = testStore.Get("john2") | ||||
| 	if err != nil { | ||||
| @@ -122,16 +122,16 @@ func Test_AzureBlob_Reset(t *testing.T) { | ||||
| 			err = nil | ||||
| 		} | ||||
| 	} | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_S3_Conn(t *testing.T) { | ||||
| 	testStore := newStore() | ||||
| 	utils.AssertEqual(t, true, testStore.Conn() != nil) | ||||
| 	require.True(t, testStore.Conn() != nil) | ||||
| } | ||||
|  | ||||
| func Test_AzureBlob_Close(t *testing.T) { | ||||
| 	testStore := newStore() | ||||
| 	utils.AssertEqual(t, nil, testStore.Close()) | ||||
| 	require.Nil(t, testStore.Close()) | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| module github.com/gofiber/storage/azureblob | ||||
| module github.com/gofiber/storage/azureblob/v2 | ||||
|  | ||||
| go 1.18 | ||||
| go 1.19 | ||||
|  | ||||
| require ( | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 | ||||
| 	github.com/gofiber/fiber/v2 v2.40.0 | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 | ||||
| 	github.com/stretchr/testify v1.8.4 | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 // indirect | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect | ||||
| 	github.com/google/uuid v1.3.0 // indirect | ||||
| 	golang.org/x/net v0.7.0 // indirect | ||||
| 	golang.org/x/text v0.7.0 // indirect | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect | ||||
| 	github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	golang.org/x/net v0.14.0 // indirect | ||||
| 	golang.org/x/text v0.12.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -1,27 +1,31 @@ | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 h1:sVW/AFBTGyJxDaMYlq0ct3jUXTtj12tQ6zE2GZUgVQw= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 h1:+5VZ72z0Qan5Bog5C+ZkgSqUbeVUd9wgtHOrIKuc5b8= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 h1:YvQv9Mz6T8oR5ypQOL6erY0Z5t71ak1uHV4QFokCOZk= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1/go.mod h1:c6WvOhtmjNUWbLfOG1qxM/q0SPvQNSVJvolm+C52dIU= | ||||
| github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 h1:nVocQV40OQne5613EeLayJiRAJuKlBGy+m22qWG+WRg= | ||||
| github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0/go.mod h1:7QJP7dr2wznCMeqIrhMgWGf7XpAQnVrJqDm9nvV3Cu4= | ||||
| github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= | ||||
| github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||||
| github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= | ||||
| github.com/gofiber/fiber/v2 v2.40.0 h1:fdU7w5hT6PLL7jiWIhtQ+S/k5WEFYoUZidptlPu8GBo= | ||||
| github.com/gofiber/fiber/v2 v2.40.0/go.mod h1:Gko04sLksnHbzLSRBFWPFdzM9Ws9pRxvvIaohJK1dsk= | ||||
| github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= | ||||
| github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||||
| github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= | ||||
| github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= | ||||
| github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= | ||||
| github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= | ||||
| github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= | ||||
| github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= | ||||
| github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||||
| github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= | ||||
| golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= | ||||
| golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= | ||||
| golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||||
| golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= | ||||
| golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= | ||||
| golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||||
| github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||||
| github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||||
| github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= | ||||
| golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= | ||||
| golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= | ||||
| golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= | ||||
| golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= | ||||
| golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||||
| gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= | ||||
| gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
|   | ||||
| @@ -1,7 +1,18 @@ | ||||
| # Badger | ||||
| --- | ||||
| id: badger | ||||
| title: Badger | ||||
| --- | ||||
|  | ||||
|  | ||||
| [](https://gofiber.io/discord) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| A fast key-value DB using [dgraph-io/badger](https://github.com/dgraph-io/badger) | ||||
|  | ||||
| **Note: Requires Go 1.19 and above** | ||||
|  | ||||
| ### Table of Contents | ||||
|  | ||||
| - [Signatures](#signatures) | ||||
| @@ -33,7 +44,7 @@ go mod init github.com/<user>/<repo> | ||||
| And then install the badger implementation: | ||||
|  | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/badger | ||||
| go get github.com/gofiber/storage/badger/v2 | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @@ -41,7 +52,7 @@ go get github.com/gofiber/storage/badger | ||||
| Import the storage package. | ||||
|  | ||||
| ```go | ||||
| import "github.com/gofiber/storage/badger" | ||||
| import "github.com/gofiber/storage/badger/v2" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/dgraph-io/badger/v3" | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/gofiber/utils/v2" | ||||
| ) | ||||
|  | ||||
| // Storage interface that is implemented by storage providers | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
|  | ||||
| var testStore = New() | ||||
| @@ -16,7 +16,7 @@ func Test_Badger_Set(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Set_Override(t *testing.T) { | ||||
| @@ -26,10 +26,10 @@ func Test_Badger_Set_Override(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Get(t *testing.T) { | ||||
| @@ -39,11 +39,11 @@ func Test_Badger_Get(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, val, result) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, val, result) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Set_Expiration(t *testing.T) { | ||||
| @@ -54,26 +54,23 @@ func Test_Badger_Set_Expiration(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, exp) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	time.Sleep(1100 * time.Millisecond) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Get_Expired(t *testing.T) { | ||||
| 	var ( | ||||
| 		key = "john" | ||||
| 	) | ||||
| 	key := "john" | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Get_NotExist(t *testing.T) { | ||||
|  | ||||
| 	result, err := testStore.Get("notexist") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Delete(t *testing.T) { | ||||
| @@ -83,43 +80,41 @@ func Test_Badger_Delete(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Delete(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Reset(t *testing.T) { | ||||
| 	var ( | ||||
| 		val = []byte("doe") | ||||
| 	) | ||||
| 	val := []byte("doe") | ||||
|  | ||||
| 	err := testStore.Set("john1", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set("john2", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Reset() | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get("john1") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
|  | ||||
| 	result, err = testStore.Get("john2") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Close(t *testing.T) { | ||||
| 	utils.AssertEqual(t, nil, testStore.Close()) | ||||
| 	require.Nil(t, testStore.Close()) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Conn(t *testing.T) { | ||||
| 	utils.AssertEqual(t, true, testStore.Conn() != nil) | ||||
| } | ||||
| 	require.True(t, testStore.Conn() != nil) | ||||
| } | ||||
|   | ||||
| @@ -1,8 +1,9 @@ | ||||
| package badger | ||||
|  | ||||
| import ( | ||||
| 	"github.com/dgraph-io/badger/v3" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/dgraph-io/badger/v3" | ||||
| ) | ||||
|  | ||||
| // Config defines the config for storage. | ||||
|   | ||||
| @@ -1,14 +1,15 @@ | ||||
| package badger | ||||
|  | ||||
| import ( | ||||
| 	"github.com/dgraph-io/badger/v3" | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/dgraph-io/badger/v3" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
|  | ||||
| func assertRecoveryPanic(t *testing.T) { | ||||
| 	err := recover() | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.Nil(t, nil, err) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Only_Name(t *testing.T) { | ||||
| @@ -17,7 +18,7 @@ func Test_Badger_Only_Name(t *testing.T) { | ||||
| 		Database:  "fiber.config.badger", | ||||
| 		UseLogger: false, | ||||
| 	}) | ||||
| 	utils.AssertEqual(t, nil, testDB.Close()) | ||||
| 	require.Nil(t, testDB.Close()) | ||||
| } | ||||
|  | ||||
| func Test_Badger_Options(t *testing.T) { | ||||
| @@ -26,11 +27,11 @@ func Test_Badger_Options(t *testing.T) { | ||||
| 		BadgerOptions: badger.DefaultOptions("fiber.with_options.badger"), | ||||
| 		UseLogger:     false, | ||||
| 	}) | ||||
| 	utils.AssertEqual(t, nil, testDB.Close()) | ||||
| 	require.Nil(t, testDB.Close()) | ||||
| } | ||||
|  | ||||
| func Test_Empty_Config(t *testing.T) { | ||||
| 	defer assertRecoveryPanic(t) | ||||
| 	testDB := New(Config{}) | ||||
| 	utils.AssertEqual(t, nil, testDB.Close()) | ||||
| 	require.Nil(t, testDB.Close()) | ||||
| } | ||||
|   | ||||
| @@ -1,27 +1,32 @@ | ||||
| module github.com/gofiber/storage/badger | ||||
| module github.com/gofiber/storage/badger/v2 | ||||
|  | ||||
| go 1.18 | ||||
| go 1.19 | ||||
|  | ||||
| require ( | ||||
| 	github.com/dgraph-io/badger/v3 v3.2103.5 | ||||
| 	github.com/gofiber/utils v1.0.1 | ||||
| 	github.com/gofiber/utils/v2 v2.0.0-beta.3 | ||||
| 	github.com/stretchr/testify v1.8.4 | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/cespare/xxhash v1.1.0 // indirect | ||||
| 	github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||||
| 	github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/dgraph-io/ristretto v0.1.1 // indirect | ||||
| 	github.com/dustin/go-humanize v1.0.0 // indirect | ||||
| 	github.com/dustin/go-humanize v1.0.1 // indirect | ||||
| 	github.com/gogo/protobuf v1.3.2 // indirect | ||||
| 	github.com/golang/glog v1.0.0 // indirect | ||||
| 	github.com/golang/glog v1.1.2 // indirect | ||||
| 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||||
| 	github.com/golang/protobuf v1.5.2 // indirect | ||||
| 	github.com/golang/protobuf v1.5.3 // indirect | ||||
| 	github.com/golang/snappy v0.0.4 // indirect | ||||
| 	github.com/google/flatbuffers v22.10.26+incompatible // indirect | ||||
| 	github.com/klauspost/compress v1.15.12 // indirect | ||||
| 	github.com/google/flatbuffers v23.5.26+incompatible // indirect | ||||
| 	github.com/google/uuid v1.3.1 // indirect | ||||
| 	github.com/klauspost/compress v1.16.7 // indirect | ||||
| 	github.com/pkg/errors v0.9.1 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	go.opencensus.io v0.24.0 // indirect | ||||
| 	golang.org/x/net v0.7.0 // indirect | ||||
| 	golang.org/x/sys v0.5.0 // indirect | ||||
| 	google.golang.org/protobuf v1.28.1 // indirect | ||||
| 	golang.org/x/net v0.14.0 // indirect | ||||
| 	golang.org/x/sys v0.11.0 // indirect | ||||
| 	google.golang.org/protobuf v1.31.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -7,8 +7,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA | ||||
| github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= | ||||
| github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= | ||||
| github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | ||||
| github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= | ||||
| github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | ||||
| github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= | ||||
| github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | ||||
| github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | ||||
| github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= | ||||
| github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= | ||||
| @@ -24,20 +24,21 @@ github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWa | ||||
| github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= | ||||
| github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= | ||||
| github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= | ||||
| github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= | ||||
| github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= | ||||
| github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= | ||||
| github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= | ||||
| github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||||
| github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||||
| github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= | ||||
| github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= | ||||
| github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= | ||||
| github.com/gofiber/utils v1.0.1 h1:knct4cXwBipWQqFrOy1Pv6UcgPM+EXo9jDgc66V1Qio= | ||||
| github.com/gofiber/utils v1.0.1/go.mod h1:pacRFtghAE3UoknMOUiXh2Io/nLWSUHtQCi/3QASsOc= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3 h1:pfOhUDDVjBJpkWv6C5jaDyYLvpui7zQ97zpyFFsUOKw= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3/go.mod h1:jsl17+MsKfwJjM3ONCE9Rzji/j8XNbwjhUVTjzgfDCo= | ||||
| github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= | ||||
| github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= | ||||
| github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | ||||
| github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= | ||||
| github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= | ||||
| github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= | ||||
| github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= | ||||
| github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||||
| github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||||
| github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= | ||||
| @@ -54,14 +55,14 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq | ||||
| github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= | ||||
| github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||||
| github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | ||||
| github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= | ||||
| github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= | ||||
| 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.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||||
| github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= | ||||
| github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||||
| github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= | ||||
| github.com/google/flatbuffers v22.10.26+incompatible h1:z1QiaMyPu1x3Z6xf2u1dsLj1ZxicdGSeaLpCuIsQNZM= | ||||
| github.com/google/flatbuffers v22.10.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= | ||||
| github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= | ||||
| github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= | ||||
| github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | ||||
| github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||||
| github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||||
| @@ -72,15 +73,19 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ | ||||
| github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= | ||||
| github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||||
| github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= | ||||
| github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= | ||||
| github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= | ||||
| github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= | ||||
| github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | ||||
| github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= | ||||
| github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM= | ||||
| github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= | ||||
| github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= | ||||
| github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= | ||||
| github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= | ||||
| github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | ||||
| github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||||
| github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= | ||||
| github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | ||||
| github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= | ||||
| github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= | ||||
| @@ -108,8 +113,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf | ||||
| github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | ||||
| github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= | ||||
| github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= | ||||
| github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | ||||
| github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||||
| github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= | ||||
| github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= | ||||
| github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| @@ -136,8 +142,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL | ||||
| golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||||
| golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||||
| golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||||
| golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= | ||||
| golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||||
| golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= | ||||
| golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= | ||||
| golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= | ||||
| golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||
| golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||||
| @@ -152,8 +158,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w | ||||
| golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= | ||||
| golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= | ||||
| golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||||
| golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||||
| golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||||
| @@ -192,9 +198,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD | ||||
| google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= | ||||
| google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | ||||
| google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | ||||
| google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= | ||||
| google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= | ||||
| google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= | ||||
| google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= | ||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
|   | ||||
| @@ -1,6 +1,17 @@ | ||||
| # Bbolt | ||||
| --- | ||||
| id: bbolt | ||||
| title: Bbolt | ||||
| --- | ||||
|  | ||||
|  | ||||
| [](https://gofiber.io/discord) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| A Bbolt storage driver using [etcd-io/bbolt](https://github.com/etcd-io/bbolt). Bolt is a pure Go key/value store inspired by [Howard Chu's](https://twitter.com/hyc_symas) [LMDB project](https://www.symas.com/symas-embedded-database-lmdb). The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL. | ||||
|  | ||||
| **Note: Requires Go 1.19 and above** | ||||
|  | ||||
| ### Table of Contents | ||||
| - [Signatures](#signatures) | ||||
| @@ -26,13 +37,13 @@ go mod init github.com/<user>/<repo> | ||||
| ``` | ||||
| And then install the s3 implementation: | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/bbolt | ||||
| go get github.com/gofiber/storage/bbolt/v2 | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| Import the storage package. | ||||
| ```go | ||||
| import "github.com/gofiber/storage/bbolt" | ||||
| import "github.com/gofiber/storage/bbolt/v2" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package bbolt | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/gofiber/utils/v2" | ||||
| 	"go.etcd.io/bbolt" | ||||
| ) | ||||
|  | ||||
| @@ -18,7 +18,7 @@ func New(config ...Config) *Storage { | ||||
| 	// Set default config | ||||
| 	cfg := configDefault(config...) | ||||
|  | ||||
| 	conn, err := bbolt.Open(cfg.Database, 0666, &bbolt.Options{ | ||||
| 	conn, err := bbolt.Open(cfg.Database, 0o666, &bbolt.Options{ | ||||
| 		Timeout:  cfg.Timeout, | ||||
| 		ReadOnly: cfg.ReadOnly, | ||||
| 	}) | ||||
| @@ -42,7 +42,6 @@ func New(config ...Config) *Storage { | ||||
| 		conn:   conn, | ||||
| 		bucket: cfg.Bucket, | ||||
| 	} | ||||
|  | ||||
| } | ||||
|  | ||||
| // Get value by key | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package bbolt | ||||
| import ( | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
|  | ||||
| var testStore = New() | ||||
| @@ -15,7 +15,7 @@ func Test_Bbolt_Set(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Set_Override(t *testing.T) { | ||||
| @@ -25,10 +25,10 @@ func Test_Bbolt_Set_Override(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Get(t *testing.T) { | ||||
| @@ -38,18 +38,17 @@ func Test_Bbolt_Get(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, val, result) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, val, result) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Get_NotExist(t *testing.T) { | ||||
|  | ||||
| 	result, err := testStore.Get("notexist") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Delete(t *testing.T) { | ||||
| @@ -59,43 +58,41 @@ func Test_Bbolt_Delete(t *testing.T) { | ||||
| 	) | ||||
|  | ||||
| 	err := testStore.Set(key, val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Delete(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Reset(t *testing.T) { | ||||
| 	var ( | ||||
| 		val = []byte("doe") | ||||
| 	) | ||||
| 	val := []byte("doe") | ||||
|  | ||||
| 	err := testStore.Set("john1", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Set("john2", val, 0) | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	err = testStore.Reset() | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	result, err := testStore.Get("john1") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
|  | ||||
| 	result, err = testStore.Get("john2") | ||||
| 	utils.AssertEqual(t, nil, err) | ||||
| 	utils.AssertEqual(t, true, len(result) == 0) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result)) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Close(t *testing.T) { | ||||
| 	utils.AssertEqual(t, nil, testStore.Close()) | ||||
| 	require.Nil(t, testStore.Close()) | ||||
| } | ||||
|  | ||||
| func Test_Bbolt_Conn(t *testing.T) { | ||||
| 	utils.AssertEqual(t, true, testStore.Conn() != nil) | ||||
| 	require.True(t, testStore.Conn() != nil) | ||||
| } | ||||
|   | ||||
							
								
								
									
										15
									
								
								bbolt/go.mod
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								bbolt/go.mod
									
									
									
									
									
								
							| @@ -1,10 +1,17 @@ | ||||
| module github.com/gofiber/storage/bbolt | ||||
| module github.com/gofiber/storage/bbolt/v2 | ||||
|  | ||||
| go 1.18 | ||||
| go 1.19 | ||||
|  | ||||
| require ( | ||||
| 	github.com/gofiber/utils v1.0.1 | ||||
| 	github.com/gofiber/utils/v2 v2.0.0-beta.3 | ||||
| 	github.com/stretchr/testify v1.8.4 | ||||
| 	go.etcd.io/bbolt v1.3.7 | ||||
| ) | ||||
|  | ||||
| require golang.org/x/sys v0.4.0 // indirect | ||||
| require ( | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/google/uuid v1.3.1 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	golang.org/x/sys v0.11.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
							
								
								
									
										18
									
								
								bbolt/go.sum
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								bbolt/go.sum
									
									
									
									
									
								
							| @@ -1,10 +1,18 @@ | ||||
| github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||||
| github.com/gofiber/utils v1.0.1 h1:knct4cXwBipWQqFrOy1Pv6UcgPM+EXo9jDgc66V1Qio= | ||||
| github.com/gofiber/utils v1.0.1/go.mod h1:pacRFtghAE3UoknMOUiXh2Io/nLWSUHtQCi/3QASsOc= | ||||
| github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3 h1:pfOhUDDVjBJpkWv6C5jaDyYLvpui7zQ97zpyFFsUOKw= | ||||
| github.com/gofiber/utils/v2 v2.0.0-beta.3/go.mod h1:jsl17+MsKfwJjM3ONCE9Rzji/j8XNbwjhUVTjzgfDCo= | ||||
| github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= | ||||
| github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||||
| github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= | ||||
| github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||||
| github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||||
| github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= | ||||
| go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= | ||||
| golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= | ||||
| golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= | ||||
| golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package bbolt | ||||
|  | ||||
| import ( | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"github.com/gofiber/utils/v2" | ||||
| 	"go.etcd.io/bbolt" | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										106
									
								
								coherence/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								coherence/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,106 @@ | ||||
| # Coherence | ||||
| <!-- Copyright © 2023, Oracle and/or its affiliates. --> | ||||
| A Coherence storage driver using [https://github.com/oracle/coherence-go-client](https://github.com/oracle/coherence-go-client). | ||||
|  | ||||
| ### Table of Contents | ||||
| - [Signatures](#signatures) | ||||
| - [Installation](#installation) | ||||
| - [Examples](#examples) | ||||
| - [Config](#config) | ||||
| - [Default Config](#default-config) | ||||
|  | ||||
| ### Signatures | ||||
| ```go | ||||
| func New(config ...Config) (*Storage, error) | ||||
| func (s *Storage) Get(key string) ([]byte, error) | ||||
| func (s *Storage) Set(key string, val []byte, exp time.Duration) error | ||||
| func (s *Storage) Delete(key string) error | ||||
| func (s *Storage) Reset() error | ||||
| func (s *Storage) Close() error | ||||
| func (s *Storage) Conn() *Session | ||||
| ``` | ||||
|  | ||||
| ### Installation | ||||
| Coherence is supported on Go versions 1.19 and above: | ||||
|  | ||||
| Install the coherence implementation: | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/coherence | ||||
| ``` | ||||
|  | ||||
| Before running or testing this implementation, you must ensure a Coherence cluster is available. | ||||
| For local development, we recommend using the Coherence CE Docker image; it contains everything | ||||
| necessary for the client to operate correctly. | ||||
|  | ||||
| To start a Coherence cluster using Docker, issue the following: | ||||
|  | ||||
| ```bash | ||||
| docker run -d -p 1408:1408 ghcr.io/oracle/coherence-ce:22.06.5 | ||||
| ``` | ||||
|  | ||||
| See the documentation [here](https://pkg.go.dev/github.com/oracle/coherence-go-client/coherence#hdr-Obtaining_a_Session) on connection options | ||||
| when creating a Coherence session. | ||||
|  | ||||
| ### Examples | ||||
| Import the storage package. | ||||
| ```go | ||||
| import "github.com/gofiber/storage/coherence" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
| ```go | ||||
| // Initialize default config, to connect to localhost:1408 using plain text | ||||
| store, err := coherence.New() | ||||
|  | ||||
| // Initialize custom config to connect to a different host/port and use plaint ext. | ||||
| store, err := coherence.New(coherence.Config{ | ||||
|     Address: "my-host:myport", | ||||
| }) | ||||
|  | ||||
| // Initialize to connect with TLS enabled with your own tls.Config | ||||
| tlsConfig := config := &tls.Config{...} | ||||
|  | ||||
| store, err := coherence.New(coherence.Config{ | ||||
|     Address: "my-host:myport", | ||||
|     TLSConfig: tlsConfig, | ||||
| }) | ||||
| ``` | ||||
|  | ||||
| > Note: If you create two stores using `coherence.New()` they will effectivity be idential. | ||||
| > If you wish to have two separate stores, then you can use: | ||||
| > ```go | ||||
| > store1, err := coherence.New(Config{ScopeName: "scope1"}) | ||||
| > store2, err := coherence.New(Config{ScopeName: "scope2"}) | ||||
| > ``` | ||||
|  | ||||
| ### Config | ||||
|  | ||||
| ```go | ||||
| // Config defines configuration options for Coherence connection. | ||||
| type Config struct { | ||||
|     // Address to connect to, defaults to "localhost:1408" | ||||
|     Address string | ||||
|  | ||||
|     // Timeout is the default session timeout to connect to Coherence, defaults to 30s | ||||
|     Timeout time.Duration | ||||
| 	 | ||||
|     // ScopeName defines a scope allowing for multiple storage sessions | ||||
|     ScopeName string | ||||
|  | ||||
|     // Reset indicates if the store should be reset after being created | ||||
|     Reset bool | ||||
|  | ||||
|     // TLSConfig specifies tls.Config to use when connecting, if nil then plain text is used  | ||||
|     TLSConfig *tls.Config | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Default Config | ||||
| ```go | ||||
| var DefaultConfig = Config{ | ||||
|     Address:   "localhost:1408", | ||||
|     Timeout:   time.Duration(30) * time.Millisecond, | ||||
|     ScopeName: defaultScopeName, | ||||
|     Reset:     false, | ||||
| } | ||||
| ``` | ||||
							
								
								
									
										156
									
								
								coherence/coherence.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										156
									
								
								coherence/coherence.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,156 @@ | ||||
| package coherence | ||||
|  | ||||
| /* | ||||
|  * Copyright © 2023, Oracle and/or its affiliates. | ||||
|  */ | ||||
| import ( | ||||
| 	"context" | ||||
| 	"crypto/tls" | ||||
| 	coh "github.com/oracle/coherence-go-client/coherence" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	defaultScopeName = "default-store" | ||||
| 	defaultTimeout   = time.Duration(30) * time.Second | ||||
| 	defaultAddress   = "localhost:1408" | ||||
| ) | ||||
|  | ||||
| // Storage represents an implementation of Coherence storage provider. | ||||
| type Storage struct { | ||||
| 	session    *coh.Session | ||||
| 	namedCache coh.NamedCache[string, []byte] | ||||
| 	ctx        context.Context | ||||
| } | ||||
|  | ||||
| // Config defines configuration options for Coherence connection. | ||||
| type Config struct { | ||||
| 	// Address to connect to, defaults to "localhost:1408" | ||||
| 	Address string | ||||
|  | ||||
| 	// Timeout is the default session timeout to connect to Coherence, defaults to 30s | ||||
| 	Timeout time.Duration | ||||
|  | ||||
| 	// ScopeName defines a scope allowing for multiple storage sessions | ||||
| 	ScopeName string | ||||
|  | ||||
| 	// Reset indicates if the store should be reset after being created | ||||
| 	Reset bool | ||||
|  | ||||
| 	// TLSConfig specifies tls.Config to use when connecting, if nil then plain text is used | ||||
| 	TLSConfig *tls.Config | ||||
| } | ||||
|  | ||||
| // DefaultConfig defines default options. | ||||
| var DefaultConfig = Config{ | ||||
| 	Address:   defaultAddress, | ||||
| 	Timeout:   defaultTimeout, | ||||
| 	ScopeName: defaultScopeName, | ||||
| 	Reset:     false, | ||||
| } | ||||
|  | ||||
| // New returns a new [Storage] given a [Config]. | ||||
| func New(config ...Config) (*Storage, error) { | ||||
| 	cfg := setupConfig(config...) | ||||
|  | ||||
| 	options := make([]func(session *coh.SessionOptions), 0) | ||||
|  | ||||
| 	// apply any config values as Coherence options | ||||
| 	options = append(options, coh.WithAddress(cfg.Address)) | ||||
|  | ||||
| 	if cfg.TLSConfig != nil { | ||||
| 		options = append(options, coh.WithTLSConfig(cfg.TLSConfig)) | ||||
| 	} else { | ||||
| 		options = append(options, coh.WithPlainText()) | ||||
| 	} | ||||
|  | ||||
| 	options = append(options, coh.WithRequestTimeout(cfg.Timeout)) | ||||
|  | ||||
| 	// create the Coherence session | ||||
| 	session, err := coh.NewSession(context.Background(), options...) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	store, err := newCoherenceStorage(session, cfg.ScopeName) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	// if Reset is true then reset the store | ||||
| 	if cfg.Reset { | ||||
| 		return store, store.Reset() | ||||
| 	} | ||||
|  | ||||
| 	return store, nil | ||||
| } | ||||
|  | ||||
| // setupConfig sets the default config. | ||||
| func setupConfig(config ...Config) Config { | ||||
| 	// if nothing provided then use the default config values | ||||
| 	if len(config) == 0 { | ||||
| 		return DefaultConfig | ||||
| 	} | ||||
|  | ||||
| 	cfg := config[0] | ||||
|  | ||||
| 	// Check for any invalid default values and overwrite them | ||||
| 	if cfg.Address == "" { | ||||
| 		cfg.Address = DefaultConfig.Address | ||||
| 	} | ||||
| 	if cfg.ScopeName == "" { | ||||
| 		cfg.ScopeName = DefaultConfig.ScopeName | ||||
| 	} | ||||
| 	if cfg.Timeout == 0 { | ||||
| 		cfg.Timeout = DefaultConfig.Timeout | ||||
| 	} | ||||
|  | ||||
| 	return cfg | ||||
| } | ||||
|  | ||||
| // newCoherenceStorage returns a new Coherence [Storage]. | ||||
| func newCoherenceStorage(session *coh.Session, cacheName string) (*Storage, error) { | ||||
| 	nc, err := coh.GetNamedCache[string, []byte](session, "fiber$"+cacheName) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return &Storage{ | ||||
| 		session:    session, | ||||
| 		namedCache: nc, | ||||
| 		ctx:        context.Background(), | ||||
| 	}, nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Get(key string) ([]byte, error) { | ||||
| 	v, err := s.namedCache.Get(s.ctx, key) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	if v == nil { | ||||
| 		return nil, nil | ||||
| 	} | ||||
| 	return *v, nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Set(key string, val []byte, exp time.Duration) error { | ||||
| 	_, err := s.namedCache.PutWithExpiry(s.ctx, key, val, exp) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func (s *Storage) Delete(key string) error { | ||||
| 	_, err := s.namedCache.Remove(s.ctx, key) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func (s *Storage) Reset() error { | ||||
| 	return s.namedCache.Clear(s.ctx) | ||||
| } | ||||
|  | ||||
| func (s *Storage) Close() error { | ||||
| 	s.session.Close() | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Conn() *coh.Session { | ||||
| 	return s.namedCache.GetSession() | ||||
| } | ||||
							
								
								
									
										207
									
								
								coherence/coherence_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								coherence/coherence_test.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,207 @@ | ||||
| package coherence | ||||
|  | ||||
| /* | ||||
|  * Copyright © 2023, Oracle and/or its affiliates. | ||||
|  */ | ||||
| import ( | ||||
| 	"github.com/gofiber/utils" | ||||
| 	"testing" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	key1       = "key1" | ||||
| 	key2       = "key2" | ||||
| 	missingKey = "missing-key" | ||||
| 	value1     = []byte("value1") | ||||
| 	value2     = []byte("value2") | ||||
| ) | ||||
|  | ||||
| func Test_Coherence_Set_And_Get(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value1, val) | ||||
|  | ||||
| 	utils.AssertEqual(t, true, testStore.Conn() != nil) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Set_Override(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value2, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value2, val) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Set_With_Reset(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value1, val) | ||||
|  | ||||
| 	// get a new store but reset it, so the subsequent Get will return nil | ||||
| 	testStore, err = newTestStore(t, Config{Reset: true}) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Set_With_Expiry(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	// set with an expiry of 5 seconds | ||||
| 	err = testStore.Set(key1, value1, time.Duration(5)*time.Second) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	time.Sleep(time.Duration(6) * time.Second) | ||||
|  | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Get_Missing(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	val, err = testStore.Get(missingKey) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Reset(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key2, value2, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	// check the keys exist | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value1, val) | ||||
|  | ||||
| 	val, err = testStore.Get(key2) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value2, val) | ||||
|  | ||||
| 	// reset the store, this should remove both entries | ||||
| 	err = testStore.Reset() | ||||
|  | ||||
| 	// check the keys have expired | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	val, err = testStore.Get(key2) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| func Test_Coherence_Set_And_Delete(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	testStore, err := newTestStore(t) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Delete(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	// ensure the key has gone | ||||
| 	val, err = testStore.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, true, len(val) == 0) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore.Close(), nil) | ||||
| } | ||||
|  | ||||
| // TestCoherenceWithScope ensures we can create multiple session stores with multiple scopes. | ||||
| func Test_Coherence_With_Scope(t *testing.T) { | ||||
| 	var val []byte | ||||
|  | ||||
| 	// create two session stores with different scopes | ||||
| 	testStore1, err := newTestStore(t, Config{ScopeName: "scope1"}) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	testStore2, err := newTestStore(t, Config{ScopeName: "scope2"}) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	// ensure we can put the same key with different values in each scope | ||||
| 	err = testStore1.Set(key1, value1, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore2.Set(key1, value2, 0) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	// ensure the value of "key1" is different for each store | ||||
| 	val, err = testStore1.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value1, val) | ||||
|  | ||||
| 	val, err = testStore2.Get(key1) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
| 	utils.AssertEqual(t, value2, val) | ||||
|  | ||||
| 	utils.AssertEqual(t, testStore1.Close(), nil) | ||||
| 	utils.AssertEqual(t, testStore2.Close(), nil) | ||||
| } | ||||
|  | ||||
| // newTestStore returns a new Coherence Store and ensures it is reset. | ||||
| func newTestStore(t *testing.T, config ...Config) (*Storage, error) { | ||||
| 	testStore, err := New(config...) | ||||
| 	utils.AssertEqual(t, err, nil) | ||||
|  | ||||
| 	err = testStore.Reset() | ||||
|  | ||||
| 	return testStore, err | ||||
| } | ||||
							
								
								
									
										18
									
								
								coherence/go.mod
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								coherence/go.mod
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| module github.com/gofiber/storage/coherence | ||||
|  | ||||
| go 1.19 | ||||
|  | ||||
| require github.com/oracle/coherence-go-client v1.0.1 | ||||
|  | ||||
| require google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect | ||||
|  | ||||
| require ( | ||||
| 	github.com/gofiber/utils v1.1.0 | ||||
| 	github.com/golang/protobuf v1.5.3 // indirect | ||||
| 	github.com/google/uuid v1.3.1 // indirect | ||||
| 	golang.org/x/net v0.14.0 // indirect | ||||
| 	golang.org/x/sys v0.11.0 // indirect | ||||
| 	golang.org/x/text v0.12.0 // indirect | ||||
| 	google.golang.org/grpc v1.57.0 // indirect | ||||
| 	google.golang.org/protobuf v1.31.0 // indirect | ||||
| ) | ||||
							
								
								
									
										28
									
								
								coherence/go.sum
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								coherence/go.sum
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| github.com/gofiber/utils v1.1.0 h1:vdEBpn7AzIUJRhe+CiTOJdUcTg4Q9RK+pEa0KPbLdrM= | ||||
| github.com/gofiber/utils v1.1.0/go.mod h1:poZpsnhBykfnY1Mc0KeEa6mSHrS3dV0+oBWyeQmb2e0= | ||||
| github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | ||||
| 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/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/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= | ||||
| github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||||
| github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= | ||||
| github.com/oracle/coherence-go-client v1.0.1 h1:MJ9S46+G8DHg/b3c/XB+mGA58wmTE0HdBCH1t+WrIBs= | ||||
| github.com/oracle/coherence-go-client v1.0.1/go.mod h1:tdIKuX6brsdTCARlbxeRYiOF0TA4tA8ujHO4BCS1mjk= | ||||
| golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= | ||||
| golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= | ||||
| golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= | ||||
| golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= | ||||
| golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= | ||||
| golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= | ||||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= | ||||
| google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= | ||||
| google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= | ||||
| google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | ||||
| google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | ||||
| google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= | ||||
| google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= | ||||
| gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||||
							
								
								
									
										94
									
								
								couchbase/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								couchbase/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| --- | ||||
| id: couchbase | ||||
| title: Couchbase | ||||
| --- | ||||
|  | ||||
|  | ||||
| [](https://gofiber.io/discord) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| A Couchbase storage driver using [couchbase/gocb](https://github.com/couchbase/gocb). | ||||
|  | ||||
| **Note: Requires Go 1.19 and above** | ||||
|  | ||||
| ### Table of Contents | ||||
| - [Signatures](#signatures) | ||||
| - [Installation](#installation) | ||||
| - [Examples](#examples) | ||||
| - [Config](#config) | ||||
| - [Default Config](#default-config) | ||||
|  | ||||
| ### Signatures | ||||
| ```go | ||||
| func New(config ...Config) Storage | ||||
| func (s *Storage) Get(key string) ([]byte, error) | ||||
| func (s *Storage) Set(key string, val []byte, exp time.Duration) error | ||||
| func (s *Storage) Delete(key string) error | ||||
| func (s *Storage) Reset() error | ||||
| func (s *Storage) Close() error | ||||
| func (s *Storage) Conn() *gocb.Cluster | ||||
| ``` | ||||
| ### Installation | ||||
| Couchbase is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet: | ||||
| ```bash | ||||
| go mod init github.com/<user>/<repo> | ||||
| ``` | ||||
| And then install the Couchbase implementation: | ||||
| ```bash | ||||
| go get github.com/gofiber/storage/couchbase/v2 | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| Import the storage package. | ||||
| ```go | ||||
| import "github.com/gofiber/storage/couchbase/v2" | ||||
| ``` | ||||
|  | ||||
| You can use the following possibilities to create a storage: | ||||
| ```go | ||||
| // Initialize default config | ||||
| store := couchbase.New() | ||||
|  | ||||
| // Initialize Couchbase storage with custom config | ||||
| store := couchbase.New(couchbase.Config{ | ||||
| 	Host:      "127.0.0.1:8091", | ||||
| 	Username:  "", | ||||
| 	Password:  "", | ||||
| 	Bucket:  0, | ||||
| 	ConnectionTimeout: 3* time.Second, | ||||
| 	KVTimeout: 1* time.Second, | ||||
| }) | ||||
| ``` | ||||
|  | ||||
| ### Config | ||||
| ```go | ||||
| type Config struct { | ||||
|     // The application username to Connect to the Couchbase cluster | ||||
|     Username string | ||||
|     // The application password to Connect to the Couchbase cluster | ||||
|     Password string | ||||
|     // The connection string for the Couchbase cluster | ||||
|     Host string | ||||
|     // The name of the bucket to Connect to | ||||
|     Bucket string | ||||
|     // The timeout for connecting to the Couchbase cluster | ||||
|     ConnectionTimeout time.Duration | ||||
|     // The timeout for performing operations on the Couchbase cluster | ||||
|     KVTimeout time.Duration | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Default Config | ||||
| ```go | ||||
| // ConfigDefault is the default config | ||||
| var ConfigDefault = Config{ | ||||
|     Host:              "127.0.0.1:8091", | ||||
|     Username:          "admin", | ||||
|     Password:          "123456", | ||||
|     Bucket:            "fiber_storage", | ||||
|     ConnectionTimeout: 3 * time.Second, | ||||
|     KVTimeout:         1 * time.Second, | ||||
| } | ||||
| ``` | ||||
							
								
								
									
										62
									
								
								couchbase/config.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								couchbase/config.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| package couchbase | ||||
|  | ||||
| import ( | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| type Config struct { | ||||
| 	// The application username to Connect to the Couchbase cluster | ||||
| 	Username string | ||||
| 	// The application password to Connect to the Couchbase cluster | ||||
| 	Password string | ||||
| 	// The connection string for the Couchbase cluster | ||||
| 	Host string | ||||
| 	// The name of the bucket to Connect to | ||||
| 	Bucket string | ||||
| 	// The timeout for connecting to the Couchbase cluster | ||||
| 	ConnectionTimeout time.Duration | ||||
| 	// The timeout for performing operations on the Couchbase cluster | ||||
| 	KVTimeout time.Duration | ||||
| } | ||||
|  | ||||
| // ConfigDefault is the default config | ||||
| var ConfigDefault = Config{ | ||||
| 	Host:              "127.0.0.1:8091", | ||||
| 	Username:          "admin", | ||||
| 	Password:          "123456", | ||||
| 	Bucket:            "fiber_storage", | ||||
| 	ConnectionTimeout: 3 * time.Second, | ||||
| 	KVTimeout:         1 * time.Second, | ||||
| } | ||||
|  | ||||
| func configDefault(config ...Config) Config { | ||||
| 	// Return default config if nothing provided | ||||
| 	if len(config) < 1 { | ||||
| 		return ConfigDefault | ||||
| 	} | ||||
|  | ||||
| 	// Override default config | ||||
| 	cfg := config[0] | ||||
|  | ||||
| 	// Set default values | ||||
| 	if cfg.Username == "" { | ||||
| 		cfg.Username = ConfigDefault.Username | ||||
| 	} | ||||
| 	if cfg.Password == "" { | ||||
| 		cfg.Password = ConfigDefault.Password | ||||
| 	} | ||||
| 	if cfg.Host == "" { | ||||
| 		cfg.Host = ConfigDefault.Host | ||||
| 	} | ||||
| 	if cfg.Bucket == "" { | ||||
| 		cfg.Bucket = ConfigDefault.Bucket | ||||
| 	} | ||||
| 	if cfg.ConnectionTimeout == 0 { | ||||
| 		cfg.ConnectionTimeout = ConfigDefault.ConnectionTimeout | ||||
| 	} | ||||
| 	if cfg.KVTimeout == 0 { | ||||
| 		cfg.KVTimeout = ConfigDefault.KVTimeout | ||||
| 	} | ||||
|  | ||||
| 	return cfg | ||||
| } | ||||
							
								
								
									
										96
									
								
								couchbase/couchbase.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								couchbase/couchbase.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| package couchbase | ||||
|  | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/couchbase/gocb/v2" | ||||
| ) | ||||
|  | ||||
| type Storage struct { | ||||
| 	cb     *gocb.Cluster | ||||
| 	bucket *gocb.Bucket | ||||
| } | ||||
|  | ||||
| func New(config ...Config) *Storage { | ||||
| 	// Set default config | ||||
| 	cfg := configDefault(config...) | ||||
|  | ||||
| 	cb, err := gocb.Connect(cfg.Host, gocb.ClusterOptions{ | ||||
| 		Authenticator: gocb.PasswordAuthenticator{ | ||||
| 			Username: cfg.Username, | ||||
| 			Password: cfg.Password, | ||||
| 		}, | ||||
| 		TimeoutsConfig: gocb.TimeoutsConfig{ | ||||
| 			ConnectTimeout: cfg.ConnectionTimeout, | ||||
| 			KVTimeout:      cfg.KVTimeout, | ||||
| 		}, | ||||
| 		Transcoder: gocb.NewLegacyTranscoder(), | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
|  | ||||
| 	_, err = cb.Ping(&gocb.PingOptions{ | ||||
| 		Timeout: cfg.ConnectionTimeout, | ||||
| 	}) | ||||
|  | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
|  | ||||
| 	b := cb.Bucket(cfg.Bucket) | ||||
|  | ||||
| 	return &Storage{cb: cb, bucket: b} | ||||
| } | ||||
|  | ||||
| func (s *Storage) Get(key string) ([]byte, error) { | ||||
| 	out, err := s.bucket.DefaultCollection().Get(key, nil) | ||||
| 	if err != nil { | ||||
| 		switch e := err.(type) { | ||||
| 		case *gocb.KeyValueError: | ||||
| 			if e.InnerError.Error() == gocb.ErrDocumentNotFound.Error() { | ||||
| 				return nil, nil | ||||
| 			} | ||||
| 		default: //*gocb.TimeoutError,... | ||||
| 			return nil, err | ||||
| 		} | ||||
|  | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	var value []byte | ||||
| 	if err := out.Content(&value); err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	return value, nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Set(key string, val []byte, exp time.Duration) error { | ||||
| 	if _, err := s.bucket.DefaultCollection().Upsert(key, val, &gocb.UpsertOptions{ | ||||
| 		Expiry: exp, | ||||
| 	}); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Delete(key string) error { | ||||
| 	if _, err := s.bucket.DefaultCollection().Remove(key, nil); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (s *Storage) Reset() error { | ||||
| 	return s.cb.Buckets().FlushBucket(s.bucket.Name(), nil) | ||||
| } | ||||
|  | ||||
| func (s *Storage) Close() error { | ||||
| 	return s.cb.Close(nil) | ||||
| } | ||||
|  | ||||
| func (s *Storage) Conn() *gocb.Cluster { | ||||
| 	return s.cb | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user