Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-16 17:19:02 +01:00
parent 842bbfbe97
commit 364c193d33
10 changed files with 35 additions and 35 deletions

View File

@@ -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()
}, },

View File

@@ -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)
} }

View File

@@ -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"`

View File

@@ -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"`
} }

View File

@@ -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"`
} }

View File

@@ -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"`
} }

View File

@@ -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 != "" {

View File

@@ -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"`
} }

View File

@@ -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"`
} }

View File

@@ -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"`
} }