Replace redis client, move expiry into creation interface

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-06-10 01:36:01 +02:00
parent 900d816dff
commit ea631beeef
No known key found for this signature in database
GPG key ID: D91C3E91E4CAD6F5
8 changed files with 51 additions and 80 deletions

View file

@ -3,12 +3,13 @@ package main
import (
"errors"
"fmt"
"time"
)
var errSecretNotFound = errors.New("Secret not found")
type storage interface {
Create(secret string) (string, error)
Create(secret string, expireIn time.Duration) (string, error)
ReadAndDestroy(id string) (string, error)
}