mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: missing data source issue
This commit is contained in:
@@ -12,7 +12,7 @@ type DataSourceV2 struct {
|
||||
Hosts []string `json:"hosts" bson:"hosts"`
|
||||
Database string `json:"database" bson:"database"`
|
||||
Username string `json:"username" bson:"username"`
|
||||
Password string `json:"password,omitempty" bson:"-"`
|
||||
Password string `json:"-,omitempty" bson:"password"`
|
||||
ConnectType string `json:"connect_type" bson:"connect_type"`
|
||||
Status string `json:"status" bson:"status"`
|
||||
Error string `json:"error" bson:"error"`
|
||||
|
||||
@@ -3,17 +3,19 @@ package models
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type NotificationSettingV2 struct {
|
||||
Id primitive.ObjectID `json:"_id" bson:"_id"`
|
||||
Type string `json:"type" bson:"type"`
|
||||
Name string `json:"name" bson:"name"`
|
||||
Description string `json:"description" bson:"description"`
|
||||
Enabled bool `json:"enabled" bson:"enabled"`
|
||||
Global bool `json:"global" bson:"global"`
|
||||
Title string `json:"title,omitempty" bson:"title,omitempty"`
|
||||
Template string `json:"template,omitempty" bson:"template,omitempty"`
|
||||
TaskTrigger string `json:"task_trigger" bson:"task_trigger"`
|
||||
Mail NotificationSettingMail `json:"mail,omitempty" bson:"mail,omitempty"`
|
||||
Mobile NotificationSettingMobile `json:"mobile,omitempty" bson:"mobile,omitempty"`
|
||||
any `collection:"notification_settings"`
|
||||
BaseModelV2[NotificationSettingV2] `bson:",inline"`
|
||||
Id primitive.ObjectID `json:"_id" bson:"_id"`
|
||||
Type string `json:"type" bson:"type"`
|
||||
Name string `json:"name" bson:"name"`
|
||||
Description string `json:"description" bson:"description"`
|
||||
Enabled bool `json:"enabled" bson:"enabled"`
|
||||
Global bool `json:"global" bson:"global"`
|
||||
Title string `json:"title,omitempty" bson:"title,omitempty"`
|
||||
Template string `json:"template,omitempty" bson:"template,omitempty"`
|
||||
TaskTrigger string `json:"task_trigger" bson:"task_trigger"`
|
||||
Mail NotificationSettingMail `json:"mail,omitempty" bson:"mail,omitempty"`
|
||||
Mobile NotificationSettingMobile `json:"mobile,omitempty" bson:"mobile,omitempty"`
|
||||
}
|
||||
|
||||
type NotificationSettingMail struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
type SpiderV2 struct {
|
||||
any `collection:"spiders"` // spider id
|
||||
any `collection:"spiders"`
|
||||
BaseModelV2[SpiderV2] `bson:",inline"`
|
||||
Name string `json:"name" bson:"name"` // spider name
|
||||
Type string `json:"type" bson:"type"` // spider type
|
||||
|
||||
Reference in New Issue
Block a user