mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
feat: added dependency config setup (wip)
This commit is contained in:
@@ -14,7 +14,6 @@ type Dependency struct {
|
||||
Version string `json:"version" bson:"version"`
|
||||
Status string `json:"status" bson:"status"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
Logs []string `json:"logs,omitempty" bson:"logs,omitempty"`
|
||||
NodeIds []primitive.ObjectID `json:"node_ids,omitempty" bson:"-"`
|
||||
Versions []string `json:"versions,omitempty" bson:"-"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,9 @@ package models
|
||||
type DependencyConfig struct {
|
||||
any `collection:"dependency_configs"`
|
||||
BaseModel[DependencyConfig] `bson:",inline"`
|
||||
Key string `json:"key" bson:"key"`
|
||||
Name string `json:"name" bson:"name"`
|
||||
Cmd string `json:"cmd" bson:"cmd"`
|
||||
Proxy string `json:"proxy" bson:"proxy"`
|
||||
SetupNodeIds []string `json:"setup_node_ids" bson:"setup_node_ids"`
|
||||
SetupScriptPath string `json:"setup_script_path" bson:"setup_script_path"`
|
||||
Key string `json:"key" bson:"key"`
|
||||
Name string `json:"name" bson:"name"`
|
||||
ExecCmd string `json:"exec_cmd" bson:"exec_cmd"`
|
||||
PkgCmd string `json:"pkg_cmd" bson:"pkg_cmd"`
|
||||
Proxy string `json:"proxy" bson:"proxy"`
|
||||
}
|
||||
|
||||
13
core/models/models/dependency_config_setup.go
Normal file
13
core/models/models/dependency_config_setup.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type DependencyConfigSetup struct {
|
||||
any `collection:"dependency_config_setups"`
|
||||
BaseModel[DependencyConfigSetup] `bson:",inline"`
|
||||
DependencyConfigId primitive.ObjectID `json:"dependency_config_id" bson:"dependency_config_id"`
|
||||
NodeId primitive.ObjectID `json:"node_id" bson:"node_id"`
|
||||
Version string `json:"version" bson:"version"`
|
||||
Status string `json:"status" bson:"status"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
}
|
||||
@@ -5,6 +5,6 @@ import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
type DependencyLog struct {
|
||||
any `collection:"dependency_logs"`
|
||||
BaseModel[DependencyLog] `bson:",inline"`
|
||||
DependencyId primitive.ObjectID `json:"dependency_id" bson:"dependency_id"`
|
||||
TargetId primitive.ObjectID `json:"target_id" bson:"target_id"`
|
||||
Content string `json:"content" bson:"content"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user