mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-23 17:31:11 +01:00
- Updated Go version in go.work and backend/go.mod to 1.23.7 - Updated various dependencies in go.sum and backend/go.sum - Refactored models to remove generic type parameters from BaseModel - Introduced new utility functions for consistent API responses - Removed unused utility files from controllers
27 lines
979 B
Go
27 lines
979 B
Go
package models
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/vcs"
|
|
"time"
|
|
)
|
|
|
|
type Git struct {
|
|
any `collection:"gits"`
|
|
BaseModel `bson:",inline"`
|
|
Url string `json:"url" bson:"url"`
|
|
Name string `json:"name" bson:"name"`
|
|
AuthType string `json:"auth_type" bson:"auth_type"`
|
|
Username string `json:"username" bson:"username"`
|
|
Password string `json:"password" bson:"password"`
|
|
CurrentBranch string `json:"current_branch" bson:"current_branch"`
|
|
Status string `json:"status" bson:"status"`
|
|
Error string `json:"error" bson:"error"`
|
|
Spiders []Spider `json:"spiders,omitempty" bson:"-"`
|
|
Refs []vcs.GitRef `json:"refs" bson:"refs"`
|
|
RefsUpdatedAt time.Time `json:"refs_updated_at" bson:"refs_updated_at"`
|
|
CloneLogs []string `json:"clone_logs,omitempty" bson:"clone_logs"`
|
|
|
|
// settings
|
|
AutoPull bool `json:"auto_pull" bson:"auto_pull"`
|
|
}
|