models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	ID          uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name        string
	Description string
	Processors  []Processor `gorm:"foreignKey:FlowID"`
}

func (*Flow) BeforeCreate

func (f *Flow) BeforeCreate(tx *gorm.DB) (err error)

func (*Flow) TableName

func (f *Flow) TableName() string

type Processor

type Processor struct {
	ID                  uuid.UUID      `gorm:"type:uuid;primaryKey"`
	FlowID              uuid.UUID      `gorm:"column:flow_id;type:uuid;not null"`
	Name                string         `gorm:"type:varchar(255);not null"`
	Type                string         `gorm:"type:varchar(255);not null"`
	FlowOrder           int            `gorm:"column:flow_order;not null"`
	MaxRetries          int            `gorm:"column:max_retries;default:3"`
	LogLevel            logrus.Level   `gorm:"column:log_level;not null;default:'info'"`
	Configuration       map[string]any `gorm:"column:configuration;type:jsonb;not null"`
	PreviousProcessorID uuid.UUID      `gorm:"column:previous_processor_id;type:uuid"`
	NextProcessorID     uuid.UUID      `gorm:"column:next_processor_id;type:uuid"`
}

Processor represents the processor configuration stored in the database.

func (*Processor) TableName

func (p *Processor) TableName() string

Jump to

Keyboard shortcuts

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