mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
20 lines
379 B
Go
20 lines
379 B
Go
package event
|
|
|
|
import "strings"
|
|
|
|
// Info defines the event details
|
|
type Info struct {
|
|
Kind string
|
|
Name string
|
|
Namespace string
|
|
Reason Reason
|
|
Message string
|
|
Source Source
|
|
}
|
|
|
|
func (i *Info) Resource() string {
|
|
if i.Namespace == "" {
|
|
return strings.Join([]string{i.Kind, i.Name}, "/")
|
|
}
|
|
return strings.Join([]string{i.Kind, i.Namespace, i.Name}, "/")
|
|
}
|