Initial open source release
This commit is contained in:
commit
74992e893f
377 changed files with 118084 additions and 0 deletions
15
internal/store/authorization.go
Normal file
15
internal/store/authorization.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"telesrv/internal/domain"
|
||||
)
|
||||
|
||||
// AuthorizationStore 持久化设备授权(auth_key ↔ user 绑定)。实现见 store/memory(测试替身)、store/postgres。
|
||||
type AuthorizationStore interface {
|
||||
Bind(ctx context.Context, a domain.Authorization) error
|
||||
ByAuthKey(ctx context.Context, authKeyID [8]byte) (domain.Authorization, bool, error)
|
||||
ListByUser(ctx context.Context, userID int64) ([]domain.Authorization, error)
|
||||
Delete(ctx context.Context, authKeyID [8]byte) error
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue