Documentation ¶
Index ¶
- Constants
- Variables
- type Housekeeper
- type HousekeeperParams
- type Manager
- func (s *Manager) AddAttributeToDispatch(ctx context.Context, dsp *centrum.Dispatch, attribute string) error
- func (s *Manager) AddDispatchStatus(ctx context.Context, tx qrm.DB, job string, status *centrum.DispatchStatus, ...) error
- func (s *Manager) AddUnitStatus(ctx context.Context, tx qrm.DB, job string, status *centrum.UnitStatus) error
- func (s *Manager) CheckIfBotNeeded(job string) bool
- func (s *Manager) CheckIfUserIsDisponent(job string, userId int32) bool
- func (s *Manager) CheckIfUserIsPartOfDispatch(userInfo *userinfo.UserInfo, dsp *centrum.Dispatch, disponentOkay bool) bool
- func (s *Manager) CheckIfUserPartOfUnit(job string, userId int32, unit *centrum.Unit, disponentOkay bool) bool
- func (s *Manager) CreateDispatch(ctx context.Context, dsp *centrum.Dispatch) (*centrum.Dispatch, error)
- func (s *Manager) CreateUnit(ctx context.Context, job string, unit *centrum.Unit) (*centrum.Unit, error)
- func (s *Manager) DeleteDispatch(ctx context.Context, job string, id uint64, allTheWay bool) error
- func (s *Manager) DeleteUnit(ctx context.Context, job string, id uint64) error
- func (s *Manager) DispatchAssignmentExpirationTime() time.Time
- func (s *Manager) DisponentSignOn(ctx context.Context, job string, userId int32, signon bool) error
- func (s *Manager) LoadDispatchAssignments(ctx context.Context, job string, dispatchId uint64) ([]*centrum.DispatchAssignment, error)
- func (s *Manager) LoadDispatchesFromDB(ctx context.Context, id uint64) error
- func (s *Manager) LoadDisponentsFromDB(ctx context.Context, job string) error
- func (s *Manager) LoadSettingsFromDB(ctx context.Context, job string) error
- func (s *Manager) LoadUnitIDForUserID(ctx context.Context, userId int32) (uint64, error)
- func (s *Manager) LoadUnitsFromDB(ctx context.Context, id uint64) error
- func (s *Manager) ResolveUserById(ctx context.Context, u int32) (*users.User, error)
- func (s *Manager) TakeDispatch(ctx context.Context, job string, userId int32, unitId uint64, ...) error
- func (s *Manager) UpdateDispatch(ctx context.Context, userJob string, userId *int32, dsp *centrum.Dispatch, ...) (*centrum.Dispatch, error)
- func (s *Manager) UpdateDispatchAssignments(ctx context.Context, job string, userId *int32, dspId uint64, toAdd []uint64, ...) error
- func (s *Manager) UpdateDispatchStatus(ctx context.Context, job string, dspId uint64, in *centrum.DispatchStatus) (*centrum.DispatchStatus, error)
- func (s *Manager) UpdateSettingsInDB(ctx context.Context, job string, settings *centrum.Settings) (*centrum.Settings, error)
- func (s *Manager) UpdateUnit(ctx context.Context, job string, unit *centrum.Unit) (*centrum.Unit, error)
- func (s *Manager) UpdateUnitAssignments(ctx context.Context, job string, userId *int32, unitId uint64, toAdd []int32, ...) error
- func (s *Manager) UpdateUnitStatus(ctx context.Context, job string, unitId uint64, in *centrum.UnitStatus) (*centrum.UnitStatus, error)
- type Params
Constants ¶
View Source
const DispatchExpirationTime = 31 * time.Second
View Source
const (
MaxCancelledDispatchesPerRun = 4
)
Variables ¶
View Source
var HousekeeperModule = fx.Module("centrum_manager_housekeeper", fx.Provide( NewHousekeeper, ))
Functions ¶
This section is empty.
Types ¶
type Housekeeper ¶ added in v0.8.11
type Housekeeper struct { *Manager // contains filtered or unexported fields }
func NewHousekeeper ¶ added in v0.8.11
func NewHousekeeper(p HousekeeperParams) *Housekeeper
func (*Housekeeper) ConvertPhoneJobMsgToDispatch ¶ added in v0.8.11
func (s *Housekeeper) ConvertPhoneJobMsgToDispatch() error
type HousekeeperParams ¶ added in v0.8.11
type Manager ¶
func (*Manager) AddAttributeToDispatch ¶ added in v0.8.14
func (*Manager) AddDispatchStatus ¶
func (*Manager) AddUnitStatus ¶ added in v0.8.11
func (*Manager) CheckIfBotNeeded ¶
func (*Manager) CheckIfUserIsDisponent ¶
func (*Manager) CheckIfUserIsPartOfDispatch ¶
func (*Manager) CheckIfUserPartOfUnit ¶
func (*Manager) CreateDispatch ¶
func (*Manager) CreateUnit ¶ added in v0.8.11
func (*Manager) DeleteDispatch ¶
func (*Manager) DeleteUnit ¶ added in v0.8.11
func (*Manager) DispatchAssignmentExpirationTime ¶
func (*Manager) DisponentSignOn ¶
func (*Manager) LoadDispatchAssignments ¶ added in v0.8.10
func (*Manager) LoadDispatchesFromDB ¶ added in v0.8.13
func (*Manager) LoadDisponentsFromDB ¶ added in v0.8.13
func (*Manager) LoadSettingsFromDB ¶ added in v0.8.13
func (*Manager) LoadUnitIDForUserID ¶
func (*Manager) LoadUnitsFromDB ¶ added in v0.8.13
func (*Manager) ResolveUserById ¶ added in v0.8.10
func (*Manager) TakeDispatch ¶ added in v0.8.11
func (*Manager) UpdateDispatch ¶
func (*Manager) UpdateDispatchAssignments ¶
func (*Manager) UpdateDispatchStatus ¶
func (s *Manager) UpdateDispatchStatus(ctx context.Context, job string, dspId uint64, in *centrum.DispatchStatus) (*centrum.DispatchStatus, error)
func (*Manager) UpdateSettingsInDB ¶ added in v0.8.11
func (*Manager) UpdateUnit ¶ added in v0.8.11
func (*Manager) UpdateUnitAssignments ¶
func (*Manager) UpdateUnitStatus ¶
func (s *Manager) UpdateUnitStatus(ctx context.Context, job string, unitId uint64, in *centrum.UnitStatus) (*centrum.UnitStatus, error)
Click to show internal directories.
Click to hide internal directories.