models

package
v0.0.0-...-a88e0ec Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 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 AlarmDefinition

type AlarmDefinition struct {
	AlarmDefinitionID     uuid.UUID               `db:"alarm_definition_id"`
	AlarmName             string                  `db:"alarm_name"`
	AlarmLastChange       string                  `db:"alarm_last_change"`
	AlarmChangeType       string                  `db:"alarm_change_type"`
	AlarmDescription      string                  `db:"alarm_description"`
	ProposedRepairActions string                  `db:"proposed_repair_actions"`
	ClearingType          string                  `db:"clearing_type"`
	ManagementInterfaceID []string                `db:"management_interface_id"`
	PKNotificationField   []string                `db:"pk_notification_field"`
	AlarmAdditionalFields *map[string]interface{} `db:"alarm_additional_fields"`

	Severity          string     `db:"severity"`
	AlarmDictionaryID uuid.UUID  `db:"alarm_dictionary_id"`
	CreatedAt         *time.Time `db:"created_at"`
}

AlarmDefinition represents the alarm_definition table in the database

func (AlarmDefinition) OnConflict

func (r AlarmDefinition) OnConflict() string

OnConflict returns the column or constraint to be used in the UPSERT operation

func (AlarmDefinition) PrimaryKey

func (r AlarmDefinition) PrimaryKey() string

PrimaryKey returns the primary key of the table

func (AlarmDefinition) TableName

func (r AlarmDefinition) TableName() string

TableName returns the name of the table in the database

type AlarmDictionary

type AlarmDictionary struct {
	AlarmDictionaryID            uuid.UUID `db:"alarm_dictionary_id"`
	AlarmDictionaryVersion       string    `db:"alarm_dictionary_version"`
	AlarmDictionarySchemaVersion string    `db:"alarm_dictionary_schema_version"`
	EntityType                   string    `db:"entity_type"`
	Vendor                       string    `db:"vendor"`
	ManagementInterfaceID        []string  `db:"management_interface_id"`
	PKNotificationField          []string  `db:"pk_notification_field"`

	NodeClusterTypeID uuid.UUID  `db:"node_cluster_type_id"`
	DataSourceID      uuid.UUID  `db:"data_source_id"`
	GenerationID      int        `db:"generation_id"`
	CreatedAt         *time.Time `db:"created_at"`
}

AlarmDictionary represents the alarm_dictionary table in the database

func (AlarmDictionary) OnConflict

func (r AlarmDictionary) OnConflict() string

OnConflict returns the column or constraint to be used in the UPSERT operation

func (AlarmDictionary) PrimaryKey

func (r AlarmDictionary) PrimaryKey() string

PrimaryKey returns the primary key of the table

func (AlarmDictionary) TableName

func (r AlarmDictionary) TableName() string

TableName returns the name of the table in the database

type DataChangeEvent

type DataChangeEvent struct {
	DataChangeID *uuid.UUID             `db:"data_change_id"`
	ObjectType   string                 `db:"object_type"`
	ObjectID     uuid.UUID              `db:"object_id"`
	ParentID     *uuid.UUID             `db:"parent_id"`
	BeforeState  map[string]interface{} `db:"before_state"`
	AfterState   map[string]interface{} `db:"after_state"`
	SequenceID   *int                   `db:"sequence_id"`
	CreatedAt    *time.Time             `db:"created_at"`
}

DataChangeEvent represents a record in the data_change_event table.

func (DataChangeEvent) OnConflict

func (r DataChangeEvent) OnConflict() string

OnConflict returns the column or constraint to be used in the UPSERT operation

func (DataChangeEvent) PrimaryKey

func (r DataChangeEvent) PrimaryKey() string

PrimaryKey returns the primary key column associated to this model

func (DataChangeEvent) TableName

func (r DataChangeEvent) TableName() string

TableName returns the table name associated to this model

type DataSource

type DataSource struct {
	DataSourceID *uuid.UUID `db:"data_source_id"`
	Name         string     `db:"name"`
	GenerationID int        `db:"generation_id"`
	LastSnapshot *time.Time `db:"last_snapshot"`
	CreatedAt    *time.Time `db:"created_at"`
}

DataSource represents a record in the data_source table.

func (DataSource) OnConflict

func (r DataSource) OnConflict() string

OnConflict returns the column or constraint to be used in the UPSERT operation

func (DataSource) PrimaryKey

func (r DataSource) PrimaryKey() string

PrimaryKey returns the primary key column associated to this model

func (DataSource) TableName

func (r DataSource) TableName() string

TableName returns the table name associated to this model

type Subscription

type Subscription struct {
	SubscriptionID         *uuid.UUID `db:"subscription_id"`
	ConsumerSubscriptionID *uuid.UUID `db:"consumer_subscription_id"`
	Filter                 *string    `db:"filter"`
	Callback               string     `db:"callback"`
	// EventCursor holds the SequenceID of the last processed event.  Sequences start at 1 so we initialize this to 0.
	EventCursor int        `db:"event_cursor"`
	CreatedAt   *time.Time `db:"created_at"`
}

Subscription represents a record in the subscription table.

func (Subscription) OnConflict

func (r Subscription) OnConflict() string

OnConflict returns the column or constraint to be used in the UPSERT operation

func (Subscription) PrimaryKey

func (r Subscription) PrimaryKey() string

PrimaryKey returns the primary key column associated to this model

func (Subscription) TableName

func (r Subscription) TableName() string

TableName returns the table name associated to this model

Jump to

Keyboard shortcuts

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