models

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: AGPL-3.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 EventData added in v0.3.3

type EventData struct {
	Event  cloudevents.Event
	Record Record
}

EventData is the data structure for passing events between the server and the handler

type Record

type Record struct {
	// gorm.Model values but with json:"-" to hide from output
	ID        uint           `gorm:"primarykey" json:"-"`
	CreatedAt time.Time      `json:"-"`
	UpdatedAt time.Time      `json:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`

	// actual payload of record
	ClusterName         string `json:"cluster_name" gorm:"uniqueIndex:idx_unique"`
	InstanceId          string `json:"instance_id" gorm:"uniqueIndex:idx_unique"`
	ApplicationName     string `json:"application_name" gorm:"uniqueIndex:idx_unique"`
	ApplicationInstance string `json:"application_instance" gorm:"uniqueIndex:idx_unique"`
	ApplicationVersion  string `json:"application_version" gorm:"not null"`
}

*

  • Record is the model for the records table *
  • This is the main datakeeping model for mopsus. It stores the
  • app info from received events.

Jump to

Keyboard shortcuts

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