model

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SentinelEntity

type SentinelEntity struct {
	app.SnowflakeIDModel
	app.SoftDeleteModel
	AppName           string               `gorm:"column:app_name" json:"AppName" form:"AppName" comment:"AppName"`
	DefaultAppType    int                  `gorm:"column:app_type" json:"DefaultAppType" form:"DefaultAppType" comment:"DefaultAppType"`
	MetricHttpAddr    string               `gorm:"column:metric_http_addr" json:"MetricHttpAddr" form:"MetricHttpAddr" comment:"MetricHttpAddr"`
	MetricHttpPath    string               `gorm:"column:metric_http_path" json:"MetricHttpPath" form:"MetricHttpPath" comment:"MetricHttpPath"`
	CollectIntervalMs int                  `gorm:"column:collect_interval_ms" json:"CollectIntervalMs" form:"CollectIntervalMs" comment:"CollectIntervalMs"`
	Rules             []SentinelRuleEntity `gorm:"foreignKey:sentinel_id;association_foreignkey:Id;constraint:OnCreate:CASCADE,OnUpdate:CASCADE,OnDelete:CASCADE;"`
	Status            int                  `gorm:"column:status;default:0" json:"Status" form:"Status" comment:"状态"`
}

func (SentinelEntity) TableName

func (SentinelEntity) TableName() string

type SentinelRuleEntity

type SentinelRuleEntity struct {
	app.SnowflakeIDModel
	app.SoftDeleteModel
	SentinelId             int64  `gorm:"column:sentinel_id" json:"SentinelId" form:"SentinelId" comment:"SentinelId"`
	Resource               string `gorm:"column:resource" json:"Resource" form:"Resource" comment:"Resource"`
	TokenCalculateStrategy string `` /* 131-byte string literal not displayed */
	Threshold              string `gorm:"column:threshold" json:"Threshold" form:"Threshold" comment:"Threshold"`
	ControlBehavior        string `gorm:"column:control_behavior" json:"ControlBehavior" form:"ControlBehavior" comment:"ControlBehavior"`
	MaxQueueingTimeMs      string `gorm:"column:max_queueing_time_ms" json:"MaxQueueingTimeMs" form:"MaxQueueingTimeMs" comment:"MaxQueueingTimeMs"`
	StatIntervalInMs       string `gorm:"column:stat_interval_in_ms" json:"StatIntervalInMs" form:"StatIntervalInMs" comment:"StatIntervalInMs"`
	Status                 int    `gorm:"column:status;default:0" json:"Status" form:"Status" comment:"状态"`
}

func (SentinelRuleEntity) TableName

func (SentinelRuleEntity) TableName() string

Jump to

Keyboard shortcuts

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