feat: integration v2 and API key PART 1/3
This commit is contained in:
1 parent
7e9bd9ba30
commit
844842fdae
40 files changed
+3782
-64
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package apikey
|
||||
|
||||
import "time"
|
||||
|
||||
type Repository interface {
|
||||
Create(key APIKey) (APIKey, error)
|
||||
Get(id uint32) (APIKey, error)
|
||||
GetByHashedKey(hashedKey string) (APIKey, error)
|
||||
ListByUser(userId uint32) ([]APIKey, error)
|
||||
ListAll() ([]APIKey, error)
|
||||
Revoke(id uint32, at time.Time) error
|
||||
RevokeAllByUser(userId uint32, at time.Time) error
|
||||
TouchLastUsed(id uint32, at time.Time) error
|
||||
}
|
||||
Reference in new issue
Block a user