Files
gomax/v1/isolation/isolation.go
T
2026-10-06 14:49:29 +03:00

23 lines
367 B
Go

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} }