Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Id string `json:"id,omitzero"`
Created string `json:"created,omitzero" validate:"date"`
Kind string `json:"kind,omitzero"`
LastEventTime string `json:"lastEventTime,omitzero" validate:"date"`
EventCount *float64 `json:"eventCount,omitzero" validate:"integer"`
Status string `json:"status" validate:"required"`
Pinned *bool `json:"pinned,omitzero"`
Context *EventContext `json:"context,omitzero" validate:"default={},optional"`
}
func (Event) ValidationRule ¶
ValidationRule reflects Event. This is the schema the "event" kind validates against (was RegisterReflect("event", event.Event{})).
type EventContext ¶
type EventContext struct {
Category string `json:"category,omitzero"`
Component EventContextComponent `json:"component,omitzero" validate:"valid=actuator|dns-updater|scheduler|iam-broker|metadata-proxy|data-service|mk8s|other"`
CloudProvider string `json:"cloudProvider,omitzero"`
Cluster string `json:"cluster,omitzero"`
PrincipalLink string `json:"principalLink,omitzero"`
Fingerprint string `json:"fingerprint,omitzero" validate:"max=64"`
// EventContext is .unknown(true) (validate.go:22): properties it does not name
// round-trip untouched.
Extras base.Extras `json:"-"`
} //ts:export
EventContext ports event.ts:3. .unknown(true) is registered on this type so arbitrary properties pass through.
func (EventContext) MarshalJSON ¶
func (c EventContext) MarshalJSON() ([]byte, error)
func (*EventContext) UnmarshalJSON ¶
func (c *EventContext) UnmarshalJSON(b []byte) error
func (EventContext) ValidationRule ¶
func (EventContext) ValidationRule() *validate.Rule
ValidationRule reflects EventContext and layers Joi's .unknown(true) (was RegisterObjectRules(EventContext{}, {Unknown: true})).
type EventContextComponent ¶
type EventContextComponent string
const ( EventContextComponentActuator EventContextComponent = "actuator" EventContextComponentDnsUpdater EventContextComponent = "dns-updater" EventContextComponentScheduler EventContextComponent = "scheduler" EventContextComponentIamBroker EventContextComponent = "iam-broker" EventContextComponentMetadataProxy EventContextComponent = "metadata-proxy" EventContextComponentDataService EventContextComponent = "data-service" EventContextComponentMk8S EventContextComponent = "mk8s" EventContextComponentOther EventContextComponent = "other" )