events

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeUserCreated         = "$UserCreated"
	EventTypeUserDeleted         = "$UserDeleted"
	EventTypeRolesChanged        = "$RolesChanged"
	EventTypeUserPasswordChanged = "$UserPasswordChanged"
)

Event types

View Source
const (
	AdminStream = "OrisunAdmin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	EventType string `json:"event_type"`
	Data      any    `json:"data"`
}

type UserCreated

type UserCreated struct {
	Name         string        `json:"name"`
	UserId       string        `json:"user_id"`
	Username     string        `json:"username"`
	Roles        []orisun.Role `json:"roles,omitempty"`
	PasswordHash string        `json:"password_hash,omitempty"`
}

type UserDeleted

type UserDeleted struct {
	UserId string `json:"user_id"`
}

type UserPasswordChanged

type UserPasswordChanged struct {
	UserId       string `json:"user_id"`
	PasswordHash string `json:"password_hash,omitempty"`
}

Jump to

Keyboard shortcuts

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