events

package
v4.23.13 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EventAuditLog contracts.Event = "audit_log"
View Source
const EventNamespaceCreated contracts.Event = "namespace_created"
View Source
const EventNamespaceDeleted contracts.Event = "namespace_deleted"
View Source
const EventProjectChanged contracts.Event = "project_changed"
View Source
const EventProjectDeleted contracts.Event = "project_deleted"

Variables

This section is empty.

Functions

func AuditLog

func AuditLog(username string, action types.EventActionType, 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 HandleInjectTlsSecret

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

func HandleNamespaceDeleted

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

func HandleProjectChanged

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

func HandleProjectDeleted

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

func NewEventAuditLog added in v4.19.7

func NewEventAuditLog(username string, action types.EventActionType, msg string, opts ...AuditOption) contracts.AuditLogImpl

func Register

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

func RegisteredEvents

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

Types

type AuditOption added in v4.19.7

type AuditOption func(*eventAuditLog)

func AuditWithFileID added in v4.19.7

func AuditWithFileID(id int) AuditOption

func AuditWithOldNewStr added in v4.19.7

func AuditWithOldNewStr(o, n string) AuditOption

type NamespaceCreatedData

type NamespaceCreatedData struct {
	NsModel  *models.Namespace
	NsK8sObj *v1.Namespace
}

type NamespaceDeletedData

type NamespaceDeletedData struct {
	NsModel *models.Namespace
}

type ProjectChangedData

type ProjectChangedData struct {
	Project *models.Project

	Username string
}

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