1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/event/info.go

21 lines
379 B
Go
Raw Normal View History

2019-05-10 00:05:21 -07:00
package event
import "strings"
// Info defines the event details
2019-05-10 12:36:55 -07:00
type Info struct {
2019-06-26 12:41:42 -07:00
Kind string
Name string
Namespace string
Reason Reason
2019-06-26 12:41:42 -07:00
Message string
Source Source
2019-05-10 10:38:38 -07:00
}
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}, "/")
}