Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci_configuration/sast')
-rw-r--r--app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb23
-rw-r--r--app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb28
-rw-r--r--app/graphql/types/ci_configuration/sast/entity_input_type.rb22
-rw-r--r--app/graphql/types/ci_configuration/sast/entity_type.rb37
-rw-r--r--app/graphql/types/ci_configuration/sast/input_type.rb24
-rw-r--r--app/graphql/types/ci_configuration/sast/options_entity_type.rb19
-rw-r--r--app/graphql/types/ci_configuration/sast/type.rb22
-rw-r--r--app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb16
8 files changed, 191 insertions, 0 deletions
diff --git a/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb b/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb
new file mode 100644
index 00000000000..9835a7ef208
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class AnalyzersEntityInputType < BaseInputObject
+ graphql_name 'SastCiConfigurationAnalyzersEntityInput'
+ description 'Represents the analyzers entity in SAST CI configuration'
+
+ argument :name, GraphQL::STRING_TYPE, required: true,
+ description: 'Name of analyzer.'
+
+ argument :enabled, GraphQL::BOOLEAN_TYPE, required: true,
+ description: 'State of the analyzer.'
+
+ argument :variables, [::Types::CiConfiguration::Sast::EntityInputType],
+ description: 'List of variables for the analyzer.',
+ required: false
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb
new file mode 100644
index 00000000000..3c6202ca7e0
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class AnalyzersEntityType < BaseObject
+ graphql_name 'SastCiConfigurationAnalyzersEntity'
+ description 'Represents an analyzer entity in SAST CI configuration'
+
+ field :name, GraphQL::STRING_TYPE, null: true,
+ description: 'Name of the analyzer.'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Analyzer label used in the config UI.'
+
+ field :enabled, GraphQL::BOOLEAN_TYPE, null: true,
+ description: 'Indicates whether an analyzer is enabled.'
+
+ field :description, GraphQL::STRING_TYPE, null: true,
+ description: 'Analyzer description that is displayed on the form.'
+
+ field :variables, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true,
+ description: 'List of supported variables.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/entity_input_type.rb b/app/graphql/types/ci_configuration/sast/entity_input_type.rb
new file mode 100644
index 00000000000..39b3efb3db8
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/entity_input_type.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class EntityInputType < BaseInputObject
+ graphql_name 'SastCiConfigurationEntityInput'
+ description 'Represents an entity in SAST CI configuration'
+
+ argument :field, GraphQL::STRING_TYPE, required: true,
+ description: 'CI keyword of entity.'
+
+ argument :default_value, GraphQL::STRING_TYPE, required: true,
+ description: 'Default value that is used if value is empty.'
+
+ argument :value, GraphQL::STRING_TYPE, required: true,
+ description: 'Current value of the entity.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/entity_type.rb b/app/graphql/types/ci_configuration/sast/entity_type.rb
new file mode 100644
index 00000000000..eeb9025391f
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/entity_type.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class EntityType < BaseObject
+ graphql_name 'SastCiConfigurationEntity'
+ description 'Represents an entity in SAST CI configuration'
+
+ field :field, GraphQL::STRING_TYPE, null: true,
+ description: 'CI keyword of entity.'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Label for entity used in the form.'
+
+ field :type, GraphQL::STRING_TYPE, null: true,
+ description: 'Type of the field value.'
+
+ field :options, ::Types::CiConfiguration::Sast::OptionsEntityType.connection_type, null: true,
+ description: 'Different possible values of the field.'
+
+ field :default_value, GraphQL::STRING_TYPE, null: true,
+ description: 'Default value that is used if value is empty.'
+
+ field :description, GraphQL::STRING_TYPE, null: true,
+ description: 'Entity description that is displayed on the form.'
+
+ field :value, GraphQL::STRING_TYPE, null: true,
+ description: 'Current value of the entity.'
+
+ field :size, ::Types::CiConfiguration::Sast::UiComponentSizeEnum, null: true,
+ description: 'Size of the UI component.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/input_type.rb b/app/graphql/types/ci_configuration/sast/input_type.rb
new file mode 100644
index 00000000000..615436683f6
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/input_type.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ class InputType < BaseInputObject # rubocop:disable Graphql/AuthorizeTypes
+ graphql_name 'SastCiConfigurationInput'
+ description 'Represents a CI configuration of SAST'
+
+ argument :global, [::Types::CiConfiguration::Sast::EntityInputType],
+ description: 'List of global entities related to SAST configuration.',
+ required: false
+
+ argument :pipeline, [::Types::CiConfiguration::Sast::EntityInputType],
+ description: 'List of pipeline entities related to SAST configuration.',
+ required: false
+
+ argument :analyzers, [::Types::CiConfiguration::Sast::AnalyzersEntityInputType],
+ description: 'List of analyzers and related variables for the SAST configuration.',
+ required: false
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/options_entity_type.rb b/app/graphql/types/ci_configuration/sast/options_entity_type.rb
new file mode 100644
index 00000000000..86d104a7fda
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/options_entity_type.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class OptionsEntityType < BaseObject
+ graphql_name 'SastCiConfigurationOptionsEntity'
+ description 'Represents an entity for options in SAST CI configuration'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Label of option entity.'
+
+ field :value, GraphQL::STRING_TYPE, null: true,
+ description: 'Value of option entity.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/type.rb b/app/graphql/types/ci_configuration/sast/type.rb
new file mode 100644
index 00000000000..35d11584ac7
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/type.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class Type < BaseObject
+ graphql_name 'SastCiConfiguration'
+ description 'Represents a CI configuration of SAST'
+
+ field :global, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true,
+ description: 'List of global entities related to SAST configuration.'
+
+ field :pipeline, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true,
+ description: 'List of pipeline entities related to SAST configuration.'
+
+ field :analyzers, ::Types::CiConfiguration::Sast::AnalyzersEntityType.connection_type, null: true,
+ description: 'List of analyzers entities attached to SAST configuration.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb b/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb
new file mode 100644
index 00000000000..3a208f9d3e4
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ class UiComponentSizeEnum < BaseEnum
+ graphql_name 'SastUiComponentSize'
+ description 'Size of UI component in SAST configuration page'
+
+ value 'SMALL'
+ value 'MEDIUM'
+ value 'LARGE'
+ end
+ end
+ end
+end