events

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EventAuditLog contracts.Event = "audit_log"

Variables

This section is empty.

Functions

func AuditLog

func AuditLog(username string, action eventpb.ActionType, msg string, oldS, newS YamlPrettier)

func FileAuditLog

func FileAuditLog(username string, msg string, fileId int)

func HandleAuditLog

func HandleAuditLog(data any, e contracts.Event) error

func Register

func Register(e contracts.Event, l contracts.Listener)

func RegisteredEvents

func RegisteredEvents() map[contracts.Event][]contracts.Listener

Types

type EventAuditLogData

type EventAuditLogData struct {
	Username        string
	Action          eventpb.ActionType
	Msg, OldS, NewS string
	FileId          int
}

type StringYamlPrettier

type StringYamlPrettier struct {
	Str string
}

func (*StringYamlPrettier) PrettyYaml

func (s *StringYamlPrettier) PrettyYaml() string

type YamlPrettier

type YamlPrettier interface {
	PrettyYaml() string
}

Jump to

Keyboard shortcuts

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