activitylog

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package activity manages activity logs for all users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(opts Opts) (*Manager, error)

New creates and returns a new instance of the Manager.

func (*Manager) Away

func (al *Manager) Away(actorID int, actorEmail, ip string, targetID int, targetEmail string) error

Away records an away event for the given user.

func (*Manager) AwayReassigned

func (al *Manager) AwayReassigned(actorID int, actorEmail, ip string, targetID int, targetEmail string) error

AwayReassigned records an away and reassigned event for the given user.

func (*Manager) GetAll

func (m *Manager) GetAll(order, orderBy, filtersJSON string, page, pageSize int) ([]models.ActivityLog, error)

GetAll retrieves all activity logs.

func (*Manager) Login

func (al *Manager) Login(userID int, email, ip string) error

Login records a login event for the given user.

func (*Manager) Logout

func (al *Manager) Logout(userID int, email, ip string) error

Logout records a logout event for the given user.

func (*Manager) Online

func (al *Manager) Online(actorID int, actorEmail, ip string, targetID int, targetEmail string) error

Online records an online event for the given user.

func (*Manager) PasswordSet

func (al *Manager) PasswordSet(actorID int, actorEmail, ip string, targetID int, targetEmail string) error

PasswordSet records a password set event.

func (*Manager) RolePermissionsChanged

func (al *Manager) RolePermissionsChanged(actorID int, actorEmail, ip string, roleID int, roleName string, added, removed []string) error

RolePermissionsChanged records a role permissions change event.

func (*Manager) UserAvailability

func (al *Manager) UserAvailability(actorID int, actorEmail, status, ip, targetEmail string, targetID int) error

UserAvailability records a user availability event for the given user.

type Opts

type Opts struct {
	DB   *sqlx.DB
	Lo   *logf.Logger
	I18n *i18n.I18n
}

Opts contains options for initializing the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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