mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
dd5e4acd24
* start sub * start implement subsciptions * start subscription * implementation for member done * admin done * fix: tests * extend handlers * prepary notification * no errors in adminapi * changed current sequence in all packages * ignore mocks * works * subscriptions as singleton * tests * refactor: rename function scope var
28 lines
531 B
Go
28 lines
531 B
Go
package spooler
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
lockTable = "adminapi.locks"
|
|
lockedUntilKey = "locked_until"
|
|
lockerIDKey = "locker_id"
|
|
objectTypeKey = "object_type"
|
|
)
|
|
|
|
type locker struct {
|
|
dbClient *sql.DB
|
|
}
|
|
|
|
type lock struct {
|
|
LockerID string `gorm:"column:locker_id;primary_key"`
|
|
LockedUntil time.Time `gorm:"column:locked_until"`
|
|
ViewName string `gorm:"column:object_type;primary_key"`
|
|
}
|
|
|
|
func (l *locker) Renew(lockerID, viewModel string, waitTime time.Duration) error {
|
|
return nil
|
|
}
|