mirror of
https://github.com/gofiber/storage.git
synced 2025-09-27 04:46:08 +08:00
Compare commits
33 Commits
couchbase/
...
sqlite3/v1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 |
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -32,6 +32,12 @@ updates:
|
||||
- "🤖 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:
|
||||
|
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 |
43
.github/release-drafter-etcd.yml
vendored
Normal file
43
.github/release-drafter-etcd.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name-template: 'Etcd - v$RESOLVED_VERSION'
|
||||
tag-template: 'etcd/v$RESOLVED_VERSION'
|
||||
tag-prefix: etcd/v
|
||||
include-paths:
|
||||
- etcd
|
||||
categories:
|
||||
- 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.
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
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.
|
63
.github/scripts/sync_docs.sh
vendored
Executable file
63
.github/scripts/sync_docs.sh
vendored
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/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
|
||||
jq -S . ${VERSION_FILE} > temp.json && mv temp.json ${VERSION_FILE}
|
||||
fi
|
||||
|
||||
# Run docusaurus versioning command
|
||||
$DOCUSAURUS_COMMAND "${new_version}"
|
||||
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
|
||||
git push https://${TOKEN}@${REPO_URL}
|
6
.github/workflows/gosec.yml
vendored
6
.github/workflows/gosec.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
- name: Run Gosec (root)
|
||||
working-directory: .
|
||||
run: |
|
||||
gosec -exclude-dir=arangodb -exclude-dir=badger -exclude-dir=couchbase -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 -exclude-dir=pebble ./....
|
||||
gosec -exclude-dir=arangodb -exclude-dir=badger -exclude-dir=couchbase -exclude-dir=dynamodb -exclude-dir=etcd -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 -exclude-dir=pebble ./....
|
||||
# -----
|
||||
- name: Run Gosec (arangodb)
|
||||
working-directory: ./arangodb
|
||||
@@ -56,6 +56,10 @@ jobs:
|
||||
working-directory: ./dynamodb
|
||||
run: gosec ./...
|
||||
# -----
|
||||
- name: Run Gosec (etcd)
|
||||
working-directory: ./etcd
|
||||
run: gosec ./...
|
||||
# -----
|
||||
- name: Run Gosec (memcache)
|
||||
working-directory: ./memcache
|
||||
run: gosec ./...
|
||||
|
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 }}
|
0
.github/workflows/security.yml
vendored
0
.github/workflows/security.yml
vendored
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@v3
|
||||
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 }}
|
37
.github/workflows/test-etcd.yml
vendored
Normal file
37
.github/workflows/test-etcd.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
steps:
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
- 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
|
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.
|
84
README.md
84
README.md
@@ -1,20 +1,24 @@
|
||||
---
|
||||
title: 👋 Welcome
|
||||
description: 📦 Premade storage drivers for 🚀 Fiber.
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source height="125" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo-dark.svg">
|
||||
<img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo.svg">
|
||||
</picture>
|
||||
<br>
|
||||
<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/>
|
||||
|
||||
# 📦 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">
|
||||
<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">
|
||||
<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">
|
||||
<img src="https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -48,51 +52,21 @@ type Storage interface {
|
||||
|
||||
## 📑 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>
|
||||
- [Couchbase](/couchbase) <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) <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>
|
||||
- [Pebble](/pebble) <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) <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">
|
||||
- [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>
|
||||
- [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>
|
||||
- [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>
|
||||
- [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,4 +1,14 @@
|
||||
# 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).
|
||||
|
||||
### Table of Contents
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# 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.
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Badger
|
||||
---
|
||||
id: badger
|
||||
title: Badger
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A fast key-value DB using [dgraph-io/badger](https://github.com/dgraph-io/badger)
|
||||
|
||||
|
@@ -1,4 +1,14 @@
|
||||
# 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.
|
||||
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Couchbase
|
||||
---
|
||||
id: couchbase
|
||||
title: Couchbase
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Couchbase storage driver using [couchbase/gocb](https://github.com/couchbase/gocb).
|
||||
|
||||
|
@@ -1,4 +1,14 @@
|
||||
# DynamoDB
|
||||
---
|
||||
id: dynamodb
|
||||
title: DynamoDB
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A DynamoDB storage driver using [aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2).
|
||||
|
||||
**Note:** If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: [specifying credentials](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials)
|
||||
|
85
etcd/README.md
Normal file
85
etcd/README.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
id: etcd
|
||||
title: Etcd
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Etcd storage driver using [`etcd-io/etcd`](https://github.com/etcd-io/etcd).
|
||||
|
||||
### 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() *clientv3.Client
|
||||
```
|
||||
|
||||
### Installation
|
||||
Etcd 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 etcd implementation:
|
||||
```bash
|
||||
go get github.com/gofiber/storage/etcd
|
||||
```
|
||||
|
||||
### Examples
|
||||
Import the storage package.
|
||||
```go
|
||||
import "github.com/gofiber/storage/etcd"
|
||||
```
|
||||
|
||||
You can use the following possibilities to create a storage:
|
||||
```go
|
||||
// Initialize default config
|
||||
store := etcd.New()
|
||||
|
||||
// Initialize custom config
|
||||
store := etcd.New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
### Config
|
||||
```go
|
||||
type Config struct {
|
||||
// Endpoints is a list of URLs.
|
||||
Endpoints []string
|
||||
// DialTimeout is the timeout for failing to establish a connection.
|
||||
DialTimeout time.Duration
|
||||
// Username is a username for authentication.
|
||||
Username string
|
||||
// Password is a password for authentication.
|
||||
Password string
|
||||
// TLS holds the client secure credentials, if any.
|
||||
TLS *tls.Config
|
||||
}
|
||||
```
|
||||
|
||||
### Default Config
|
||||
```go
|
||||
var ConfigDefault = Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
DialTimeout: 2 * time.Second,
|
||||
Username: "",
|
||||
Password: "",
|
||||
TLS: nil,
|
||||
}
|
||||
```
|
52
etcd/config.go
Normal file
52
etcd/config.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Config defines the config for storage.
|
||||
type Config struct {
|
||||
// Endpoints is a list of URLs.
|
||||
Endpoints []string
|
||||
// DialTimeout is the timeout for failing to establish a connection.
|
||||
DialTimeout time.Duration
|
||||
// Username is a username for authentication.
|
||||
Username string
|
||||
// Password is a password for authentication.
|
||||
Password string
|
||||
// TLS holds the client secure credentials, if any.
|
||||
TLS *tls.Config
|
||||
}
|
||||
|
||||
// ConfigDefault is the default config
|
||||
var ConfigDefault = Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
DialTimeout: 2 * time.Second,
|
||||
Username: "",
|
||||
Password: "",
|
||||
TLS: nil,
|
||||
}
|
||||
|
||||
// Helper function to set default values
|
||||
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.DialTimeout == 0 {
|
||||
cfg.DialTimeout = ConfigDefault.DialTimeout
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
100
etcd/etcd.go
Normal file
100
etcd/etcd.go
Normal file
@@ -0,0 +1,100 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"go.etcd.io/etcd/client/v3"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Storage struct {
|
||||
db *clientv3.Client
|
||||
}
|
||||
|
||||
func New(config ...Config) *Storage {
|
||||
cfg := configDefault(config...)
|
||||
|
||||
cli, err := clientv3.New(clientv3.Config{
|
||||
Endpoints: cfg.Endpoints,
|
||||
DialTimeout: cfg.DialTimeout,
|
||||
Username: cfg.Username,
|
||||
Password: cfg.Password,
|
||||
TLS: cfg.TLS,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
store := &Storage{
|
||||
db: cli,
|
||||
}
|
||||
|
||||
return store
|
||||
}
|
||||
|
||||
func (s *Storage) Get(key string) ([]byte, error) {
|
||||
if len(key) <= 0 {
|
||||
return nil, nil
|
||||
}
|
||||
item, err := s.db.Get(context.Background(), key)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(item.Kvs) <= 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return item.Kvs[0].Value, nil
|
||||
}
|
||||
|
||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error {
|
||||
// Ain't Nobody Got Time For That
|
||||
if len(key) <= 0 || len(val) <= 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
lease, err := s.db.Grant(context.Background(), int64(exp.Seconds()))
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = s.db.Put(context.Background(), key, string(val), clientv3.WithLease(lease.ID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) Delete(key string) error {
|
||||
if len(key) <= 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := s.db.Delete(context.Background(), key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) Reset() error {
|
||||
_, err := s.db.Delete(context.Background(), "", clientv3.WithPrefix())
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) Close() error {
|
||||
return s.db.Close()
|
||||
}
|
||||
|
||||
func (s *Storage) Conn() *clientv3.Client {
|
||||
return s.db
|
||||
}
|
110
etcd/etcd_test.go
Normal file
110
etcd/etcd_test.go
Normal file
@@ -0,0 +1,110 @@
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"github.com/gofiber/utils"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestSetEtcd_ShouldReturnNoError(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
var (
|
||||
key = "john"
|
||||
val = []byte("doe")
|
||||
)
|
||||
|
||||
err := testStorage.Set(key, val, 0)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
}
|
||||
|
||||
func TestGetEtcd_ShouldReturnNil_WhenDocumentNotFound(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
val, err := testStorage.Get("not_found_key")
|
||||
|
||||
utils.AssertEqual(t, nil, err)
|
||||
utils.AssertEqual(t, 0, len(val))
|
||||
}
|
||||
|
||||
func TestSetAndGet_GetShouldReturn_SettedValueWithoutError(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
err := testStorage.Set("test", []byte("fiber_test_value"), 0)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
val, err := testStorage.Get("test")
|
||||
|
||||
utils.AssertEqual(t, nil, err)
|
||||
utils.AssertEqual(t, val, []byte("fiber_test_value"))
|
||||
}
|
||||
|
||||
func TestSetAndGet_GetShouldReturnNil_WhenTTLExpired(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
err := testStorage.Set("test", []byte("fiber_test_value"), 3*time.Second)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
time.Sleep(6 * time.Second)
|
||||
|
||||
val, err := testStorage.Get("test")
|
||||
|
||||
utils.AssertEqual(t, nil, err)
|
||||
utils.AssertEqual(t, 0, len(val))
|
||||
}
|
||||
|
||||
func TestSetAndDelete_DeleteShouldReturn_NoError(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
err := testStorage.Set("test", []byte("fiber_test_value"), 0)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
err = testStorage.Delete("test")
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
_, err = testStorage.Get("test")
|
||||
utils.AssertEqual(t, nil, err)
|
||||
}
|
||||
|
||||
func TestSetAndReset_ResetShouldReturn_NoError(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
err := testStorage.Set("test", []byte("fiber_test_value"), 0)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
err = testStorage.Reset()
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
_, err = testStorage.Get("test")
|
||||
utils.AssertEqual(t, nil, err)
|
||||
}
|
||||
|
||||
func TestClose_CloseShouldReturn_NoError(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
err := testStorage.Close()
|
||||
utils.AssertEqual(t, nil, err)
|
||||
}
|
||||
|
||||
func TestGetConn_ReturnsNotNill(t *testing.T) {
|
||||
testStorage := New(Config{
|
||||
Endpoints: []string{"localhost:2379"},
|
||||
})
|
||||
|
||||
conn := testStorage.Conn()
|
||||
utils.AssertEqual(t, true, conn != nil)
|
||||
}
|
26
etcd/go.mod
Normal file
26
etcd/go.mod
Normal file
@@ -0,0 +1,26 @@
|
||||
module github.com/gofiber/storage/etcd
|
||||
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/gofiber/utils v1.1.0
|
||||
go.etcd.io/etcd/client/v3 v3.5.9
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/net v0.8.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||
google.golang.org/grpc v1.55.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
)
|
83
etcd/go.sum
Normal file
83
etcd/go.sum
Normal file
@@ -0,0 +1,83 @@
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
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/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/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
|
||||
go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4=
|
||||
go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E=
|
||||
go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA=
|
||||
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
|
||||
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
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-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.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.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/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA=
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
|
||||
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
|
||||
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
|
||||
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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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,4 +1,13 @@
|
||||
# Memcache
|
||||
---
|
||||
id: memcache
|
||||
title: Memcache
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Memcache storage driver using [`bradfitz/gomemcache`](https://github.com/bradfitz/gomemcache).
|
||||
|
||||
|
@@ -1,4 +1,14 @@
|
||||
# Memory
|
||||
---
|
||||
id: memory
|
||||
title: Memory
|
||||
---
|
||||
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
An in-memory storage driver.
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# MongoDB
|
||||
---
|
||||
id: mongodb
|
||||
title: MongoDB
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A MongoDB storage driver using [mongodb/mongo-go-driver](https://github.com/mongodb/mongo-go-driver).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# MSSQL
|
||||
---
|
||||
id: mssql
|
||||
title: MSSQL
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A MSSQL storage driver using [microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# MySQL
|
||||
---
|
||||
id: mysql
|
||||
title: MySQL
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A MySQL storage driver using `database/sql` and [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Pebble
|
||||
---
|
||||
id: pebble
|
||||
title: Pebble
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A fast key-value DB using [cockroachdb/pebble](https://github.com/cockroachdb/pebble)
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Postgres
|
||||
---
|
||||
id: postgres
|
||||
title: Postgres
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Postgres storage driver using [jackc/pgx](https://github.com/jackc/pgx).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Redis
|
||||
---
|
||||
id: redis
|
||||
title: Redis
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Redis storage driver using [go-redis/redis](https://github.com/go-redis/redis).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# Ristretto
|
||||
---
|
||||
id: ristretto
|
||||
title: Ristretto
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A Memory-bound storage driver using [`dgraph-io/ristretto`](https://github.com/dgraph-io/ristretto).
|
||||
|
||||
|
11
s3/README.md
11
s3/README.md
@@ -1,4 +1,13 @@
|
||||
# S3
|
||||
---
|
||||
id: s3
|
||||
title: S3
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A S3 storage driver using [aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2).
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# SQLite3
|
||||
---
|
||||
id: sqlite3
|
||||
title: SQLite3
|
||||
---
|
||||
|
||||

|
||||
[](https://gofiber.io/discord)
|
||||

|
||||

|
||||

|
||||
|
||||
A SQLite3 storage driver using [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3).
|
||||
|
||||
|
Reference in New Issue
Block a user