models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID         uint      `gorm:"primarykey" json:"id"`
	CreateTime time.Time `gorm:"autoCreateTime" json:"create_time"`

	// InformerName is unique value represents the informer config,
	// every Event belongs to an informer.
	InformerName string `json:"informer_name"`

	EventType string `json:"event_type"`
	Group     string `gorm:"column:event_group" json:"group"`
	Version   string `json:"version"`
	Resource  string `json:"resource"`
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	Obj       []byte `json:"obj,omitempty"`
	OldObj    []byte `json:"old_obj,omitempty"`
}

Event is a copy of Kubernetes event, to persistent event history, and to avoid improper ADDED events when the controller restart.

func (*Event) GetObj

func (e *Event) GetObj() (obj *unstructured.Unstructured)

func (*Event) GetOldObj

func (e *Event) GetOldObj() (obj *unstructured.Unstructured)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL