fix: major fixes
This commit is contained in:
1 parent
9d7a6a46c9
commit
4b94fcb920
6 files changed
+90
-35
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package isolation
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
var ErrNotOwner = errors.New("isolation: lock is not held by this owner")
|
||||
|
||||
type Key struct {
|
||||
UpdateID uuid.UUID // владелец
|
||||
UserID int64
|
||||
ChatID int64
|
||||
}
|
||||
|
||||
type Scope struct {
|
||||
UserID int64
|
||||
ChatID int64
|
||||
}
|
||||
|
||||
func (k Key) Scope() Scope { return Scope{UserID: k.UserID, ChatID: k.ChatID} }
|
||||
Reference in new issue
Block a user