diff --git a/go.mod b/go.mod index fb4e58fbb..d68c57263 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/kubescape/storage -go 1.21.3 +go 1.20 require ( github.com/anchore/syft v0.97.1 diff --git a/pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go b/pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go index 3a28d5f1d..25037438c 100644 --- a/pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go @@ -239,6 +239,56 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Control)(nil), (*softwarecomposition.Control)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Control_To_softwarecomposition_Control(a.(*Control), b.(*softwarecomposition.Control), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.Control)(nil), (*Control)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_Control_To_v1beta1_Control(a.(*softwarecomposition.Control), b.(*Control), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlConfiguration)(nil), (*softwarecomposition.ControlConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlConfiguration_To_softwarecomposition_ControlConfiguration(a.(*ControlConfiguration), b.(*softwarecomposition.ControlConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.ControlConfiguration)(nil), (*ControlConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_ControlConfiguration_To_v1beta1_ControlConfiguration(a.(*softwarecomposition.ControlConfiguration), b.(*ControlConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlConfigurationList)(nil), (*softwarecomposition.ControlConfigurationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlConfigurationList_To_softwarecomposition_ControlConfigurationList(a.(*ControlConfigurationList), b.(*softwarecomposition.ControlConfigurationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.ControlConfigurationList)(nil), (*ControlConfigurationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_ControlConfigurationList_To_v1beta1_ControlConfigurationList(a.(*softwarecomposition.ControlConfigurationList), b.(*ControlConfigurationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlList)(nil), (*softwarecomposition.ControlList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlList_To_softwarecomposition_ControlList(a.(*ControlList), b.(*softwarecomposition.ControlList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.ControlList)(nil), (*ControlList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_ControlList_To_v1beta1_ControlList(a.(*softwarecomposition.ControlList), b.(*ControlList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlRuleRef)(nil), (*softwarecomposition.ControlRuleRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlRuleRef_To_softwarecomposition_ControlRuleRef(a.(*ControlRuleRef), b.(*softwarecomposition.ControlRuleRef), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.ControlRuleRef)(nil), (*ControlRuleRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_ControlRuleRef_To_v1beta1_ControlRuleRef(a.(*softwarecomposition.ControlRuleRef), b.(*ControlRuleRef), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ControlSeverity)(nil), (*softwarecomposition.ControlSeverity)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ControlSeverity_To_softwarecomposition_ControlSeverity(a.(*ControlSeverity), b.(*softwarecomposition.ControlSeverity), scope) }); err != nil { @@ -349,6 +399,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Exception)(nil), (*softwarecomposition.Exception)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Exception_To_softwarecomposition_Exception(a.(*Exception), b.(*softwarecomposition.Exception), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.Exception)(nil), (*Exception)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_Exception_To_v1beta1_Exception(a.(*softwarecomposition.Exception), b.(*Exception), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExceptionList)(nil), (*softwarecomposition.ExceptionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExceptionList_To_softwarecomposition_ExceptionList(a.(*ExceptionList), b.(*softwarecomposition.ExceptionList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.ExceptionList)(nil), (*ExceptionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_ExceptionList_To_v1beta1_ExceptionList(a.(*softwarecomposition.ExceptionList), b.(*ExceptionList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ExecCalls)(nil), (*softwarecomposition.ExecCalls)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ExecCalls_To_softwarecomposition_ExecCalls(a.(*ExecCalls), b.(*softwarecomposition.ExecCalls), scope) }); err != nil { @@ -419,6 +489,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Framework)(nil), (*softwarecomposition.Framework)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Framework_To_softwarecomposition_Framework(a.(*Framework), b.(*softwarecomposition.Framework), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.Framework)(nil), (*Framework)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_Framework_To_v1beta1_Framework(a.(*softwarecomposition.Framework), b.(*Framework), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FrameworkControlRef)(nil), (*softwarecomposition.FrameworkControlRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FrameworkControlRef_To_softwarecomposition_FrameworkControlRef(a.(*FrameworkControlRef), b.(*softwarecomposition.FrameworkControlRef), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.FrameworkControlRef)(nil), (*FrameworkControlRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_FrameworkControlRef_To_v1beta1_FrameworkControlRef(a.(*softwarecomposition.FrameworkControlRef), b.(*FrameworkControlRef), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FrameworkList)(nil), (*softwarecomposition.FrameworkList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FrameworkList_To_softwarecomposition_FrameworkList(a.(*FrameworkList), b.(*softwarecomposition.FrameworkList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.FrameworkList)(nil), (*FrameworkList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_FrameworkList_To_v1beta1_FrameworkList(a.(*softwarecomposition.FrameworkList), b.(*FrameworkList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*GeneratedNetworkPolicy)(nil), (*softwarecomposition.GeneratedNetworkPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_GeneratedNetworkPolicy_To_softwarecomposition_GeneratedNetworkPolicy(a.(*GeneratedNetworkPolicy), b.(*softwarecomposition.GeneratedNetworkPolicy), scope) }); err != nil { @@ -1069,6 +1169,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*Rule)(nil), (*softwarecomposition.Rule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Rule_To_softwarecomposition_Rule(a.(*Rule), b.(*softwarecomposition.Rule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.Rule)(nil), (*Rule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_Rule_To_v1beta1_Rule(a.(*softwarecomposition.Rule), b.(*Rule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RuleList)(nil), (*softwarecomposition.RuleList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RuleList_To_softwarecomposition_RuleList(a.(*RuleList), b.(*softwarecomposition.RuleList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*softwarecomposition.RuleList)(nil), (*RuleList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_softwarecomposition_RuleList_To_v1beta1_RuleList(a.(*softwarecomposition.RuleList), b.(*RuleList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*RulePath)(nil), (*softwarecomposition.RulePath)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_RulePath_To_softwarecomposition_RulePath(a.(*RulePath), b.(*softwarecomposition.RulePath), scope) }); err != nil { @@ -2284,6 +2404,120 @@ func Convert_softwarecomposition_ConfigurationScanSummarySpec_To_v1beta1_Configu return autoConvert_softwarecomposition_ConfigurationScanSummarySpec_To_v1beta1_ConfigurationScanSummarySpec(in, out, s) } +func autoConvert_v1beta1_Control_To_softwarecomposition_Control(in *Control, out *softwarecomposition.Control, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.RulesRef = *(*[]softwarecomposition.ControlRuleRef)(unsafe.Pointer(&in.RulesRef)) + out.Payload = in.Payload + return nil +} + +// Convert_v1beta1_Control_To_softwarecomposition_Control is an autogenerated conversion function. +func Convert_v1beta1_Control_To_softwarecomposition_Control(in *Control, out *softwarecomposition.Control, s conversion.Scope) error { + return autoConvert_v1beta1_Control_To_softwarecomposition_Control(in, out, s) +} + +func autoConvert_softwarecomposition_Control_To_v1beta1_Control(in *softwarecomposition.Control, out *Control, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.RulesRef = *(*[]ControlRuleRef)(unsafe.Pointer(&in.RulesRef)) + out.Payload = in.Payload + return nil +} + +// Convert_softwarecomposition_Control_To_v1beta1_Control is an autogenerated conversion function. +func Convert_softwarecomposition_Control_To_v1beta1_Control(in *softwarecomposition.Control, out *Control, s conversion.Scope) error { + return autoConvert_softwarecomposition_Control_To_v1beta1_Control(in, out, s) +} + +func autoConvert_v1beta1_ControlConfiguration_To_softwarecomposition_ControlConfiguration(in *ControlConfiguration, out *softwarecomposition.ControlConfiguration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Payload = in.Payload + return nil +} + +// Convert_v1beta1_ControlConfiguration_To_softwarecomposition_ControlConfiguration is an autogenerated conversion function. +func Convert_v1beta1_ControlConfiguration_To_softwarecomposition_ControlConfiguration(in *ControlConfiguration, out *softwarecomposition.ControlConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_ControlConfiguration_To_softwarecomposition_ControlConfiguration(in, out, s) +} + +func autoConvert_softwarecomposition_ControlConfiguration_To_v1beta1_ControlConfiguration(in *softwarecomposition.ControlConfiguration, out *ControlConfiguration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Payload = in.Payload + return nil +} + +// Convert_softwarecomposition_ControlConfiguration_To_v1beta1_ControlConfiguration is an autogenerated conversion function. +func Convert_softwarecomposition_ControlConfiguration_To_v1beta1_ControlConfiguration(in *softwarecomposition.ControlConfiguration, out *ControlConfiguration, s conversion.Scope) error { + return autoConvert_softwarecomposition_ControlConfiguration_To_v1beta1_ControlConfiguration(in, out, s) +} + +func autoConvert_v1beta1_ControlConfigurationList_To_softwarecomposition_ControlConfigurationList(in *ControlConfigurationList, out *softwarecomposition.ControlConfigurationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]softwarecomposition.ControlConfiguration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ControlConfigurationList_To_softwarecomposition_ControlConfigurationList is an autogenerated conversion function. +func Convert_v1beta1_ControlConfigurationList_To_softwarecomposition_ControlConfigurationList(in *ControlConfigurationList, out *softwarecomposition.ControlConfigurationList, s conversion.Scope) error { + return autoConvert_v1beta1_ControlConfigurationList_To_softwarecomposition_ControlConfigurationList(in, out, s) +} + +func autoConvert_softwarecomposition_ControlConfigurationList_To_v1beta1_ControlConfigurationList(in *softwarecomposition.ControlConfigurationList, out *ControlConfigurationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ControlConfiguration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_softwarecomposition_ControlConfigurationList_To_v1beta1_ControlConfigurationList is an autogenerated conversion function. +func Convert_softwarecomposition_ControlConfigurationList_To_v1beta1_ControlConfigurationList(in *softwarecomposition.ControlConfigurationList, out *ControlConfigurationList, s conversion.Scope) error { + return autoConvert_softwarecomposition_ControlConfigurationList_To_v1beta1_ControlConfigurationList(in, out, s) +} + +func autoConvert_v1beta1_ControlList_To_softwarecomposition_ControlList(in *ControlList, out *softwarecomposition.ControlList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]softwarecomposition.Control)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ControlList_To_softwarecomposition_ControlList is an autogenerated conversion function. +func Convert_v1beta1_ControlList_To_softwarecomposition_ControlList(in *ControlList, out *softwarecomposition.ControlList, s conversion.Scope) error { + return autoConvert_v1beta1_ControlList_To_softwarecomposition_ControlList(in, out, s) +} + +func autoConvert_softwarecomposition_ControlList_To_v1beta1_ControlList(in *softwarecomposition.ControlList, out *ControlList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Control)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_softwarecomposition_ControlList_To_v1beta1_ControlList is an autogenerated conversion function. +func Convert_softwarecomposition_ControlList_To_v1beta1_ControlList(in *softwarecomposition.ControlList, out *ControlList, s conversion.Scope) error { + return autoConvert_softwarecomposition_ControlList_To_v1beta1_ControlList(in, out, s) +} + +func autoConvert_v1beta1_ControlRuleRef_To_softwarecomposition_ControlRuleRef(in *ControlRuleRef, out *softwarecomposition.ControlRuleRef, s conversion.Scope) error { + out.Name = in.Name + out.Kind = in.Kind + out.ApiVersion = in.ApiVersion + return nil +} + +// Convert_v1beta1_ControlRuleRef_To_softwarecomposition_ControlRuleRef is an autogenerated conversion function. +func Convert_v1beta1_ControlRuleRef_To_softwarecomposition_ControlRuleRef(in *ControlRuleRef, out *softwarecomposition.ControlRuleRef, s conversion.Scope) error { + return autoConvert_v1beta1_ControlRuleRef_To_softwarecomposition_ControlRuleRef(in, out, s) +} + +func autoConvert_softwarecomposition_ControlRuleRef_To_v1beta1_ControlRuleRef(in *softwarecomposition.ControlRuleRef, out *ControlRuleRef, s conversion.Scope) error { + out.Name = in.Name + out.Kind = in.Kind + out.ApiVersion = in.ApiVersion + return nil +} + +// Convert_softwarecomposition_ControlRuleRef_To_v1beta1_ControlRuleRef is an autogenerated conversion function. +func Convert_softwarecomposition_ControlRuleRef_To_v1beta1_ControlRuleRef(in *softwarecomposition.ControlRuleRef, out *ControlRuleRef, s conversion.Scope) error { + return autoConvert_softwarecomposition_ControlRuleRef_To_v1beta1_ControlRuleRef(in, out, s) +} + func autoConvert_v1beta1_ControlSeverity_To_softwarecomposition_ControlSeverity(in *ControlSeverity, out *softwarecomposition.ControlSeverity, s conversion.Scope) error { out.Severity = in.Severity out.ScoreFactor = in.ScoreFactor @@ -2576,6 +2810,50 @@ func Convert_softwarecomposition_Document_To_v1beta1_Document(in *softwarecompos return autoConvert_softwarecomposition_Document_To_v1beta1_Document(in, out, s) } +func autoConvert_v1beta1_Exception_To_softwarecomposition_Exception(in *Exception, out *softwarecomposition.Exception, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Payload = in.Payload + return nil +} + +// Convert_v1beta1_Exception_To_softwarecomposition_Exception is an autogenerated conversion function. +func Convert_v1beta1_Exception_To_softwarecomposition_Exception(in *Exception, out *softwarecomposition.Exception, s conversion.Scope) error { + return autoConvert_v1beta1_Exception_To_softwarecomposition_Exception(in, out, s) +} + +func autoConvert_softwarecomposition_Exception_To_v1beta1_Exception(in *softwarecomposition.Exception, out *Exception, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Payload = in.Payload + return nil +} + +// Convert_softwarecomposition_Exception_To_v1beta1_Exception is an autogenerated conversion function. +func Convert_softwarecomposition_Exception_To_v1beta1_Exception(in *softwarecomposition.Exception, out *Exception, s conversion.Scope) error { + return autoConvert_softwarecomposition_Exception_To_v1beta1_Exception(in, out, s) +} + +func autoConvert_v1beta1_ExceptionList_To_softwarecomposition_ExceptionList(in *ExceptionList, out *softwarecomposition.ExceptionList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]softwarecomposition.Exception)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ExceptionList_To_softwarecomposition_ExceptionList is an autogenerated conversion function. +func Convert_v1beta1_ExceptionList_To_softwarecomposition_ExceptionList(in *ExceptionList, out *softwarecomposition.ExceptionList, s conversion.Scope) error { + return autoConvert_v1beta1_ExceptionList_To_softwarecomposition_ExceptionList(in, out, s) +} + +func autoConvert_softwarecomposition_ExceptionList_To_v1beta1_ExceptionList(in *softwarecomposition.ExceptionList, out *ExceptionList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Exception)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_softwarecomposition_ExceptionList_To_v1beta1_ExceptionList is an autogenerated conversion function. +func Convert_softwarecomposition_ExceptionList_To_v1beta1_ExceptionList(in *softwarecomposition.ExceptionList, out *ExceptionList, s conversion.Scope) error { + return autoConvert_softwarecomposition_ExceptionList_To_v1beta1_ExceptionList(in, out, s) +} + func autoConvert_v1beta1_ExecCalls_To_softwarecomposition_ExecCalls(in *ExecCalls, out *softwarecomposition.ExecCalls, s conversion.Scope) error { out.Path = in.Path out.Args = *(*[]string)(unsafe.Pointer(&in.Args)) @@ -2782,6 +3060,78 @@ func Convert_softwarecomposition_Fix_To_v1beta1_Fix(in *softwarecomposition.Fix, return autoConvert_softwarecomposition_Fix_To_v1beta1_Fix(in, out, s) } +func autoConvert_v1beta1_Framework_To_softwarecomposition_Framework(in *Framework, out *softwarecomposition.Framework, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ControlsRef = *(*[]softwarecomposition.FrameworkControlRef)(unsafe.Pointer(&in.ControlsRef)) + out.Payload = in.Payload + return nil +} + +// Convert_v1beta1_Framework_To_softwarecomposition_Framework is an autogenerated conversion function. +func Convert_v1beta1_Framework_To_softwarecomposition_Framework(in *Framework, out *softwarecomposition.Framework, s conversion.Scope) error { + return autoConvert_v1beta1_Framework_To_softwarecomposition_Framework(in, out, s) +} + +func autoConvert_softwarecomposition_Framework_To_v1beta1_Framework(in *softwarecomposition.Framework, out *Framework, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ControlsRef = *(*[]FrameworkControlRef)(unsafe.Pointer(&in.ControlsRef)) + out.Payload = in.Payload + return nil +} + +// Convert_softwarecomposition_Framework_To_v1beta1_Framework is an autogenerated conversion function. +func Convert_softwarecomposition_Framework_To_v1beta1_Framework(in *softwarecomposition.Framework, out *Framework, s conversion.Scope) error { + return autoConvert_softwarecomposition_Framework_To_v1beta1_Framework(in, out, s) +} + +func autoConvert_v1beta1_FrameworkControlRef_To_softwarecomposition_FrameworkControlRef(in *FrameworkControlRef, out *softwarecomposition.FrameworkControlRef, s conversion.Scope) error { + out.Name = in.Name + out.ControlID = in.ControlID + out.Kind = in.Kind + out.ApiVersion = in.ApiVersion + return nil +} + +// Convert_v1beta1_FrameworkControlRef_To_softwarecomposition_FrameworkControlRef is an autogenerated conversion function. +func Convert_v1beta1_FrameworkControlRef_To_softwarecomposition_FrameworkControlRef(in *FrameworkControlRef, out *softwarecomposition.FrameworkControlRef, s conversion.Scope) error { + return autoConvert_v1beta1_FrameworkControlRef_To_softwarecomposition_FrameworkControlRef(in, out, s) +} + +func autoConvert_softwarecomposition_FrameworkControlRef_To_v1beta1_FrameworkControlRef(in *softwarecomposition.FrameworkControlRef, out *FrameworkControlRef, s conversion.Scope) error { + out.Name = in.Name + out.ControlID = in.ControlID + out.Kind = in.Kind + out.ApiVersion = in.ApiVersion + return nil +} + +// Convert_softwarecomposition_FrameworkControlRef_To_v1beta1_FrameworkControlRef is an autogenerated conversion function. +func Convert_softwarecomposition_FrameworkControlRef_To_v1beta1_FrameworkControlRef(in *softwarecomposition.FrameworkControlRef, out *FrameworkControlRef, s conversion.Scope) error { + return autoConvert_softwarecomposition_FrameworkControlRef_To_v1beta1_FrameworkControlRef(in, out, s) +} + +func autoConvert_v1beta1_FrameworkList_To_softwarecomposition_FrameworkList(in *FrameworkList, out *softwarecomposition.FrameworkList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]softwarecomposition.Framework)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_FrameworkList_To_softwarecomposition_FrameworkList is an autogenerated conversion function. +func Convert_v1beta1_FrameworkList_To_softwarecomposition_FrameworkList(in *FrameworkList, out *softwarecomposition.FrameworkList, s conversion.Scope) error { + return autoConvert_v1beta1_FrameworkList_To_softwarecomposition_FrameworkList(in, out, s) +} + +func autoConvert_softwarecomposition_FrameworkList_To_v1beta1_FrameworkList(in *softwarecomposition.FrameworkList, out *FrameworkList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Framework)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_softwarecomposition_FrameworkList_To_v1beta1_FrameworkList is an autogenerated conversion function. +func Convert_softwarecomposition_FrameworkList_To_v1beta1_FrameworkList(in *softwarecomposition.FrameworkList, out *FrameworkList, s conversion.Scope) error { + return autoConvert_softwarecomposition_FrameworkList_To_v1beta1_FrameworkList(in, out, s) +} + func autoConvert_v1beta1_GeneratedNetworkPolicy_To_softwarecomposition_GeneratedNetworkPolicy(in *GeneratedNetworkPolicy, out *softwarecomposition.GeneratedNetworkPolicy, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_NetworkPolicy_To_softwarecomposition_NetworkPolicy(&in.Spec, &out.Spec, s); err != nil { @@ -4522,6 +4872,52 @@ func Convert_softwarecomposition_Review_To_v1beta1_Review(in *softwarecompositio return autoConvert_softwarecomposition_Review_To_v1beta1_Review(in, out, s) } +func autoConvert_v1beta1_Rule_To_softwarecomposition_Rule(in *Rule, out *softwarecomposition.Rule, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rego = in.Rego + out.Payload = in.Payload + return nil +} + +// Convert_v1beta1_Rule_To_softwarecomposition_Rule is an autogenerated conversion function. +func Convert_v1beta1_Rule_To_softwarecomposition_Rule(in *Rule, out *softwarecomposition.Rule, s conversion.Scope) error { + return autoConvert_v1beta1_Rule_To_softwarecomposition_Rule(in, out, s) +} + +func autoConvert_softwarecomposition_Rule_To_v1beta1_Rule(in *softwarecomposition.Rule, out *Rule, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rego = in.Rego + out.Payload = in.Payload + return nil +} + +// Convert_softwarecomposition_Rule_To_v1beta1_Rule is an autogenerated conversion function. +func Convert_softwarecomposition_Rule_To_v1beta1_Rule(in *softwarecomposition.Rule, out *Rule, s conversion.Scope) error { + return autoConvert_softwarecomposition_Rule_To_v1beta1_Rule(in, out, s) +} + +func autoConvert_v1beta1_RuleList_To_softwarecomposition_RuleList(in *RuleList, out *softwarecomposition.RuleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]softwarecomposition.Rule)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_RuleList_To_softwarecomposition_RuleList is an autogenerated conversion function. +func Convert_v1beta1_RuleList_To_softwarecomposition_RuleList(in *RuleList, out *softwarecomposition.RuleList, s conversion.Scope) error { + return autoConvert_v1beta1_RuleList_To_softwarecomposition_RuleList(in, out, s) +} + +func autoConvert_softwarecomposition_RuleList_To_v1beta1_RuleList(in *softwarecomposition.RuleList, out *RuleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Rule)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_softwarecomposition_RuleList_To_v1beta1_RuleList is an autogenerated conversion function. +func Convert_softwarecomposition_RuleList_To_v1beta1_RuleList(in *softwarecomposition.RuleList, out *RuleList, s conversion.Scope) error { + return autoConvert_softwarecomposition_RuleList_To_v1beta1_RuleList(in, out, s) +} + func autoConvert_v1beta1_RulePath_To_softwarecomposition_RulePath(in *RulePath, out *softwarecomposition.RulePath, s conversion.Scope) error { out.FailedPath = in.FailedPath out.FixPath = in.FixPath diff --git a/pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go b/pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go index c22399fac..87a402c19 100644 --- a/pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go @@ -527,6 +527,147 @@ func (in *ConfigurationScanSummarySpec) DeepCopy() *ConfigurationScanSummarySpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Control) DeepCopyInto(out *Control) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.RulesRef != nil { + in, out := &in.RulesRef, &out.RulesRef + *out = make([]ControlRuleRef, len(*in)) + copy(*out, *in) + } + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Control. +func (in *Control) DeepCopy() *Control { + if in == nil { + return nil + } + out := new(Control) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Control) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlConfiguration) DeepCopyInto(out *ControlConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlConfiguration. +func (in *ControlConfiguration) DeepCopy() *ControlConfiguration { + if in == nil { + return nil + } + out := new(ControlConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlConfigurationList) DeepCopyInto(out *ControlConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControlConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlConfigurationList. +func (in *ControlConfigurationList) DeepCopy() *ControlConfigurationList { + if in == nil { + return nil + } + out := new(ControlConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlConfigurationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlList) DeepCopyInto(out *ControlList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Control, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlList. +func (in *ControlList) DeepCopy() *ControlList { + if in == nil { + return nil + } + out := new(ControlList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlRuleRef) DeepCopyInto(out *ControlRuleRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlRuleRef. +func (in *ControlRuleRef) DeepCopy() *ControlRuleRef { + if in == nil { + return nil + } + out := new(ControlRuleRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ControlSeverity) DeepCopyInto(out *ControlSeverity) { *out = *in @@ -821,6 +962,66 @@ func (in *Document) DeepCopy() *Document { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Exception) DeepCopyInto(out *Exception) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exception. +func (in *Exception) DeepCopy() *Exception { + if in == nil { + return nil + } + out := new(Exception) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Exception) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExceptionList) DeepCopyInto(out *ExceptionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Exception, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExceptionList. +func (in *ExceptionList) DeepCopy() *ExceptionList { + if in == nil { + return nil + } + out := new(ExceptionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExceptionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExecCalls) DeepCopyInto(out *ExecCalls) { *out = *in @@ -1015,6 +1216,87 @@ func (in *Fix) DeepCopy() *Fix { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Framework) DeepCopyInto(out *Framework) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ControlsRef != nil { + in, out := &in.ControlsRef, &out.ControlsRef + *out = make([]FrameworkControlRef, len(*in)) + copy(*out, *in) + } + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Framework. +func (in *Framework) DeepCopy() *Framework { + if in == nil { + return nil + } + out := new(Framework) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Framework) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrameworkControlRef) DeepCopyInto(out *FrameworkControlRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworkControlRef. +func (in *FrameworkControlRef) DeepCopy() *FrameworkControlRef { + if in == nil { + return nil + } + out := new(FrameworkControlRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrameworkList) DeepCopyInto(out *FrameworkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Framework, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworkList. +func (in *FrameworkList) DeepCopy() *FrameworkList { + if in == nil { + return nil + } + out := new(FrameworkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FrameworkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GeneratedNetworkPolicy) DeepCopyInto(out *GeneratedNetworkPolicy) { *out = *in @@ -2724,6 +3006,66 @@ func (in *Review) DeepCopy() *Review { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Rule) DeepCopyInto(out *Rule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. +func (in *Rule) DeepCopy() *Rule { + if in == nil { + return nil + } + out := new(Rule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Rule) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuleList) DeepCopyInto(out *RuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Rule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList. +func (in *RuleList) DeepCopy() *RuleList { + if in == nil { + return nil + } + out := new(RuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RuleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RulePath) DeepCopyInto(out *RulePath) { *out = *in diff --git a/pkg/apis/softwarecomposition/zz_generated.deepcopy.go b/pkg/apis/softwarecomposition/zz_generated.deepcopy.go index 0fe2e8eea..166343dbb 100644 --- a/pkg/apis/softwarecomposition/zz_generated.deepcopy.go +++ b/pkg/apis/softwarecomposition/zz_generated.deepcopy.go @@ -527,6 +527,147 @@ func (in *ConfigurationScanSummarySpec) DeepCopy() *ConfigurationScanSummarySpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Control) DeepCopyInto(out *Control) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.RulesRef != nil { + in, out := &in.RulesRef, &out.RulesRef + *out = make([]ControlRuleRef, len(*in)) + copy(*out, *in) + } + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Control. +func (in *Control) DeepCopy() *Control { + if in == nil { + return nil + } + out := new(Control) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Control) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlConfiguration) DeepCopyInto(out *ControlConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlConfiguration. +func (in *ControlConfiguration) DeepCopy() *ControlConfiguration { + if in == nil { + return nil + } + out := new(ControlConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlConfigurationList) DeepCopyInto(out *ControlConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControlConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlConfigurationList. +func (in *ControlConfigurationList) DeepCopy() *ControlConfigurationList { + if in == nil { + return nil + } + out := new(ControlConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlConfigurationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlList) DeepCopyInto(out *ControlList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Control, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlList. +func (in *ControlList) DeepCopy() *ControlList { + if in == nil { + return nil + } + out := new(ControlList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControlList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlRuleRef) DeepCopyInto(out *ControlRuleRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlRuleRef. +func (in *ControlRuleRef) DeepCopy() *ControlRuleRef { + if in == nil { + return nil + } + out := new(ControlRuleRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ControlSeverity) DeepCopyInto(out *ControlSeverity) { *out = *in @@ -821,6 +962,66 @@ func (in *Document) DeepCopy() *Document { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Exception) DeepCopyInto(out *Exception) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exception. +func (in *Exception) DeepCopy() *Exception { + if in == nil { + return nil + } + out := new(Exception) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Exception) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExceptionList) DeepCopyInto(out *ExceptionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Exception, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExceptionList. +func (in *ExceptionList) DeepCopy() *ExceptionList { + if in == nil { + return nil + } + out := new(ExceptionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExceptionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExecCalls) DeepCopyInto(out *ExecCalls) { *out = *in @@ -1015,6 +1216,87 @@ func (in *Fix) DeepCopy() *Fix { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Framework) DeepCopyInto(out *Framework) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ControlsRef != nil { + in, out := &in.ControlsRef, &out.ControlsRef + *out = make([]FrameworkControlRef, len(*in)) + copy(*out, *in) + } + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Framework. +func (in *Framework) DeepCopy() *Framework { + if in == nil { + return nil + } + out := new(Framework) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Framework) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrameworkControlRef) DeepCopyInto(out *FrameworkControlRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworkControlRef. +func (in *FrameworkControlRef) DeepCopy() *FrameworkControlRef { + if in == nil { + return nil + } + out := new(FrameworkControlRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrameworkList) DeepCopyInto(out *FrameworkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Framework, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameworkList. +func (in *FrameworkList) DeepCopy() *FrameworkList { + if in == nil { + return nil + } + out := new(FrameworkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FrameworkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GeneratedNetworkPolicy) DeepCopyInto(out *GeneratedNetworkPolicy) { *out = *in @@ -2724,6 +3006,66 @@ func (in *Review) DeepCopy() *Review { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Rule) DeepCopyInto(out *Rule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Payload.DeepCopyInto(&out.Payload) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. +func (in *Rule) DeepCopy() *Rule { + if in == nil { + return nil + } + out := new(Rule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Rule) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuleList) DeepCopyInto(out *RuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Rule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList. +func (in *RuleList) DeepCopy() *RuleList { + if in == nil { + return nil + } + out := new(RuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RuleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RulePath) DeepCopyInto(out *RulePath) { *out = *in diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/control.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/control.go new file mode 100644 index 000000000..317d2d442 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/control.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + scheme "github.com/kubescape/storage/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ControlsGetter has a method to return a ControlInterface. +// A group's client should implement this interface. +type ControlsGetter interface { + Controls(namespace string) ControlInterface +} + +// ControlInterface has methods to work with Control resources. +type ControlInterface interface { + Create(ctx context.Context, control *v1beta1.Control, opts v1.CreateOptions) (*v1beta1.Control, error) + Update(ctx context.Context, control *v1beta1.Control, opts v1.UpdateOptions) (*v1beta1.Control, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Control, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControlList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Control, err error) + ControlExpansion +} + +// controls implements ControlInterface +type controls struct { + client rest.Interface + ns string +} + +// newControls returns a Controls +func newControls(c *SpdxV1beta1Client, namespace string) *controls { + return &controls{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the control, and returns the corresponding control object, and an error if there is any. +func (c *controls) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Control, err error) { + result = &v1beta1.Control{} + err = c.client.Get(). + Namespace(c.ns). + Resource("controls"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Controls that match those selectors. +func (c *controls) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControlList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ControlList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("controls"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested controls. +func (c *controls) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("controls"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a control and creates it. Returns the server's representation of the control, and an error, if there is any. +func (c *controls) Create(ctx context.Context, control *v1beta1.Control, opts v1.CreateOptions) (result *v1beta1.Control, err error) { + result = &v1beta1.Control{} + err = c.client.Post(). + Namespace(c.ns). + Resource("controls"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(control). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a control and updates it. Returns the server's representation of the control, and an error, if there is any. +func (c *controls) Update(ctx context.Context, control *v1beta1.Control, opts v1.UpdateOptions) (result *v1beta1.Control, err error) { + result = &v1beta1.Control{} + err = c.client.Put(). + Namespace(c.ns). + Resource("controls"). + Name(control.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(control). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the control and deletes it. Returns an error if one occurs. +func (c *controls) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("controls"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *controls) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("controls"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched control. +func (c *controls) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Control, err error) { + result = &v1beta1.Control{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("controls"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/controlconfiguration.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/controlconfiguration.go new file mode 100644 index 000000000..ceb472f6f --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/controlconfiguration.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + scheme "github.com/kubescape/storage/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ControlConfigurationsGetter has a method to return a ControlConfigurationInterface. +// A group's client should implement this interface. +type ControlConfigurationsGetter interface { + ControlConfigurations(namespace string) ControlConfigurationInterface +} + +// ControlConfigurationInterface has methods to work with ControlConfiguration resources. +type ControlConfigurationInterface interface { + Create(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.CreateOptions) (*v1beta1.ControlConfiguration, error) + Update(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.UpdateOptions) (*v1beta1.ControlConfiguration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ControlConfiguration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControlConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControlConfiguration, err error) + ControlConfigurationExpansion +} + +// controlConfigurations implements ControlConfigurationInterface +type controlConfigurations struct { + client rest.Interface + ns string +} + +// newControlConfigurations returns a ControlConfigurations +func newControlConfigurations(c *SpdxV1beta1Client, namespace string) *controlConfigurations { + return &controlConfigurations{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the controlConfiguration, and returns the corresponding controlConfiguration object, and an error if there is any. +func (c *controlConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControlConfiguration, err error) { + result = &v1beta1.ControlConfiguration{} + err = c.client.Get(). + Namespace(c.ns). + Resource("controlconfigurations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ControlConfigurations that match those selectors. +func (c *controlConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControlConfigurationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ControlConfigurationList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("controlconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested controlConfigurations. +func (c *controlConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("controlconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a controlConfiguration and creates it. Returns the server's representation of the controlConfiguration, and an error, if there is any. +func (c *controlConfigurations) Create(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.CreateOptions) (result *v1beta1.ControlConfiguration, err error) { + result = &v1beta1.ControlConfiguration{} + err = c.client.Post(). + Namespace(c.ns). + Resource("controlconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(controlConfiguration). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a controlConfiguration and updates it. Returns the server's representation of the controlConfiguration, and an error, if there is any. +func (c *controlConfigurations) Update(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.UpdateOptions) (result *v1beta1.ControlConfiguration, err error) { + result = &v1beta1.ControlConfiguration{} + err = c.client.Put(). + Namespace(c.ns). + Resource("controlconfigurations"). + Name(controlConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(controlConfiguration). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the controlConfiguration and deletes it. Returns an error if one occurs. +func (c *controlConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("controlconfigurations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *controlConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("controlconfigurations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched controlConfiguration. +func (c *controlConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControlConfiguration, err error) { + result = &v1beta1.ControlConfiguration{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("controlconfigurations"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/exception.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/exception.go new file mode 100644 index 000000000..402e63c45 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/exception.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + scheme "github.com/kubescape/storage/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ExceptionsGetter has a method to return a ExceptionInterface. +// A group's client should implement this interface. +type ExceptionsGetter interface { + Exceptions(namespace string) ExceptionInterface +} + +// ExceptionInterface has methods to work with Exception resources. +type ExceptionInterface interface { + Create(ctx context.Context, exception *v1beta1.Exception, opts v1.CreateOptions) (*v1beta1.Exception, error) + Update(ctx context.Context, exception *v1beta1.Exception, opts v1.UpdateOptions) (*v1beta1.Exception, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Exception, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ExceptionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Exception, err error) + ExceptionExpansion +} + +// exceptions implements ExceptionInterface +type exceptions struct { + client rest.Interface + ns string +} + +// newExceptions returns a Exceptions +func newExceptions(c *SpdxV1beta1Client, namespace string) *exceptions { + return &exceptions{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the exception, and returns the corresponding exception object, and an error if there is any. +func (c *exceptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Exception, err error) { + result = &v1beta1.Exception{} + err = c.client.Get(). + Namespace(c.ns). + Resource("exceptions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Exceptions that match those selectors. +func (c *exceptions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ExceptionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ExceptionList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("exceptions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested exceptions. +func (c *exceptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("exceptions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a exception and creates it. Returns the server's representation of the exception, and an error, if there is any. +func (c *exceptions) Create(ctx context.Context, exception *v1beta1.Exception, opts v1.CreateOptions) (result *v1beta1.Exception, err error) { + result = &v1beta1.Exception{} + err = c.client.Post(). + Namespace(c.ns). + Resource("exceptions"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(exception). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a exception and updates it. Returns the server's representation of the exception, and an error, if there is any. +func (c *exceptions) Update(ctx context.Context, exception *v1beta1.Exception, opts v1.UpdateOptions) (result *v1beta1.Exception, err error) { + result = &v1beta1.Exception{} + err = c.client.Put(). + Namespace(c.ns). + Resource("exceptions"). + Name(exception.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(exception). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the exception and deletes it. Returns an error if one occurs. +func (c *exceptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("exceptions"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *exceptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("exceptions"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched exception. +func (c *exceptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Exception, err error) { + result = &v1beta1.Exception{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("exceptions"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_control.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_control.go new file mode 100644 index 000000000..f67f791be --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_control.go @@ -0,0 +1,129 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeControls implements ControlInterface +type FakeControls struct { + Fake *FakeSpdxV1beta1 + ns string +} + +var controlsResource = v1beta1.SchemeGroupVersion.WithResource("controls") + +var controlsKind = v1beta1.SchemeGroupVersion.WithKind("Control") + +// Get takes name of the control, and returns the corresponding control object, and an error if there is any. +func (c *FakeControls) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Control, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(controlsResource, c.ns, name), &v1beta1.Control{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Control), err +} + +// List takes label and field selectors, and returns the list of Controls that match those selectors. +func (c *FakeControls) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControlList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(controlsResource, controlsKind, c.ns, opts), &v1beta1.ControlList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ControlList{ListMeta: obj.(*v1beta1.ControlList).ListMeta} + for _, item := range obj.(*v1beta1.ControlList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested controls. +func (c *FakeControls) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(controlsResource, c.ns, opts)) + +} + +// Create takes the representation of a control and creates it. Returns the server's representation of the control, and an error, if there is any. +func (c *FakeControls) Create(ctx context.Context, control *v1beta1.Control, opts v1.CreateOptions) (result *v1beta1.Control, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(controlsResource, c.ns, control), &v1beta1.Control{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Control), err +} + +// Update takes the representation of a control and updates it. Returns the server's representation of the control, and an error, if there is any. +func (c *FakeControls) Update(ctx context.Context, control *v1beta1.Control, opts v1.UpdateOptions) (result *v1beta1.Control, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(controlsResource, c.ns, control), &v1beta1.Control{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Control), err +} + +// Delete takes name of the control and deletes it. Returns an error if one occurs. +func (c *FakeControls) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(controlsResource, c.ns, name, opts), &v1beta1.Control{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeControls) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controlsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ControlList{}) + return err +} + +// Patch applies the patch and returns the patched control. +func (c *FakeControls) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Control, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controlsResource, c.ns, name, pt, data, subresources...), &v1beta1.Control{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Control), err +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_controlconfiguration.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_controlconfiguration.go new file mode 100644 index 000000000..0d214a648 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_controlconfiguration.go @@ -0,0 +1,129 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeControlConfigurations implements ControlConfigurationInterface +type FakeControlConfigurations struct { + Fake *FakeSpdxV1beta1 + ns string +} + +var controlconfigurationsResource = v1beta1.SchemeGroupVersion.WithResource("controlconfigurations") + +var controlconfigurationsKind = v1beta1.SchemeGroupVersion.WithKind("ControlConfiguration") + +// Get takes name of the controlConfiguration, and returns the corresponding controlConfiguration object, and an error if there is any. +func (c *FakeControlConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControlConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(controlconfigurationsResource, c.ns, name), &v1beta1.ControlConfiguration{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControlConfiguration), err +} + +// List takes label and field selectors, and returns the list of ControlConfigurations that match those selectors. +func (c *FakeControlConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControlConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(controlconfigurationsResource, controlconfigurationsKind, c.ns, opts), &v1beta1.ControlConfigurationList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ControlConfigurationList{ListMeta: obj.(*v1beta1.ControlConfigurationList).ListMeta} + for _, item := range obj.(*v1beta1.ControlConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested controlConfigurations. +func (c *FakeControlConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(controlconfigurationsResource, c.ns, opts)) + +} + +// Create takes the representation of a controlConfiguration and creates it. Returns the server's representation of the controlConfiguration, and an error, if there is any. +func (c *FakeControlConfigurations) Create(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.CreateOptions) (result *v1beta1.ControlConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(controlconfigurationsResource, c.ns, controlConfiguration), &v1beta1.ControlConfiguration{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControlConfiguration), err +} + +// Update takes the representation of a controlConfiguration and updates it. Returns the server's representation of the controlConfiguration, and an error, if there is any. +func (c *FakeControlConfigurations) Update(ctx context.Context, controlConfiguration *v1beta1.ControlConfiguration, opts v1.UpdateOptions) (result *v1beta1.ControlConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(controlconfigurationsResource, c.ns, controlConfiguration), &v1beta1.ControlConfiguration{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControlConfiguration), err +} + +// Delete takes name of the controlConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeControlConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(controlconfigurationsResource, c.ns, name, opts), &v1beta1.ControlConfiguration{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeControlConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controlconfigurationsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ControlConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched controlConfiguration. +func (c *FakeControlConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControlConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controlconfigurationsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControlConfiguration{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControlConfiguration), err +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_exception.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_exception.go new file mode 100644 index 000000000..661345cb4 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_exception.go @@ -0,0 +1,129 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeExceptions implements ExceptionInterface +type FakeExceptions struct { + Fake *FakeSpdxV1beta1 + ns string +} + +var exceptionsResource = v1beta1.SchemeGroupVersion.WithResource("exceptions") + +var exceptionsKind = v1beta1.SchemeGroupVersion.WithKind("Exception") + +// Get takes name of the exception, and returns the corresponding exception object, and an error if there is any. +func (c *FakeExceptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Exception, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(exceptionsResource, c.ns, name), &v1beta1.Exception{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Exception), err +} + +// List takes label and field selectors, and returns the list of Exceptions that match those selectors. +func (c *FakeExceptions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ExceptionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(exceptionsResource, exceptionsKind, c.ns, opts), &v1beta1.ExceptionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ExceptionList{ListMeta: obj.(*v1beta1.ExceptionList).ListMeta} + for _, item := range obj.(*v1beta1.ExceptionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested exceptions. +func (c *FakeExceptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(exceptionsResource, c.ns, opts)) + +} + +// Create takes the representation of a exception and creates it. Returns the server's representation of the exception, and an error, if there is any. +func (c *FakeExceptions) Create(ctx context.Context, exception *v1beta1.Exception, opts v1.CreateOptions) (result *v1beta1.Exception, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(exceptionsResource, c.ns, exception), &v1beta1.Exception{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Exception), err +} + +// Update takes the representation of a exception and updates it. Returns the server's representation of the exception, and an error, if there is any. +func (c *FakeExceptions) Update(ctx context.Context, exception *v1beta1.Exception, opts v1.UpdateOptions) (result *v1beta1.Exception, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(exceptionsResource, c.ns, exception), &v1beta1.Exception{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Exception), err +} + +// Delete takes name of the exception and deletes it. Returns an error if one occurs. +func (c *FakeExceptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(exceptionsResource, c.ns, name, opts), &v1beta1.Exception{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeExceptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(exceptionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ExceptionList{}) + return err +} + +// Patch applies the patch and returns the patched exception. +func (c *FakeExceptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Exception, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(exceptionsResource, c.ns, name, pt, data, subresources...), &v1beta1.Exception{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Exception), err +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_framework.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_framework.go new file mode 100644 index 000000000..e8bdc9c9a --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_framework.go @@ -0,0 +1,129 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeFrameworks implements FrameworkInterface +type FakeFrameworks struct { + Fake *FakeSpdxV1beta1 + ns string +} + +var frameworksResource = v1beta1.SchemeGroupVersion.WithResource("frameworks") + +var frameworksKind = v1beta1.SchemeGroupVersion.WithKind("Framework") + +// Get takes name of the framework, and returns the corresponding framework object, and an error if there is any. +func (c *FakeFrameworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Framework, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(frameworksResource, c.ns, name), &v1beta1.Framework{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Framework), err +} + +// List takes label and field selectors, and returns the list of Frameworks that match those selectors. +func (c *FakeFrameworks) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FrameworkList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(frameworksResource, frameworksKind, c.ns, opts), &v1beta1.FrameworkList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.FrameworkList{ListMeta: obj.(*v1beta1.FrameworkList).ListMeta} + for _, item := range obj.(*v1beta1.FrameworkList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested frameworks. +func (c *FakeFrameworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(frameworksResource, c.ns, opts)) + +} + +// Create takes the representation of a framework and creates it. Returns the server's representation of the framework, and an error, if there is any. +func (c *FakeFrameworks) Create(ctx context.Context, framework *v1beta1.Framework, opts v1.CreateOptions) (result *v1beta1.Framework, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(frameworksResource, c.ns, framework), &v1beta1.Framework{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Framework), err +} + +// Update takes the representation of a framework and updates it. Returns the server's representation of the framework, and an error, if there is any. +func (c *FakeFrameworks) Update(ctx context.Context, framework *v1beta1.Framework, opts v1.UpdateOptions) (result *v1beta1.Framework, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(frameworksResource, c.ns, framework), &v1beta1.Framework{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Framework), err +} + +// Delete takes name of the framework and deletes it. Returns an error if one occurs. +func (c *FakeFrameworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(frameworksResource, c.ns, name, opts), &v1beta1.Framework{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFrameworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(frameworksResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.FrameworkList{}) + return err +} + +// Patch applies the patch and returns the patched framework. +func (c *FakeFrameworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Framework, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(frameworksResource, c.ns, name, pt, data, subresources...), &v1beta1.Framework{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Framework), err +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_rule.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_rule.go new file mode 100644 index 000000000..f2ceda50a --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_rule.go @@ -0,0 +1,129 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeRules implements RuleInterface +type FakeRules struct { + Fake *FakeSpdxV1beta1 + ns string +} + +var rulesResource = v1beta1.SchemeGroupVersion.WithResource("rules") + +var rulesKind = v1beta1.SchemeGroupVersion.WithKind("Rule") + +// Get takes name of the rule, and returns the corresponding rule object, and an error if there is any. +func (c *FakeRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Rule, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rulesResource, c.ns, name), &v1beta1.Rule{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Rule), err +} + +// List takes label and field selectors, and returns the list of Rules that match those selectors. +func (c *FakeRules) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rulesResource, rulesKind, c.ns, opts), &v1beta1.RuleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RuleList{ListMeta: obj.(*v1beta1.RuleList).ListMeta} + for _, item := range obj.(*v1beta1.RuleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested rules. +func (c *FakeRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rulesResource, c.ns, opts)) + +} + +// Create takes the representation of a rule and creates it. Returns the server's representation of the rule, and an error, if there is any. +func (c *FakeRules) Create(ctx context.Context, rule *v1beta1.Rule, opts v1.CreateOptions) (result *v1beta1.Rule, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rulesResource, c.ns, rule), &v1beta1.Rule{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Rule), err +} + +// Update takes the representation of a rule and updates it. Returns the server's representation of the rule, and an error, if there is any. +func (c *FakeRules) Update(ctx context.Context, rule *v1beta1.Rule, opts v1.UpdateOptions) (result *v1beta1.Rule, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rulesResource, c.ns, rule), &v1beta1.Rule{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Rule), err +} + +// Delete takes name of the rule and deletes it. Returns an error if one occurs. +func (c *FakeRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rulesResource, c.ns, name, opts), &v1beta1.Rule{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rulesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.RuleList{}) + return err +} + +// Patch applies the patch and returns the patched rule. +func (c *FakeRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Rule, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rulesResource, c.ns, name, pt, data, subresources...), &v1beta1.Rule{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Rule), err +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go index 28ff7a941..fdada0fcb 100644 --- a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go @@ -44,6 +44,22 @@ func (c *FakeSpdxV1beta1) ConfigurationScanSummaries(namespace string) v1beta1.C return &FakeConfigurationScanSummaries{c, namespace} } +func (c *FakeSpdxV1beta1) Controls(namespace string) v1beta1.ControlInterface { + return &FakeControls{c, namespace} +} + +func (c *FakeSpdxV1beta1) ControlConfigurations(namespace string) v1beta1.ControlConfigurationInterface { + return &FakeControlConfigurations{c, namespace} +} + +func (c *FakeSpdxV1beta1) Exceptions(namespace string) v1beta1.ExceptionInterface { + return &FakeExceptions{c, namespace} +} + +func (c *FakeSpdxV1beta1) Frameworks(namespace string) v1beta1.FrameworkInterface { + return &FakeFrameworks{c, namespace} +} + func (c *FakeSpdxV1beta1) GeneratedNetworkPolicies(namespace string) v1beta1.GeneratedNetworkPolicyInterface { return &FakeGeneratedNetworkPolicies{c, namespace} } @@ -60,6 +76,10 @@ func (c *FakeSpdxV1beta1) OpenVulnerabilityExchangeContainers(namespace string) return &FakeOpenVulnerabilityExchangeContainers{c, namespace} } +func (c *FakeSpdxV1beta1) Rules(namespace string) v1beta1.RuleInterface { + return &FakeRules{c, namespace} +} + func (c *FakeSpdxV1beta1) SBOMSPDXv2p3s(namespace string) v1beta1.SBOMSPDXv2p3Interface { return &FakeSBOMSPDXv2p3s{c, namespace} } diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/framework.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/framework.go new file mode 100644 index 000000000..c9d7a8335 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/framework.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + scheme "github.com/kubescape/storage/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FrameworksGetter has a method to return a FrameworkInterface. +// A group's client should implement this interface. +type FrameworksGetter interface { + Frameworks(namespace string) FrameworkInterface +} + +// FrameworkInterface has methods to work with Framework resources. +type FrameworkInterface interface { + Create(ctx context.Context, framework *v1beta1.Framework, opts v1.CreateOptions) (*v1beta1.Framework, error) + Update(ctx context.Context, framework *v1beta1.Framework, opts v1.UpdateOptions) (*v1beta1.Framework, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Framework, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.FrameworkList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Framework, err error) + FrameworkExpansion +} + +// frameworks implements FrameworkInterface +type frameworks struct { + client rest.Interface + ns string +} + +// newFrameworks returns a Frameworks +func newFrameworks(c *SpdxV1beta1Client, namespace string) *frameworks { + return &frameworks{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the framework, and returns the corresponding framework object, and an error if there is any. +func (c *frameworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Framework, err error) { + result = &v1beta1.Framework{} + err = c.client.Get(). + Namespace(c.ns). + Resource("frameworks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Frameworks that match those selectors. +func (c *frameworks) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FrameworkList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.FrameworkList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("frameworks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested frameworks. +func (c *frameworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("frameworks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a framework and creates it. Returns the server's representation of the framework, and an error, if there is any. +func (c *frameworks) Create(ctx context.Context, framework *v1beta1.Framework, opts v1.CreateOptions) (result *v1beta1.Framework, err error) { + result = &v1beta1.Framework{} + err = c.client.Post(). + Namespace(c.ns). + Resource("frameworks"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(framework). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a framework and updates it. Returns the server's representation of the framework, and an error, if there is any. +func (c *frameworks) Update(ctx context.Context, framework *v1beta1.Framework, opts v1.UpdateOptions) (result *v1beta1.Framework, err error) { + result = &v1beta1.Framework{} + err = c.client.Put(). + Namespace(c.ns). + Resource("frameworks"). + Name(framework.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(framework). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the framework and deletes it. Returns an error if one occurs. +func (c *frameworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("frameworks"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *frameworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("frameworks"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched framework. +func (c *frameworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Framework, err error) { + result = &v1beta1.Framework{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("frameworks"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/generated_expansion.go index 9373eca85..5aca91a8c 100644 --- a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/generated_expansion.go @@ -26,6 +26,14 @@ type ApplicationProfileSummaryExpansion interface{} type ConfigurationScanSummaryExpansion interface{} +type ControlExpansion interface{} + +type ControlConfigurationExpansion interface{} + +type ExceptionExpansion interface{} + +type FrameworkExpansion interface{} + type GeneratedNetworkPolicyExpansion interface{} type KnownServerExpansion interface{} @@ -34,6 +42,8 @@ type NetworkNeighborsExpansion interface{} type OpenVulnerabilityExchangeContainerExpansion interface{} +type RuleExpansion interface{} + type SBOMSPDXv2p3Expansion interface{} type SBOMSPDXv2p3FilteredExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/rule.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/rule.go new file mode 100644 index 000000000..4a8542f4d --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/rule.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + scheme "github.com/kubescape/storage/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RulesGetter has a method to return a RuleInterface. +// A group's client should implement this interface. +type RulesGetter interface { + Rules(namespace string) RuleInterface +} + +// RuleInterface has methods to work with Rule resources. +type RuleInterface interface { + Create(ctx context.Context, rule *v1beta1.Rule, opts v1.CreateOptions) (*v1beta1.Rule, error) + Update(ctx context.Context, rule *v1beta1.Rule, opts v1.UpdateOptions) (*v1beta1.Rule, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Rule, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RuleList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Rule, err error) + RuleExpansion +} + +// rules implements RuleInterface +type rules struct { + client rest.Interface + ns string +} + +// newRules returns a Rules +func newRules(c *SpdxV1beta1Client, namespace string) *rules { + return &rules{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the rule, and returns the corresponding rule object, and an error if there is any. +func (c *rules) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Rule, err error) { + result = &v1beta1.Rule{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rules"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Rules that match those selectors. +func (c *rules) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuleList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.RuleList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rules"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested rules. +func (c *rules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("rules"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a rule and creates it. Returns the server's representation of the rule, and an error, if there is any. +func (c *rules) Create(ctx context.Context, rule *v1beta1.Rule, opts v1.CreateOptions) (result *v1beta1.Rule, err error) { + result = &v1beta1.Rule{} + err = c.client.Post(). + Namespace(c.ns). + Resource("rules"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rule). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a rule and updates it. Returns the server's representation of the rule, and an error, if there is any. +func (c *rules) Update(ctx context.Context, rule *v1beta1.Rule, opts v1.UpdateOptions) (result *v1beta1.Rule, err error) { + result = &v1beta1.Rule{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rules"). + Name(rule.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rule). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the rule and deletes it. Returns an error if one occurs. +func (c *rules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rules"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *rules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("rules"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched rule. +func (c *rules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Rule, err error) { + result = &v1beta1.Rule{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rules"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/softwarecomposition_client.go b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/softwarecomposition_client.go index 0f198e6f4..392e45095 100644 --- a/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/softwarecomposition_client.go +++ b/pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/softwarecomposition_client.go @@ -32,10 +32,15 @@ type SpdxV1beta1Interface interface { ApplicationProfilesGetter ApplicationProfileSummariesGetter ConfigurationScanSummariesGetter + ControlsGetter + ControlConfigurationsGetter + ExceptionsGetter + FrameworksGetter GeneratedNetworkPoliciesGetter KnownServersGetter NetworkNeighborsesGetter OpenVulnerabilityExchangeContainersGetter + RulesGetter SBOMSPDXv2p3sGetter SBOMSPDXv2p3FilteredsGetter SBOMSummariesGetter @@ -69,6 +74,22 @@ func (c *SpdxV1beta1Client) ConfigurationScanSummaries(namespace string) Configu return newConfigurationScanSummaries(c, namespace) } +func (c *SpdxV1beta1Client) Controls(namespace string) ControlInterface { + return newControls(c, namespace) +} + +func (c *SpdxV1beta1Client) ControlConfigurations(namespace string) ControlConfigurationInterface { + return newControlConfigurations(c, namespace) +} + +func (c *SpdxV1beta1Client) Exceptions(namespace string) ExceptionInterface { + return newExceptions(c, namespace) +} + +func (c *SpdxV1beta1Client) Frameworks(namespace string) FrameworkInterface { + return newFrameworks(c, namespace) +} + func (c *SpdxV1beta1Client) GeneratedNetworkPolicies(namespace string) GeneratedNetworkPolicyInterface { return newGeneratedNetworkPolicies(c, namespace) } @@ -85,6 +106,10 @@ func (c *SpdxV1beta1Client) OpenVulnerabilityExchangeContainers(namespace string return newOpenVulnerabilityExchangeContainers(c, namespace) } +func (c *SpdxV1beta1Client) Rules(namespace string) RuleInterface { + return newRules(c, namespace) +} + func (c *SpdxV1beta1Client) SBOMSPDXv2p3s(namespace string) SBOMSPDXv2p3Interface { return newSBOMSPDXv2p3s(c, namespace) } diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index 332a2e9db..b24fccd62 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -61,6 +61,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().ApplicationProfileSummaries().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("configurationscansummaries"): return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().ConfigurationScanSummaries().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("controls"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().Controls().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("controlconfigurations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().ControlConfigurations().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("exceptions"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().Exceptions().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("frameworks"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().Frameworks().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("generatednetworkpolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().GeneratedNetworkPolicies().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("knownservers"): @@ -69,6 +77,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().NetworkNeighborses().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("openvulnerabilityexchangecontainers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().OpenVulnerabilityExchangeContainers().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("rules"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().Rules().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("sbomspdxv2p3s"): return &genericInformer{resource: resource.GroupResource(), informer: f.Spdx().V1beta1().SBOMSPDXv2p3s().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("sbomspdxv2p3filtereds"): diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/control.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/control.go new file mode 100644 index 000000000..f91b62517 --- /dev/null +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/control.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + softwarecompositionv1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + versioned "github.com/kubescape/storage/pkg/generated/clientset/versioned" + internalinterfaces "github.com/kubescape/storage/pkg/generated/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubescape/storage/pkg/generated/listers/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ControlInformer provides access to a shared informer and lister for +// Controls. +type ControlInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ControlLister +} + +type controlInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewControlInformer constructs a new informer for Control type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewControlInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredControlInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredControlInformer constructs a new informer for Control type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredControlInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Controls(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Controls(namespace).Watch(context.TODO(), options) + }, + }, + &softwarecompositionv1beta1.Control{}, + resyncPeriod, + indexers, + ) +} + +func (f *controlInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredControlInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *controlInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&softwarecompositionv1beta1.Control{}, f.defaultInformer) +} + +func (f *controlInformer) Lister() v1beta1.ControlLister { + return v1beta1.NewControlLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/controlconfiguration.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/controlconfiguration.go new file mode 100644 index 000000000..a365a9fbe --- /dev/null +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/controlconfiguration.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + softwarecompositionv1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + versioned "github.com/kubescape/storage/pkg/generated/clientset/versioned" + internalinterfaces "github.com/kubescape/storage/pkg/generated/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubescape/storage/pkg/generated/listers/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ControlConfigurationInformer provides access to a shared informer and lister for +// ControlConfigurations. +type ControlConfigurationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ControlConfigurationLister +} + +type controlConfigurationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewControlConfigurationInformer constructs a new informer for ControlConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewControlConfigurationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredControlConfigurationInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredControlConfigurationInformer constructs a new informer for ControlConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredControlConfigurationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().ControlConfigurations(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().ControlConfigurations(namespace).Watch(context.TODO(), options) + }, + }, + &softwarecompositionv1beta1.ControlConfiguration{}, + resyncPeriod, + indexers, + ) +} + +func (f *controlConfigurationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredControlConfigurationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *controlConfigurationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&softwarecompositionv1beta1.ControlConfiguration{}, f.defaultInformer) +} + +func (f *controlConfigurationInformer) Lister() v1beta1.ControlConfigurationLister { + return v1beta1.NewControlConfigurationLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/exception.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/exception.go new file mode 100644 index 000000000..afa7974c4 --- /dev/null +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/exception.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + softwarecompositionv1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + versioned "github.com/kubescape/storage/pkg/generated/clientset/versioned" + internalinterfaces "github.com/kubescape/storage/pkg/generated/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubescape/storage/pkg/generated/listers/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ExceptionInformer provides access to a shared informer and lister for +// Exceptions. +type ExceptionInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ExceptionLister +} + +type exceptionInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewExceptionInformer constructs a new informer for Exception type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewExceptionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredExceptionInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredExceptionInformer constructs a new informer for Exception type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredExceptionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Exceptions(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Exceptions(namespace).Watch(context.TODO(), options) + }, + }, + &softwarecompositionv1beta1.Exception{}, + resyncPeriod, + indexers, + ) +} + +func (f *exceptionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredExceptionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *exceptionInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&softwarecompositionv1beta1.Exception{}, f.defaultInformer) +} + +func (f *exceptionInformer) Lister() v1beta1.ExceptionLister { + return v1beta1.NewExceptionLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/framework.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/framework.go new file mode 100644 index 000000000..42a44217b --- /dev/null +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/framework.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + softwarecompositionv1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + versioned "github.com/kubescape/storage/pkg/generated/clientset/versioned" + internalinterfaces "github.com/kubescape/storage/pkg/generated/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubescape/storage/pkg/generated/listers/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// FrameworkInformer provides access to a shared informer and lister for +// Frameworks. +type FrameworkInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.FrameworkLister +} + +type frameworkInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewFrameworkInformer constructs a new informer for Framework type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFrameworkInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredFrameworkInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredFrameworkInformer constructs a new informer for Framework type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredFrameworkInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Frameworks(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Frameworks(namespace).Watch(context.TODO(), options) + }, + }, + &softwarecompositionv1beta1.Framework{}, + resyncPeriod, + indexers, + ) +} + +func (f *frameworkInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredFrameworkInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *frameworkInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&softwarecompositionv1beta1.Framework{}, f.defaultInformer) +} + +func (f *frameworkInformer) Lister() v1beta1.FrameworkLister { + return v1beta1.NewFrameworkLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go index 9300b1e4e..26fef7706 100644 --- a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go @@ -32,6 +32,14 @@ type Interface interface { ApplicationProfileSummaries() ApplicationProfileSummaryInformer // ConfigurationScanSummaries returns a ConfigurationScanSummaryInformer. ConfigurationScanSummaries() ConfigurationScanSummaryInformer + // Controls returns a ControlInformer. + Controls() ControlInformer + // ControlConfigurations returns a ControlConfigurationInformer. + ControlConfigurations() ControlConfigurationInformer + // Exceptions returns a ExceptionInformer. + Exceptions() ExceptionInformer + // Frameworks returns a FrameworkInformer. + Frameworks() FrameworkInformer // GeneratedNetworkPolicies returns a GeneratedNetworkPolicyInformer. GeneratedNetworkPolicies() GeneratedNetworkPolicyInformer // KnownServers returns a KnownServerInformer. @@ -40,6 +48,8 @@ type Interface interface { NetworkNeighborses() NetworkNeighborsInformer // OpenVulnerabilityExchangeContainers returns a OpenVulnerabilityExchangeContainerInformer. OpenVulnerabilityExchangeContainers() OpenVulnerabilityExchangeContainerInformer + // Rules returns a RuleInformer. + Rules() RuleInformer // SBOMSPDXv2p3s returns a SBOMSPDXv2p3Informer. SBOMSPDXv2p3s() SBOMSPDXv2p3Informer // SBOMSPDXv2p3Filtereds returns a SBOMSPDXv2p3FilteredInformer. @@ -93,6 +103,26 @@ func (v *version) ConfigurationScanSummaries() ConfigurationScanSummaryInformer return &configurationScanSummaryInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// Controls returns a ControlInformer. +func (v *version) Controls() ControlInformer { + return &controlInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// ControlConfigurations returns a ControlConfigurationInformer. +func (v *version) ControlConfigurations() ControlConfigurationInformer { + return &controlConfigurationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Exceptions returns a ExceptionInformer. +func (v *version) Exceptions() ExceptionInformer { + return &exceptionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Frameworks returns a FrameworkInformer. +func (v *version) Frameworks() FrameworkInformer { + return &frameworkInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // GeneratedNetworkPolicies returns a GeneratedNetworkPolicyInformer. func (v *version) GeneratedNetworkPolicies() GeneratedNetworkPolicyInformer { return &generatedNetworkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -113,6 +143,11 @@ func (v *version) OpenVulnerabilityExchangeContainers() OpenVulnerabilityExchang return &openVulnerabilityExchangeContainerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// Rules returns a RuleInformer. +func (v *version) Rules() RuleInformer { + return &ruleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // SBOMSPDXv2p3s returns a SBOMSPDXv2p3Informer. func (v *version) SBOMSPDXv2p3s() SBOMSPDXv2p3Informer { return &sBOMSPDXv2p3Informer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/rule.go b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/rule.go new file mode 100644 index 000000000..5d0a91f3d --- /dev/null +++ b/pkg/generated/informers/externalversions/softwarecomposition/v1beta1/rule.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + softwarecompositionv1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + versioned "github.com/kubescape/storage/pkg/generated/clientset/versioned" + internalinterfaces "github.com/kubescape/storage/pkg/generated/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubescape/storage/pkg/generated/listers/softwarecomposition/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// RuleInformer provides access to a shared informer and lister for +// Rules. +type RuleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.RuleLister +} + +type ruleInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewRuleInformer constructs a new informer for Rule type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredRuleInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredRuleInformer constructs a new informer for Rule type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Rules(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SpdxV1beta1().Rules(namespace).Watch(context.TODO(), options) + }, + }, + &softwarecompositionv1beta1.Rule{}, + resyncPeriod, + indexers, + ) +} + +func (f *ruleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredRuleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *ruleInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&softwarecompositionv1beta1.Rule{}, f.defaultInformer) +} + +func (f *ruleInformer) Lister() v1beta1.RuleLister { + return v1beta1.NewRuleLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/control.go b/pkg/generated/listers/softwarecomposition/v1beta1/control.go new file mode 100644 index 000000000..c19c51cbd --- /dev/null +++ b/pkg/generated/listers/softwarecomposition/v1beta1/control.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControlLister helps list Controls. +// All objects returned here must be treated as read-only. +type ControlLister interface { + // List lists all Controls in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Control, err error) + // Controls returns an object that can list and get Controls. + Controls(namespace string) ControlNamespaceLister + ControlListerExpansion +} + +// controlLister implements the ControlLister interface. +type controlLister struct { + indexer cache.Indexer +} + +// NewControlLister returns a new ControlLister. +func NewControlLister(indexer cache.Indexer) ControlLister { + return &controlLister{indexer: indexer} +} + +// List lists all Controls in the indexer. +func (s *controlLister) List(selector labels.Selector) (ret []*v1beta1.Control, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Control)) + }) + return ret, err +} + +// Controls returns an object that can list and get Controls. +func (s *controlLister) Controls(namespace string) ControlNamespaceLister { + return controlNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ControlNamespaceLister helps list and get Controls. +// All objects returned here must be treated as read-only. +type ControlNamespaceLister interface { + // List lists all Controls in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Control, err error) + // Get retrieves the Control from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Control, error) + ControlNamespaceListerExpansion +} + +// controlNamespaceLister implements the ControlNamespaceLister +// interface. +type controlNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Controls in the indexer for a given namespace. +func (s controlNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Control, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Control)) + }) + return ret, err +} + +// Get retrieves the Control from the indexer for a given namespace and name. +func (s controlNamespaceLister) Get(name string) (*v1beta1.Control, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("control"), name) + } + return obj.(*v1beta1.Control), nil +} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/controlconfiguration.go b/pkg/generated/listers/softwarecomposition/v1beta1/controlconfiguration.go new file mode 100644 index 000000000..d84bce3c9 --- /dev/null +++ b/pkg/generated/listers/softwarecomposition/v1beta1/controlconfiguration.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControlConfigurationLister helps list ControlConfigurations. +// All objects returned here must be treated as read-only. +type ControlConfigurationLister interface { + // List lists all ControlConfigurations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.ControlConfiguration, err error) + // ControlConfigurations returns an object that can list and get ControlConfigurations. + ControlConfigurations(namespace string) ControlConfigurationNamespaceLister + ControlConfigurationListerExpansion +} + +// controlConfigurationLister implements the ControlConfigurationLister interface. +type controlConfigurationLister struct { + indexer cache.Indexer +} + +// NewControlConfigurationLister returns a new ControlConfigurationLister. +func NewControlConfigurationLister(indexer cache.Indexer) ControlConfigurationLister { + return &controlConfigurationLister{indexer: indexer} +} + +// List lists all ControlConfigurations in the indexer. +func (s *controlConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.ControlConfiguration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControlConfiguration)) + }) + return ret, err +} + +// ControlConfigurations returns an object that can list and get ControlConfigurations. +func (s *controlConfigurationLister) ControlConfigurations(namespace string) ControlConfigurationNamespaceLister { + return controlConfigurationNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ControlConfigurationNamespaceLister helps list and get ControlConfigurations. +// All objects returned here must be treated as read-only. +type ControlConfigurationNamespaceLister interface { + // List lists all ControlConfigurations in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.ControlConfiguration, err error) + // Get retrieves the ControlConfiguration from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.ControlConfiguration, error) + ControlConfigurationNamespaceListerExpansion +} + +// controlConfigurationNamespaceLister implements the ControlConfigurationNamespaceLister +// interface. +type controlConfigurationNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ControlConfigurations in the indexer for a given namespace. +func (s controlConfigurationNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ControlConfiguration, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControlConfiguration)) + }) + return ret, err +} + +// Get retrieves the ControlConfiguration from the indexer for a given namespace and name. +func (s controlConfigurationNamespaceLister) Get(name string) (*v1beta1.ControlConfiguration, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("controlconfiguration"), name) + } + return obj.(*v1beta1.ControlConfiguration), nil +} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/exception.go b/pkg/generated/listers/softwarecomposition/v1beta1/exception.go new file mode 100644 index 000000000..06c687eb3 --- /dev/null +++ b/pkg/generated/listers/softwarecomposition/v1beta1/exception.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ExceptionLister helps list Exceptions. +// All objects returned here must be treated as read-only. +type ExceptionLister interface { + // List lists all Exceptions in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Exception, err error) + // Exceptions returns an object that can list and get Exceptions. + Exceptions(namespace string) ExceptionNamespaceLister + ExceptionListerExpansion +} + +// exceptionLister implements the ExceptionLister interface. +type exceptionLister struct { + indexer cache.Indexer +} + +// NewExceptionLister returns a new ExceptionLister. +func NewExceptionLister(indexer cache.Indexer) ExceptionLister { + return &exceptionLister{indexer: indexer} +} + +// List lists all Exceptions in the indexer. +func (s *exceptionLister) List(selector labels.Selector) (ret []*v1beta1.Exception, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Exception)) + }) + return ret, err +} + +// Exceptions returns an object that can list and get Exceptions. +func (s *exceptionLister) Exceptions(namespace string) ExceptionNamespaceLister { + return exceptionNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ExceptionNamespaceLister helps list and get Exceptions. +// All objects returned here must be treated as read-only. +type ExceptionNamespaceLister interface { + // List lists all Exceptions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Exception, err error) + // Get retrieves the Exception from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Exception, error) + ExceptionNamespaceListerExpansion +} + +// exceptionNamespaceLister implements the ExceptionNamespaceLister +// interface. +type exceptionNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Exceptions in the indexer for a given namespace. +func (s exceptionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Exception, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Exception)) + }) + return ret, err +} + +// Get retrieves the Exception from the indexer for a given namespace and name. +func (s exceptionNamespaceLister) Get(name string) (*v1beta1.Exception, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("exception"), name) + } + return obj.(*v1beta1.Exception), nil +} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/expansion_generated.go b/pkg/generated/listers/softwarecomposition/v1beta1/expansion_generated.go index 7c5ea9d02..5406e9910 100644 --- a/pkg/generated/listers/softwarecomposition/v1beta1/expansion_generated.go +++ b/pkg/generated/listers/softwarecomposition/v1beta1/expansion_generated.go @@ -50,6 +50,38 @@ type ConfigurationScanSummaryListerExpansion interface{} // ConfigurationScanSummaryNamespaceLister. type ConfigurationScanSummaryNamespaceListerExpansion interface{} +// ControlListerExpansion allows custom methods to be added to +// ControlLister. +type ControlListerExpansion interface{} + +// ControlNamespaceListerExpansion allows custom methods to be added to +// ControlNamespaceLister. +type ControlNamespaceListerExpansion interface{} + +// ControlConfigurationListerExpansion allows custom methods to be added to +// ControlConfigurationLister. +type ControlConfigurationListerExpansion interface{} + +// ControlConfigurationNamespaceListerExpansion allows custom methods to be added to +// ControlConfigurationNamespaceLister. +type ControlConfigurationNamespaceListerExpansion interface{} + +// ExceptionListerExpansion allows custom methods to be added to +// ExceptionLister. +type ExceptionListerExpansion interface{} + +// ExceptionNamespaceListerExpansion allows custom methods to be added to +// ExceptionNamespaceLister. +type ExceptionNamespaceListerExpansion interface{} + +// FrameworkListerExpansion allows custom methods to be added to +// FrameworkLister. +type FrameworkListerExpansion interface{} + +// FrameworkNamespaceListerExpansion allows custom methods to be added to +// FrameworkNamespaceLister. +type FrameworkNamespaceListerExpansion interface{} + // GeneratedNetworkPolicyListerExpansion allows custom methods to be added to // GeneratedNetworkPolicyLister. type GeneratedNetworkPolicyListerExpansion interface{} @@ -82,6 +114,14 @@ type OpenVulnerabilityExchangeContainerListerExpansion interface{} // OpenVulnerabilityExchangeContainerNamespaceLister. type OpenVulnerabilityExchangeContainerNamespaceListerExpansion interface{} +// RuleListerExpansion allows custom methods to be added to +// RuleLister. +type RuleListerExpansion interface{} + +// RuleNamespaceListerExpansion allows custom methods to be added to +// RuleNamespaceLister. +type RuleNamespaceListerExpansion interface{} + // SBOMSPDXv2p3ListerExpansion allows custom methods to be added to // SBOMSPDXv2p3Lister. type SBOMSPDXv2p3ListerExpansion interface{} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/framework.go b/pkg/generated/listers/softwarecomposition/v1beta1/framework.go new file mode 100644 index 000000000..9f9be25e9 --- /dev/null +++ b/pkg/generated/listers/softwarecomposition/v1beta1/framework.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// FrameworkLister helps list Frameworks. +// All objects returned here must be treated as read-only. +type FrameworkLister interface { + // List lists all Frameworks in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Framework, err error) + // Frameworks returns an object that can list and get Frameworks. + Frameworks(namespace string) FrameworkNamespaceLister + FrameworkListerExpansion +} + +// frameworkLister implements the FrameworkLister interface. +type frameworkLister struct { + indexer cache.Indexer +} + +// NewFrameworkLister returns a new FrameworkLister. +func NewFrameworkLister(indexer cache.Indexer) FrameworkLister { + return &frameworkLister{indexer: indexer} +} + +// List lists all Frameworks in the indexer. +func (s *frameworkLister) List(selector labels.Selector) (ret []*v1beta1.Framework, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Framework)) + }) + return ret, err +} + +// Frameworks returns an object that can list and get Frameworks. +func (s *frameworkLister) Frameworks(namespace string) FrameworkNamespaceLister { + return frameworkNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// FrameworkNamespaceLister helps list and get Frameworks. +// All objects returned here must be treated as read-only. +type FrameworkNamespaceLister interface { + // List lists all Frameworks in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Framework, err error) + // Get retrieves the Framework from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Framework, error) + FrameworkNamespaceListerExpansion +} + +// frameworkNamespaceLister implements the FrameworkNamespaceLister +// interface. +type frameworkNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Frameworks in the indexer for a given namespace. +func (s frameworkNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Framework, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Framework)) + }) + return ret, err +} + +// Get retrieves the Framework from the indexer for a given namespace and name. +func (s frameworkNamespaceLister) Get(name string) (*v1beta1.Framework, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("framework"), name) + } + return obj.(*v1beta1.Framework), nil +} diff --git a/pkg/generated/listers/softwarecomposition/v1beta1/rule.go b/pkg/generated/listers/softwarecomposition/v1beta1/rule.go new file mode 100644 index 000000000..76d40c0d8 --- /dev/null +++ b/pkg/generated/listers/softwarecomposition/v1beta1/rule.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// RuleLister helps list Rules. +// All objects returned here must be treated as read-only. +type RuleLister interface { + // List lists all Rules in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Rule, err error) + // Rules returns an object that can list and get Rules. + Rules(namespace string) RuleNamespaceLister + RuleListerExpansion +} + +// ruleLister implements the RuleLister interface. +type ruleLister struct { + indexer cache.Indexer +} + +// NewRuleLister returns a new RuleLister. +func NewRuleLister(indexer cache.Indexer) RuleLister { + return &ruleLister{indexer: indexer} +} + +// List lists all Rules in the indexer. +func (s *ruleLister) List(selector labels.Selector) (ret []*v1beta1.Rule, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Rule)) + }) + return ret, err +} + +// Rules returns an object that can list and get Rules. +func (s *ruleLister) Rules(namespace string) RuleNamespaceLister { + return ruleNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RuleNamespaceLister helps list and get Rules. +// All objects returned here must be treated as read-only. +type RuleNamespaceLister interface { + // List lists all Rules in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Rule, err error) + // Get retrieves the Rule from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Rule, error) + RuleNamespaceListerExpansion +} + +// ruleNamespaceLister implements the RuleNamespaceLister +// interface. +type ruleNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Rules in the indexer for a given namespace. +func (s ruleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Rule, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Rule)) + }) + return ret, err +} + +// Get retrieves the Rule from the indexer for a given namespace and name. +func (s ruleNamespaceLister) Get(name string) (*v1beta1.Rule, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("rule"), name) + } + return obj.(*v1beta1.Rule), nil +} diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index efcd25ea5..c647f0b49 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -51,6 +51,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ConfigurationScanSummary": schema_pkg_apis_softwarecomposition_v1beta1_ConfigurationScanSummary(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ConfigurationScanSummaryList": schema_pkg_apis_softwarecomposition_v1beta1_ConfigurationScanSummaryList(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ConfigurationScanSummarySpec": schema_pkg_apis_softwarecomposition_v1beta1_ConfigurationScanSummarySpec(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Control": schema_pkg_apis_softwarecomposition_v1beta1_Control(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlConfiguration": schema_pkg_apis_softwarecomposition_v1beta1_ControlConfiguration(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlConfigurationList": schema_pkg_apis_softwarecomposition_v1beta1_ControlConfigurationList(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlList": schema_pkg_apis_softwarecomposition_v1beta1_ControlList(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlRuleRef": schema_pkg_apis_softwarecomposition_v1beta1_ControlRuleRef(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlSeverity": schema_pkg_apis_softwarecomposition_v1beta1_ControlSeverity(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Coordinates": schema_pkg_apis_softwarecomposition_v1beta1_Coordinates(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.CreationInfo": schema_pkg_apis_softwarecomposition_v1beta1_CreationInfo(ref), @@ -62,6 +67,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Distribution": schema_pkg_apis_softwarecomposition_v1beta1_Distribution(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.DocElementID": schema_pkg_apis_softwarecomposition_v1beta1_DocElementID(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Document": schema_pkg_apis_softwarecomposition_v1beta1_Document(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Exception": schema_pkg_apis_softwarecomposition_v1beta1_Exception(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ExceptionList": schema_pkg_apis_softwarecomposition_v1beta1_ExceptionList(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ExecCalls": schema_pkg_apis_softwarecomposition_v1beta1_ExecCalls(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ExternalDocumentRef": schema_pkg_apis_softwarecomposition_v1beta1_ExternalDocumentRef(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.File": schema_pkg_apis_softwarecomposition_v1beta1_File(ref), @@ -69,6 +76,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FileLicenseEvidence": schema_pkg_apis_softwarecomposition_v1beta1_FileLicenseEvidence(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FileMetadataEntry": schema_pkg_apis_softwarecomposition_v1beta1_FileMetadataEntry(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Fix": schema_pkg_apis_softwarecomposition_v1beta1_Fix(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Framework": schema_pkg_apis_softwarecomposition_v1beta1_Framework(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FrameworkControlRef": schema_pkg_apis_softwarecomposition_v1beta1_FrameworkControlRef(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FrameworkList": schema_pkg_apis_softwarecomposition_v1beta1_FrameworkList(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.GeneratedNetworkPolicy": schema_pkg_apis_softwarecomposition_v1beta1_GeneratedNetworkPolicy(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.GeneratedNetworkPolicyList": schema_pkg_apis_softwarecomposition_v1beta1_GeneratedNetworkPolicyList(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.GrypeDocument": schema_pkg_apis_softwarecomposition_v1beta1_GrypeDocument(ref), @@ -134,6 +144,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Relationship": schema_pkg_apis_softwarecomposition_v1beta1_Relationship(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ReportMeta": schema_pkg_apis_softwarecomposition_v1beta1_ReportMeta(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Review": schema_pkg_apis_softwarecomposition_v1beta1_Review(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Rule": schema_pkg_apis_softwarecomposition_v1beta1_Rule(ref), + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.RuleList": schema_pkg_apis_softwarecomposition_v1beta1_RuleList(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.RulePath": schema_pkg_apis_softwarecomposition_v1beta1_RulePath(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.RuleStatus": schema_pkg_apis_softwarecomposition_v1beta1_RuleStatus(ref), "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.SBOMSPDXv2p3": schema_pkg_apis_softwarecomposition_v1beta1_SBOMSPDXv2p3(ref), @@ -1044,6 +1056,223 @@ func schema_pkg_apis_softwarecomposition_v1beta1_ConfigurationScanSummarySpec(re } } +func schema_pkg_apis_softwarecomposition_v1beta1_Control(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rulesRef": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlRuleRef"), + }, + }, + }, + }, + }, + "payload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlRuleRef", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_ControlConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "payload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_ControlConfigurationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlConfiguration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.ControlConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_ControlList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Control"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Control", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_ControlRuleRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_softwarecomposition_v1beta1_ControlSeverity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1586,6 +1815,93 @@ func schema_pkg_apis_softwarecomposition_v1beta1_Document(ref common.ReferenceCa } } +func schema_pkg_apis_softwarecomposition_v1beta1_Exception(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "payload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_ExceptionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Exception"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Exception", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_pkg_apis_softwarecomposition_v1beta1_ExecCalls(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -2028,6 +2344,142 @@ func schema_pkg_apis_softwarecomposition_v1beta1_Fix(ref common.ReferenceCallbac } } +func schema_pkg_apis_softwarecomposition_v1beta1_Framework(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "controlsRef": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FrameworkControlRef"), + }, + }, + }, + }, + }, + "payload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.FrameworkControlRef", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_FrameworkControlRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "controlID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_FrameworkList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Framework"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Framework", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_pkg_apis_softwarecomposition_v1beta1_GeneratedNetworkPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -5184,6 +5636,99 @@ func schema_pkg_apis_softwarecomposition_v1beta1_Review(ref common.ReferenceCall } } +func schema_pkg_apis_softwarecomposition_v1beta1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "rego": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "payload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_pkg_apis_softwarecomposition_v1beta1_RuleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Rule"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1.Rule", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_pkg_apis_softwarecomposition_v1beta1_RulePath(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{