Run go fix and go fmt
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -21,6 +21,6 @@ import (
|
|||||||
|
|
||||||
type Factory struct {
|
type Factory struct {
|
||||||
IOStreams *iostreams.IOStreams
|
IOStreams *iostreams.IOStreams
|
||||||
Version string
|
Version string
|
||||||
Config func() (*config.Config, error)
|
Config func() (*config.Config, error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ type viewResponse struct {
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
FullName string `json:"fullName"`
|
FullName string `json:"fullName"`
|
||||||
} `json:"owner"`
|
} `json:"owner"`
|
||||||
DueDate *string `json:"dueDate"`
|
DueDate *string `json:"dueDate"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Priority string `json:"priority"`
|
Priority string `json:"priority"`
|
||||||
Risk *struct {
|
Risk *struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
} `json:"risk"`
|
} `json:"risk"`
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ WHERE
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (cp ControlDocument) DeleteByDocumentIDs(
|
func (cp ControlDocument) DeleteByDocumentIDs(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
conn pg.Conn,
|
conn pg.Conn,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ type (
|
|||||||
ReferenceID string `db:"reference_id"`
|
ReferenceID string `db:"reference_id"`
|
||||||
Description *string `db:"description"`
|
Description *string `db:"description"`
|
||||||
Source *string `db:"source"`
|
Source *string `db:"source"`
|
||||||
IdentifiedOn *time.Time `db:"identified_on"`
|
IdentifiedOn *time.Time `db:"identified_on"`
|
||||||
RootCause *string `db:"root_cause"`
|
RootCause *string `db:"root_cause"`
|
||||||
CorrectiveAction *string `db:"corrective_action"`
|
CorrectiveAction *string `db:"corrective_action"`
|
||||||
OwnerID *gid.GID `db:"owner_id"`
|
OwnerID *gid.GID `db:"owner_id"`
|
||||||
@@ -369,7 +369,7 @@ WHERE
|
|||||||
"identified_on": f.IdentifiedOn,
|
"identified_on": f.IdentifiedOn,
|
||||||
"root_cause": f.RootCause,
|
"root_cause": f.RootCause,
|
||||||
"corrective_action": f.CorrectiveAction,
|
"corrective_action": f.CorrectiveAction,
|
||||||
"owner_id": f.OwnerID,
|
"owner_id": f.OwnerID,
|
||||||
"due_date": f.DueDate,
|
"due_date": f.DueDate,
|
||||||
"status": f.Status,
|
"status": f.Status,
|
||||||
"priority": f.Priority,
|
"priority": f.Priority,
|
||||||
|
|||||||
@@ -47,16 +47,16 @@ func NewFindingFilter(
|
|||||||
|
|
||||||
func (f *FindingFilter) SQLArguments() pgx.StrictNamedArgs {
|
func (f *FindingFilter) SQLArguments() pgx.StrictNamedArgs {
|
||||||
args := pgx.StrictNamedArgs{
|
args := pgx.StrictNamedArgs{
|
||||||
"has_snapshot_filter": false,
|
"has_snapshot_filter": false,
|
||||||
"filter_snapshot_id": nil,
|
"filter_snapshot_id": nil,
|
||||||
"has_kind_filter": false,
|
"has_kind_filter": false,
|
||||||
"filter_kind": nil,
|
"filter_kind": nil,
|
||||||
"has_status_filter": false,
|
"has_status_filter": false,
|
||||||
"filter_status": nil,
|
"filter_status": nil,
|
||||||
"has_priority_filter": false,
|
"has_priority_filter": false,
|
||||||
"filter_priority": nil,
|
"filter_priority": nil,
|
||||||
"has_owner_filter": false,
|
"has_owner_filter": false,
|
||||||
"filter_owner_id": nil,
|
"filter_owner_id": nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.snapshotID != nil {
|
if f.snapshotID != nil {
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ import (
|
|||||||
type FindingOrderField string
|
type FindingOrderField string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FindingOrderFieldCreatedAt FindingOrderField = "CREATED_AT"
|
FindingOrderFieldCreatedAt FindingOrderField = "CREATED_AT"
|
||||||
FindingOrderFieldIdentifiedOn FindingOrderField = "IDENTIFIED_ON"
|
FindingOrderFieldIdentifiedOn FindingOrderField = "IDENTIFIED_ON"
|
||||||
FindingOrderFieldDueDate FindingOrderField = "DUE_DATE"
|
FindingOrderFieldDueDate FindingOrderField = "DUE_DATE"
|
||||||
FindingOrderFieldStatus FindingOrderField = "STATUS"
|
FindingOrderFieldStatus FindingOrderField = "STATUS"
|
||||||
FindingOrderFieldPriority FindingOrderField = "PRIORITY"
|
FindingOrderFieldPriority FindingOrderField = "PRIORITY"
|
||||||
FindingOrderFieldReferenceId FindingOrderField = "REFERENCE_ID"
|
FindingOrderFieldReferenceId FindingOrderField = "REFERENCE_ID"
|
||||||
FindingOrderFieldKind FindingOrderField = "KIND"
|
FindingOrderFieldKind FindingOrderField = "KIND"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p FindingOrderField) Column() string {
|
func (p FindingOrderField) Column() string {
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ WHERE
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (rp RiskDocument) DeleteByDocumentIDs(
|
func (rp RiskDocument) DeleteByDocumentIDs(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
conn pg.Conn,
|
conn pg.Conn,
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ func (s *FindingService) Create(
|
|||||||
Kind: req.Kind,
|
Kind: req.Kind,
|
||||||
Description: req.Description,
|
Description: req.Description,
|
||||||
Source: req.Source,
|
Source: req.Source,
|
||||||
IdentifiedOn: req.IdentifiedOn,
|
IdentifiedOn: req.IdentifiedOn,
|
||||||
RootCause: req.RootCause,
|
RootCause: req.RootCause,
|
||||||
CorrectiveAction: req.CorrectiveAction,
|
CorrectiveAction: req.CorrectiveAction,
|
||||||
OwnerID: req.OwnerID,
|
OwnerID: req.OwnerID,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
organizationCondition = policy.Equals("principal.organization_id", "resource.organization_id")
|
organizationCondition = policy.Equals("principal.organization_id", "resource.organization_id")
|
||||||
documentWriteActiveOnly = policy.Deny(
|
documentWriteActiveOnly = policy.Deny(
|
||||||
ActionDocumentUpdate,
|
ActionDocumentUpdate,
|
||||||
ActionDocumentArchive,
|
ActionDocumentArchive,
|
||||||
ActionDocumentDraftVersionCreate,
|
ActionDocumentDraftVersionCreate,
|
||||||
|
|||||||
@@ -51,13 +51,13 @@ import (
|
|||||||
"go.probo.inc/probo/pkg/crypto/keys"
|
"go.probo.inc/probo/pkg/crypto/keys"
|
||||||
"go.probo.inc/probo/pkg/crypto/passwdhash"
|
"go.probo.inc/probo/pkg/crypto/passwdhash"
|
||||||
"go.probo.inc/probo/pkg/esign"
|
"go.probo.inc/probo/pkg/esign"
|
||||||
|
"go.probo.inc/probo/pkg/file"
|
||||||
"go.probo.inc/probo/pkg/filemanager"
|
"go.probo.inc/probo/pkg/filemanager"
|
||||||
"go.probo.inc/probo/pkg/html2pdf"
|
"go.probo.inc/probo/pkg/html2pdf"
|
||||||
"go.probo.inc/probo/pkg/iam"
|
"go.probo.inc/probo/pkg/iam"
|
||||||
"go.probo.inc/probo/pkg/mailer"
|
"go.probo.inc/probo/pkg/mailer"
|
||||||
"go.probo.inc/probo/pkg/mailman"
|
"go.probo.inc/probo/pkg/mailman"
|
||||||
"go.probo.inc/probo/pkg/probo"
|
"go.probo.inc/probo/pkg/probo"
|
||||||
"go.probo.inc/probo/pkg/file"
|
|
||||||
"go.probo.inc/probo/pkg/securecookie"
|
"go.probo.inc/probo/pkg/securecookie"
|
||||||
"go.probo.inc/probo/pkg/server"
|
"go.probo.inc/probo/pkg/server"
|
||||||
"go.probo.inc/probo/pkg/slack"
|
"go.probo.inc/probo/pkg/slack"
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import (
|
|||||||
"go.probo.inc/probo/pkg/baseurl"
|
"go.probo.inc/probo/pkg/baseurl"
|
||||||
"go.probo.inc/probo/pkg/connector"
|
"go.probo.inc/probo/pkg/connector"
|
||||||
"go.probo.inc/probo/pkg/esign"
|
"go.probo.inc/probo/pkg/esign"
|
||||||
|
"go.probo.inc/probo/pkg/file"
|
||||||
"go.probo.inc/probo/pkg/iam"
|
"go.probo.inc/probo/pkg/iam"
|
||||||
"go.probo.inc/probo/pkg/mailman"
|
"go.probo.inc/probo/pkg/mailman"
|
||||||
"go.probo.inc/probo/pkg/probo"
|
"go.probo.inc/probo/pkg/probo"
|
||||||
"go.probo.inc/probo/pkg/file"
|
|
||||||
"go.probo.inc/probo/pkg/securecookie"
|
"go.probo.inc/probo/pkg/securecookie"
|
||||||
connect_v1 "go.probo.inc/probo/pkg/server/api/connect/v1"
|
connect_v1 "go.probo.inc/probo/pkg/server/api/connect/v1"
|
||||||
console_v1 "go.probo.inc/probo/pkg/server/api/console/v1"
|
console_v1 "go.probo.inc/probo/pkg/server/api/console/v1"
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ func NewFinding(f *coredata.Finding) *Finding {
|
|||||||
ReferenceID: f.ReferenceID,
|
ReferenceID: f.ReferenceID,
|
||||||
Description: f.Description,
|
Description: f.Description,
|
||||||
Source: f.Source,
|
Source: f.Source,
|
||||||
IdentifiedOn: f.IdentifiedOn,
|
IdentifiedOn: f.IdentifiedOn,
|
||||||
RootCause: f.RootCause,
|
RootCause: f.RootCause,
|
||||||
CorrectiveAction: f.CorrectiveAction,
|
CorrectiveAction: f.CorrectiveAction,
|
||||||
DueDate: f.DueDate,
|
DueDate: f.DueDate,
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"go.gearno.de/kit/log"
|
"go.gearno.de/kit/log"
|
||||||
"go.probo.inc/probo/pkg/coredata"
|
"go.probo.inc/probo/pkg/coredata"
|
||||||
"go.probo.inc/probo/pkg/gid"
|
|
||||||
"go.probo.inc/probo/pkg/file"
|
"go.probo.inc/probo/pkg/file"
|
||||||
|
"go.probo.inc/probo/pkg/gid"
|
||||||
)
|
)
|
||||||
|
|
||||||
const presignedURLExpiry = 1 * time.Hour
|
const presignedURLExpiry = 1 * time.Hour
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ func NewFinding(f *coredata.Finding) *Finding {
|
|||||||
ReferenceID: f.ReferenceID,
|
ReferenceID: f.ReferenceID,
|
||||||
Description: f.Description,
|
Description: f.Description,
|
||||||
Source: f.Source,
|
Source: f.Source,
|
||||||
IdentifiedOn: f.IdentifiedOn,
|
IdentifiedOn: f.IdentifiedOn,
|
||||||
RootCause: f.RootCause,
|
RootCause: f.RootCause,
|
||||||
CorrectiveAction: f.CorrectiveAction,
|
CorrectiveAction: f.CorrectiveAction,
|
||||||
OwnerID: f.OwnerID,
|
OwnerID: f.OwnerID,
|
||||||
|
|||||||
@@ -22,13 +22,14 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"go.gearno.de/kit/httpserver"
|
"go.gearno.de/kit/httpserver"
|
||||||
"go.gearno.de/kit/log"
|
"go.gearno.de/kit/log"
|
||||||
|
"go.gearno.de/x/ref"
|
||||||
"go.probo.inc/probo/pkg/baseurl"
|
"go.probo.inc/probo/pkg/baseurl"
|
||||||
"go.probo.inc/probo/pkg/connector"
|
"go.probo.inc/probo/pkg/connector"
|
||||||
"go.probo.inc/probo/pkg/esign"
|
"go.probo.inc/probo/pkg/esign"
|
||||||
|
"go.probo.inc/probo/pkg/file"
|
||||||
"go.probo.inc/probo/pkg/iam"
|
"go.probo.inc/probo/pkg/iam"
|
||||||
"go.probo.inc/probo/pkg/mailman"
|
"go.probo.inc/probo/pkg/mailman"
|
||||||
"go.probo.inc/probo/pkg/probo"
|
"go.probo.inc/probo/pkg/probo"
|
||||||
"go.probo.inc/probo/pkg/file"
|
|
||||||
"go.probo.inc/probo/pkg/securecookie"
|
"go.probo.inc/probo/pkg/securecookie"
|
||||||
"go.probo.inc/probo/pkg/server/api"
|
"go.probo.inc/probo/pkg/server/api"
|
||||||
"go.probo.inc/probo/pkg/server/api/compliancepage"
|
"go.probo.inc/probo/pkg/server/api/compliancepage"
|
||||||
@@ -37,7 +38,6 @@ import (
|
|||||||
console_web "go.probo.inc/probo/pkg/server/web"
|
console_web "go.probo.inc/probo/pkg/server/web"
|
||||||
"go.probo.inc/probo/pkg/slack"
|
"go.probo.inc/probo/pkg/slack"
|
||||||
"go.probo.inc/probo/pkg/trust"
|
"go.probo.inc/probo/pkg/trust"
|
||||||
"go.gearno.de/x/ref"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user