Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkrzyz committed Nov 12, 2024
1 parent f4ce3e7 commit ca99077
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ query ($filter: IssueFilter, $first: Int, $after: String) {
totalCount
edges {
node {
id
primaryName
id
primaryName
type
description
description
metadata {
created_at
created_by
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ type ActivityHasIssue struct {
}

type ActivityAggregations struct {
Metadata
}

type ActivityFilter struct {
Metadata
Paginated
Status []*string `json:"status"`
ServiceName []*string `json:"service_name"`
Expand Down
7 changes: 0 additions & 7 deletions internal/entity/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ type ResultList struct {
}

type ListOptions struct {
Metadata
ShowTotalCount bool `json:"show_total_count"`
ShowPageInfo bool `json:"show_page_info"`
IncludeAggregations bool `json:"include_aggregations"`
Expand All @@ -108,7 +107,6 @@ func NewListOptions() *ListOptions {
}

type PageInfo struct {
Metadata
HasNextPage *bool `json:"has_next_page,omitempty"`
HasPreviousPage *bool `json:"has_previous_page,omitempty"`
IsValidPage *bool `json:"is_valid_page,omitempty"`
Expand All @@ -120,7 +118,6 @@ type PageInfo struct {
}

type Page struct {
Metadata
After *string `json:"after,omitempty"`
PageNumber *int `json:"page_number,omitempty"`
IsCurrent bool `json:"is_current,omitempty"`
Expand All @@ -134,13 +131,11 @@ type List[T interface{}] struct {
}

type TimeFilter struct {
Metadata
After time.Time `json:"after"`
Before time.Time `json:"before"`
}

type Paginated struct {
Metadata
First *int `json:"first"`
After *int64 `json:"from"`
}
Expand All @@ -152,7 +147,6 @@ func MaxPaginated() Paginated {
}

type Severity struct {
Metadata
Value string
Score float64
Cvss Cvss
Expand Down Expand Up @@ -194,7 +188,6 @@ func NewSeverity(url string) Severity {
}

type Cvss struct {
Metadata
Vector string
Base *metric.Base
Temporal *metric.Temporal
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ type ComponentResult struct {
}

type ComponentFilter struct {
Metadata
Paginated
Name []*string `json:"name"`
Id []*int64 `json:"id"`
ComponentVersionId []*int64 `json:"component_version_id"`
}

type ComponentAggregations struct {
Metadata
}
2 changes: 0 additions & 2 deletions internal/entity/component_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package entity

type ComponentInstanceFilter struct {
Metadata
Paginated
IssueMatchId []*int64 `json:"issue_match_id"`
ServiceId []*int64 `json:"service_id"`
Expand All @@ -13,7 +12,6 @@ type ComponentInstanceFilter struct {
}

type ComponentInstanceAggregations struct {
Metadata
}

type ComponentInstanceResult struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/component_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package entity

type ComponentVersionFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
IssueId []*int64 `json:"issue_id"`
Expand All @@ -13,7 +12,6 @@ type ComponentVersionFilter struct {
}

type ComponentVersionAggregations struct {
Metadata
}

type ComponentVersionResult struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/evidence.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@ type Evidence struct {
}

type EvidenceFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
ActivityId []*int64 `json:"activity_id"`
IssueMatchId []*int64 `json:"issue_match_id"`
UserId []*int64 `json:"user_id"`
}
type EvidenceAggregations struct {
Metadata
}

type EvidenceResult struct {
Expand Down
5 changes: 0 additions & 5 deletions internal/entity/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

type IssueWithAggregations struct {
Metadata
IssueAggregations
Issue
}
Expand Down Expand Up @@ -51,7 +50,6 @@ type IssueResult struct {
}

type IssueFilter struct {
Metadata
Paginated
PrimaryName []*string `json:"primary_name"`
ServiceName []*string `json:"service_name"`
Expand All @@ -68,7 +66,6 @@ type IssueFilter struct {
}

type IssueAggregations struct {
Metadata
Activites int64
IssueMatches int64
AffectedServices int64
Expand All @@ -91,13 +88,11 @@ type Issue struct {
}

type IssueCount struct {
Metadata
Count int64 `json:"count"`
Type IssueType `json:"type"`
}

type IssueTypeCounts struct {
Metadata
VulnerabilityCount int64 `json:"vulnerability_count"`
PolicyViolationCount int64 `json:"policy_violation_count"`
SecurityEventCount int64 `json:"security_event_count"`
Expand Down
1 change: 0 additions & 1 deletion internal/entity/issue_match.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ type IssueMatch struct {
}

type IssueMatchFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
AffectedServiceName []*string `json:"affected_service_name"`
Expand Down
1 change: 0 additions & 1 deletion internal/entity/issue_match_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type IssueMatchChange struct {
}

type IssueMatchChangeFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
ActivityId []*int64 `json:"activity_id"`
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/issue_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type BaseIssueRepository struct {
}

type IssueRepositoryFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
ServiceId []*int64 `json:"service_id"`
Expand All @@ -35,7 +34,6 @@ func NewIssueRepositoryFilter() *IssueRepositoryFilter {
}

type IssueRepositoryAggregations struct {
Metadata
}

type IssueRepository struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/issue_variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ type IssueVariant struct {
}

type IssueVariantFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
SecondaryName []*string `json:"secondary_name"`
Expand All @@ -42,7 +41,6 @@ func NewIssueVariantFilter() *IssueVariantFilter {
}

type IssueVariantAggregations struct {
Metadata
}

type IssueVariantResult struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ type BaseService struct {
}

type ServiceAggregations struct {
Metadata
}

type ServiceFilter struct {
Metadata
Paginated
SupportGroupName []*string `json:"support_group_name"`
Id []*int64 `json:"id"`
Expand Down
1 change: 0 additions & 1 deletion internal/entity/severity.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package entity

type SeverityFilter struct {
Metadata
IssueMatchId []*int64 `json:"issue_match_id"`
IssueId []*int64 `json:"issue_id"`
}
2 changes: 0 additions & 2 deletions internal/entity/support_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type SupportGroup struct {
}

type SupportGroupFilter struct {
Metadata
Paginated
Id []*int64 `json:"id"`
ServiceId []*int64 `json:"service_id"`
Expand All @@ -19,7 +18,6 @@ type SupportGroupFilter struct {
}

type SupportGroupAggregations struct {
Metadata
}

type SupportGroupResult struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/entity/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type User struct {
}

type UserFilter struct {
Metadata
Paginated
Name []*string `json:"name"`
UniqueUserID []*string `json:"uniqueUserId"`
Expand All @@ -31,7 +30,6 @@ type UserFilter struct {
}

type UserAggregations struct {
Metadata
}

type UserResult struct {
Expand Down

0 comments on commit ca99077

Please sign in to comment.