Documentation ¶
Index ¶
- Constants
- func AuditLog(username string, action types.EventActionType, msg string, ...)
- func FileAuditLog(username string, msg string, fileId int)
- func HandleAuditLog(data any, e contracts.Event) error
- func HandleInjectTlsSecret(data any, e contracts.Event) error
- func HandleNamespaceDeleted(data any, e contracts.Event) error
- func HandleProjectChanged(data any, e contracts.Event) error
- func HandleProjectDeleted(data any, e contracts.Event) error
- func NewEventAuditLog(username string, action types.EventActionType, msg string, opts ...AuditOption) contracts.AuditLogImpl
- func Register(e contracts.Event, l contracts.Listener)
- func RegisteredEvents() map[contracts.Event][]contracts.Listener
- type AuditOption
- type NamespaceCreatedData
- type NamespaceDeletedData
- type ProjectChangedData
- type StringYamlPrettier
- type YamlPrettier
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 NewEventAuditLog ¶ added in v4.19.7
func NewEventAuditLog(username string, action types.EventActionType, msg string, opts ...AuditOption) contracts.AuditLogImpl
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 NamespaceDeletedData ¶
type ProjectChangedData ¶
type StringYamlPrettier ¶
type StringYamlPrettier struct {
Str string
}
func (*StringYamlPrettier) PrettyYaml ¶
func (s *StringYamlPrettier) PrettyYaml() string
type YamlPrettier ¶
type YamlPrettier interface {
PrettyYaml() string
}
Click to show internal directories.
Click to hide internal directories.