staffactivitymanager

package
v0.0.0-...-e9c30ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressActivityMarker

type AddressActivityMarker interface {
	MarkAddressAsActiveEvenIfChallenged(ctx context.Context, address string) error
}

AddressActivityMarker represents a component that can mark addresses as actively participating

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager keeps track of what staff members are presently active in order to inform the rest of the staff

func New

func New(statsClient *statsd.Client) *Manager

New returns a new Manager

func (*Manager) ActivelyModerating

func (s *Manager) ActivelyModerating() []auth.User

ActivelyModerating returns the list of actively moderating staff members

func (*Manager) IsActivelyModerating

func (s *Manager) IsActivelyModerating(staffMember auth.User) bool

IsActivelyModerating returns whether the specified staff member is currently active

func (*Manager) MarkAsActive

func (s *Manager) MarkAsActive(ctx context.Context, staffMember auth.User)

MarkAsActive marks the specified staff member as active

func (*Manager) MarkAsActivityChallenged

func (s *Manager) MarkAsActivityChallenged(ctx context.Context, staffMember auth.User, tolerance time.Duration)

MarkAsActivityChallenged marks the specified staff member as having been challenged for activity with the specified challenge response timeout

func (*Manager) MarkAsInactive

func (s *Manager) MarkAsInactive(ctx context.Context, staffMember auth.User)

MarkAsActive marks the specified staff member as inactive

func (*Manager) MarkAsStillActive

func (s *Manager) MarkAsStillActive(staffMember auth.User)

MarkAsStillActive clears the activity challenged status of the specified staff member, if they are actively moderating

func (*Manager) SetAddressActivityMarker

func (s *Manager) SetAddressActivityMarker(r AddressActivityMarker)

func (*Manager) StatsWorker

func (s *Manager) StatsWorker(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL