events

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EventAuditLog contracts.Event = "audit_log"

Variables

View Source
var EventCardCreated contracts.Event = "EventCardCreated"
View Source
var EventCardDeleted contracts.Event = "EventCardDeleted"

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 HandleCardSync added in v0.0.11

func HandleCardSync(a any, event contracts.Event) error

func Register

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

func RegisteredEvents

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

Types

type CardSync added in v0.0.11

type CardSync interface {
	GetCard() *models.Card
}

type EventAuditLogData

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

type EventCardCreatedData added in v0.0.11

type EventCardCreatedData struct {
	Card *models.Card
}

func (EventCardCreatedData) GetCard added in v0.0.11

func (d EventCardCreatedData) GetCard() *models.Card

type EventCardDeletedData added in v0.0.11

type EventCardDeletedData struct {
	Card *models.Card
}

func (EventCardDeletedData) GetCard added in v0.0.11

func (d EventCardDeletedData) GetCard() *models.Card

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