userstatus

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearStatusesOlderThan

func ClearStatusesOlderThan(statuses *UserStatusTracker, time time.Time)

func TrackUserStatuses

func TrackUserStatuses(statuses *UserStatusTracker, backend *backend.MattermostBackend, timestamp int64)

Types

type UserStatus

type UserStatus int8
const (
	Online UserStatus = iota
	Away
	Offline
	DND
	Custom
	Unknown
)

type UserStatusHistory

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

func (*UserStatusHistory) SetStatusAt

func (s *UserStatusHistory) SetStatusAt(newStatus UserStatus, timestamp int64) error

type UserStatusTracker

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

func NewUserStatusesTracker

func NewUserStatusesTracker() *UserStatusTracker

func (UserStatusTracker) GetStatusForUserAtTime

func (u UserStatusTracker) GetStatusForUserAtTime(userID string, time time.Time) UserStatus

func (*UserStatusTracker) GetTrackerUserIds

func (u *UserStatusTracker) GetTrackerUserIds() []string

func (*UserStatusTracker) GetUserStatusHistory

func (u *UserStatusTracker) GetUserStatusHistory(userID string) ([]int64, []UserStatus)

Jump to

Keyboard shortcuts

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