Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Implement String() for xxxFind
天舟c69220f69aeb
diff --git a/backend/api/activity.go b/backend/api/activity.goindex bb8965832a..14a7095196 100644--- a/backend/api/activity.go+++ b/backend/api/activity.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)// Activity typetype ActivityType string@@ -75,6 +78,14 @@ type ActivityFind struct {ContainerId *int}+func (find *ActivityFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type ActivityPatch struct {ID int `jsonapi:"primary,activityPatch"`diff --git a/backend/api/bookmark.go b/backend/api/bookmark.goindex cba0c23600..269dc59438 100644--- a/backend/api/bookmark.go+++ b/backend/api/bookmark.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type Bookmark struct {ID int `jsonapi:"primary,bookmark"`@@ -38,6 +41,14 @@ type BookmarkFind struct {WorkspaceId *int}+func (find *BookmarkFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type BookmarkDelete struct {ID intdiff --git a/backend/api/dataSource.go b/backend/api/dataSource.goindex cd17f9b29e..2a36d25519 100644--- a/backend/api/dataSource.go+++ b/backend/api/dataSource.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type DataSourceType string@@ -75,6 +78,14 @@ type DataSourceFind struct {Type *DataSourceType}+func (find *DataSourceFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type DataSourcePatch struct {ID int `jsonapi:"primary,dataSourcePatch"`diff --git a/backend/api/environment.go b/backend/api/environment.goindex b66f801f0c..896c20c320 100644--- a/backend/api/environment.go+++ b/backend/api/environment.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type Environment struct {ID int `jsonapi:"primary,environment"`@@ -38,6 +41,14 @@ type EnvironmentFind struct {WorkspaceId *int}+func (find *EnvironmentFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type EnvironmentPatch struct {ID int `jsonapi:"primary,environmentPatch"`diff --git a/backend/api/instance.go b/backend/api/instance.goindex e6854e9c04..0c34075480 100644--- a/backend/api/instance.go+++ b/backend/api/instance.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type Instance struct {ID int `jsonapi:"primary,instance"`@@ -25,7 +28,7 @@ type Instance struct {ExternalLink string `jsonapi:"attr,externalLink"`Host string `jsonapi:"attr,host"`Port string `jsonapi:"attr,port"`- // Only returns username/password if query parameter 'secret=true'+ // Only returns username/password if supplying query parameter 'include=secret'Username string `jsonapi:"attr,username"`Password string `jsonapi:"attr,password"`}@@ -56,6 +59,14 @@ type InstanceFind struct {WorkspaceId *int}+func (find *InstanceFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type InstancePatch struct {ID int `jsonapi:"primary,instancePatch"`diff --git a/backend/api/issue.go b/backend/api/issue.goindex c17fbe92fe..4e92c11991 100644--- a/backend/api/issue.go+++ b/backend/api/issue.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)// Issue statustype IssueStatus string@@ -121,6 +124,14 @@ type IssueFind struct {PrincipalId *int}+func (find *IssueFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type IssuePatch struct {ID int `jsonapi:"primary,issuePatch"`diff --git a/backend/api/member.go b/backend/api/member.goindex 7540f4271e..34fda4af92 100644--- a/backend/api/member.go+++ b/backend/api/member.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type Role string@@ -61,6 +64,14 @@ type MemberFind struct {PrincipalId *int}+func (find *MemberFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type MemberPatch struct {ID intdiff --git a/backend/api/pipeline.go b/backend/api/pipeline.goindex b13a237948..1cafc18cfc 100644--- a/backend/api/pipeline.go+++ b/backend/api/pipeline.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)// Pipeline statustype PipelineStatus string@@ -63,6 +66,14 @@ type PipelineFind struct {WorkspaceId *int}+func (find *PipelineFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type PipelinePatch struct {ID int `jsonapi:"primary,pipelinePatch"`diff --git a/backend/api/principal.go b/backend/api/principal.goindex 184657f9fd..14d1c54860 100644--- a/backend/api/principal.go+++ b/backend/api/principal.go@@ -113,6 +113,14 @@ type PrincipalFind struct {Email *string}+func (find *PrincipalFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type PrincipalPatch struct {ID intdiff --git a/backend/api/project.go b/backend/api/project.goindex a426a4e71f..269db3fab3 100644--- a/backend/api/project.go+++ b/backend/api/project.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)const DEFAULT_PROJECT_ID = 1@@ -48,6 +51,14 @@ type ProjectFind struct {PrincipalId *int}+func (find *ProjectFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type ProjectPatch struct {ID int `jsonapi:"primary,projectPatch"`diff --git a/backend/api/project_member.go b/backend/api/project_member.goindex 2ea0c93107..dee1ea874b 100644--- a/backend/api/project_member.go+++ b/backend/api/project_member.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type ProjectRole string@@ -65,6 +68,14 @@ type ProjectMemberFind struct {ProjectId *int}+func (find *ProjectMemberFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type ProjectMemberPatch struct {ID intdiff --git a/backend/api/stage.go b/backend/api/stage.goindex 570a961851..07a018e725 100644--- a/backend/api/stage.go+++ b/backend/api/stage.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type StageType string@@ -75,6 +78,14 @@ type StageFind struct {PipelineId *int}+func (find *StageFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type StageService interface {CreateStage(ctx context.Context, create *StageCreate) (*Stage, error)FindStageList(ctx context.Context, find *StageFind) ([]*Stage, error)diff --git a/backend/api/task.go b/backend/api/task.goindex 7cd00e6278..9ae07bb7dd 100644--- a/backend/api/task.go+++ b/backend/api/task.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type TaskStatus string@@ -111,6 +114,14 @@ type TaskFind struct {StageId *int}+func (find *TaskFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type TaskStatusPatch struct {ID int `jsonapi:"primary,taskStatusPatch"`diff --git a/backend/api/task_run.go b/backend/api/task_run.goindex 42df838b95..086c9ce1c1 100644--- a/backend/api/task_run.go+++ b/backend/api/task_run.go@@ -1,6 +1,9 @@package api-import "context"+import (+ "context"+ "encoding/json"+)type TaskRunStatus string@@ -76,6 +79,14 @@ type TaskRunFind struct {Status *TaskRunStatus}+func (find *TaskRunFind) String() string {+ str, err := json.Marshal(*find)+ if err != nil {+ return err.Error()+ }+ return string(str)+}+type TaskRunStatusChange struct {ID int