session

package
v0.0.0-...-3a05e6f Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUserSession

func DeleteUserSession(userID int)

DeleteUserSession deletes a user's session when it's no longer needed.

func GetAction

func GetAction(userID int) (string, error)

GetAction retrieves the current action for a user's session.

func GetChatID

func GetChatID(userID int) (int64, error)

GetChatID retrieves the chat ID for a user's session.

func GetMessageID

func GetMessageID(userID int) (int, error)

GetMessageID retrieves the message ID for a user's session.

func IsInteractionTimedOut

func IsInteractionTimedOut(userID int) bool

IsInteractionTimedOut checks if a user's session has timed out due to inactivity.

func NewSession

func NewSession(userID int, chatID int64, action string)

NewSession creates a new user session with the given userID, chatID, and action.

func ResetTimer

func ResetTimer(userID int) error

ResetTimer resets the session timer for a user's session.

func SetMessageID

func SetMessageID(userID, MessageID int) error

SetMessageID sets the message ID for a user's session, renewing the session timer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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