From d098490aacf7efad62e0f96500cc033296b7d61a Mon Sep 17 00:00:00 2001 From: galactica Date: Sun, 9 Feb 2025 14:52:53 +0200 Subject: [PATCH] Add State ID --- internal/commands/predicates.go | 2 ++ internal/wrappers/predicates.go | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/commands/predicates.go b/internal/commands/predicates.go index 6781ae2b3..70f955f8d 100644 --- a/internal/commands/predicates.go +++ b/internal/commands/predicates.go @@ -206,6 +206,7 @@ type predicateView struct { SimilarityID string `format:"name:Similarity ID"` Severity string State string + StateID string Comment string CreatedBy string CreatedAt time.Time `format:"name:Created at;time:01-02-06 15:04:05"` @@ -236,6 +237,7 @@ func toSinglePredicateView(predicate *wrappers.Predicate) predicateView { SimilarityID: predicate.SimilarityID, Severity: predicate.Severity, State: predicate.State, + StateID: predicate.StateID, Comment: predicate.Comment, CreatedBy: predicate.CreatedBy, CreatedAt: predicate.CreatedAt, diff --git a/internal/wrappers/predicates.go b/internal/wrappers/predicates.go index f530a0006..08b58ffef 100644 --- a/internal/wrappers/predicates.go +++ b/internal/wrappers/predicates.go @@ -10,6 +10,7 @@ type BasePredicate struct { State string `json:"state"` Severity string `json:"severity"` Comment string `json:"comment"` + StateID string `json:"StateId"` } type PredicateRequest struct { @@ -45,13 +46,10 @@ type CustomState struct { Type string `json:"type"` } - - type CustomStatesWrapper interface { GetAllCustomStates(includeDeleted bool) ([]CustomState, error) } - type ResultsPredicatesWrapper interface { PredicateSeverityAndState(predicate *PredicateRequest, scanType string) (*WebError, error) GetAllPredicatesForSimilarityID(