feat: optimizing dependency services including grpc, api

This commit is contained in:
Marvin Zhang
2024-11-04 17:45:34 +08:00
parent c341089dce
commit fbf8e5f9f3
8 changed files with 151 additions and 102 deletions

View File

@@ -75,6 +75,7 @@ func GetModelInstances() []any {
*new(DependencyLogV2),
*new(DependencySettingV2),
*new(DependencyTaskV2),
*new(DependencyRepoV2),
*new(EnvironmentV2),
*new(GitV2),
*new(MetricV2),

View File

@@ -0,0 +1,10 @@
package models
type DependencyRepoV2 struct {
any `collection:"dependency_repos"`
BaseModelV2[DependencyRepoV2] `bson:",inline"`
Name string `json:"name" bson:"name"`
Type string `json:"type" bson:"type"`
LatestVersion string `json:"latest_version" bson:"latest_version"`
AllVersions []string `json:"all_versions" bson:"all_versions"`
}

View File

@@ -11,8 +11,10 @@ type DependencyV2 struct {
Description string `json:"description" bson:"description"`
NodeId primitive.ObjectID `json:"node_id" bson:"node_id"`
Type string `json:"type" bson:"type"`
LatestVersion string `json:"latest_version" bson:"latest_version"`
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:"-"`
}