feat(env_group): add post-sync action to environment and stream configurations #725

This commit is contained in:
Jacky 2025-04-05 10:55:26 +00:00
parent c0f0980e9e
commit 94fcbf6362
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
31 changed files with 606 additions and 337 deletions

View file

@ -1,9 +1,18 @@
package model
// PostSyncActionType defines the type of action after synchronization
const (
// PostSyncActionNone indicates no operation after sync
PostSyncActionNone = "none"
// PostSyncActionReloadNginx indicates reload Nginx after sync
PostSyncActionReloadNginx = "reload_nginx"
)
// EnvGroup represents a group of environments that can be synced across nodes
type EnvGroup struct {
Model
Name string `json:"name"`
SyncNodeIds []uint64 `json:"sync_node_ids" gorm:"serializer:json"`
OrderID int `json:"-" gorm:"default:0"`
Name string `json:"name"`
SyncNodeIds []uint64 `json:"sync_node_ids" gorm:"serializer:json"`
OrderID int `json:"-" gorm:"default:0"`
PostSyncAction string `json:"post_sync_action" gorm:"default:'reload_nginx'"`
}