@@ -40,7 +40,7 @@ func main() {
|
|||||||
|
|
||||||
f := &cmdutil.Factory{
|
f := &cmdutil.Factory{
|
||||||
IOStreams: ios,
|
IOStreams: ios,
|
||||||
Version: version,
|
Version: version,
|
||||||
Config: func() (*config.Config, error) {
|
Config: func() (*config.Config, error) {
|
||||||
return config.Load()
|
return config.Load()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,16 +49,16 @@ type createResponse struct {
|
|||||||
CreateRisk struct {
|
CreateRisk struct {
|
||||||
RiskEdge struct {
|
RiskEdge struct {
|
||||||
Node struct {
|
Node struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Category string `json:"category"`
|
Category string `json:"category"`
|
||||||
Treatment string `json:"treatment"`
|
Treatment string `json:"treatment"`
|
||||||
InherentLikelihood int `json:"inherentLikelihood"`
|
InherentLikelihood int `json:"inherentLikelihood"`
|
||||||
InherentImpact int `json:"inherentImpact"`
|
InherentImpact int `json:"inherentImpact"`
|
||||||
InherentRiskScore int `json:"inherentRiskScore"`
|
InherentRiskScore int `json:"inherentRiskScore"`
|
||||||
ResidualLikelihood int `json:"residualLikelihood"`
|
ResidualLikelihood int `json:"residualLikelihood"`
|
||||||
ResidualImpact int `json:"residualImpact"`
|
ResidualImpact int `json:"residualImpact"`
|
||||||
ResidualRiskScore int `json:"residualRiskScore"`
|
ResidualRiskScore int `json:"residualRiskScore"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
} `json:"riskEdge"`
|
} `json:"riskEdge"`
|
||||||
} `json:"createRisk"`
|
} `json:"createRisk"`
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
|||||||
func(data json.RawMessage) (*api.Connection[risk], error) {
|
func(data json.RawMessage) (*api.Connection[risk], error) {
|
||||||
var resp struct {
|
var resp struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
Risks api.Connection[risk] `json:"risks"`
|
Risks api.Connection[risk] `json:"risks"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,21 +50,21 @@ query($id: ID!) {
|
|||||||
|
|
||||||
type viewResponse struct {
|
type viewResponse struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Description *string `json:"description"`
|
Description *string `json:"description"`
|
||||||
Category string `json:"category"`
|
Category string `json:"category"`
|
||||||
Treatment string `json:"treatment"`
|
Treatment string `json:"treatment"`
|
||||||
Note string `json:"note"`
|
Note string `json:"note"`
|
||||||
InherentLikelihood int `json:"inherentLikelihood"`
|
InherentLikelihood int `json:"inherentLikelihood"`
|
||||||
InherentImpact int `json:"inherentImpact"`
|
InherentImpact int `json:"inherentImpact"`
|
||||||
InherentRiskScore int `json:"inherentRiskScore"`
|
InherentRiskScore int `json:"inherentRiskScore"`
|
||||||
ResidualLikelihood int `json:"residualLikelihood"`
|
ResidualLikelihood int `json:"residualLikelihood"`
|
||||||
ResidualImpact int `json:"residualImpact"`
|
ResidualImpact int `json:"residualImpact"`
|
||||||
ResidualRiskScore int `json:"residualRiskScore"`
|
ResidualRiskScore int `json:"residualRiskScore"`
|
||||||
CreatedAt string `json:"createdAt"`
|
CreatedAt string `json:"createdAt"`
|
||||||
UpdatedAt string `json:"updatedAt"`
|
UpdatedAt string `json:"updatedAt"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
|||||||
func(data json.RawMessage) (*api.Connection[stateOfApplicability], error) {
|
func(data json.RawMessage) (*api.Connection[stateOfApplicability], error) {
|
||||||
var resp struct {
|
var resp struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
StatesOfApplicability api.Connection[stateOfApplicability] `json:"statesOfApplicability"`
|
StatesOfApplicability api.Connection[stateOfApplicability] `json:"statesOfApplicability"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ func NewCmdAdd(f *cmdutil.Factory) *cobra.Command {
|
|||||||
|
|
||||||
input := map[string]any{
|
input := map[string]any{
|
||||||
"stateOfApplicabilityId": flagSoA,
|
"stateOfApplicabilityId": flagSoA,
|
||||||
"controlId": flagControl,
|
"controlId": flagControl,
|
||||||
"applicability": flagApplicable,
|
"applicability": flagApplicable,
|
||||||
}
|
}
|
||||||
|
|
||||||
if flagJustification != "" {
|
if flagJustification != "" {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
|||||||
func(data json.RawMessage) (*api.Connection[applicabilityStatement], error) {
|
func(data json.RawMessage) (*api.Connection[applicabilityStatement], error) {
|
||||||
var resp struct {
|
var resp struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
ApplicabilityStatements api.Connection[applicabilityStatement] `json:"applicabilityStatements"`
|
ApplicabilityStatements api.Connection[applicabilityStatement] `json:"applicabilityStatements"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
|||||||
func(data json.RawMessage) (*api.Connection[profile], error) {
|
func(data json.RawMessage) (*api.Connection[profile], error) {
|
||||||
var resp struct {
|
var resp struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
Profiles api.Connection[profile] `json:"profiles"`
|
Profiles api.Connection[profile] `json:"profiles"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
|||||||
func(data json.RawMessage) (*api.Connection[webhookEvent], error) {
|
func(data json.RawMessage) (*api.Connection[webhookEvent], error) {
|
||||||
var resp struct {
|
var resp struct {
|
||||||
Node *struct {
|
Node *struct {
|
||||||
Typename string `json:"__typename"`
|
Typename string `json:"__typename"`
|
||||||
Events api.Connection[webhookEvent] `json:"events"`
|
Events api.Connection[webhookEvent] `json:"events"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user