mirror of
https://github.com/Luzifer/ots.git
synced 2025-09-26 19:11:03 -04:00
Replace redis client, move expiry into creation interface
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
900d816dff
commit
ea631beeef
8 changed files with 51 additions and 80 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue