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