Class: Core::Models::Monitoring::Route
- Inherits:
-
Object
- Object
- Core::Models::Monitoring::Route
- Includes:
- Concerns::Activable, Concerns::Premiumable, Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/monitoring/route.rb
Overview
A route is an endpoint accessible in a service. Each route has to have an associated endpoint in the deployed instances.
Instance Attribute Summary collapse
-
#authenticated ⇒ Boolean
If true, the session_id is needed for this route, if false it is not.
-
#groups ⇒ Array<Core::Models::Permissions::Group>
The groups having permission to access this route.
-
#path ⇒ String
The path (URI) of the route in the service?.
-
#service ⇒ Core::Models::Monitoring::Service
The service in which this route is declared.
-
#verb ⇒ String
The verb (HTTP method) of this route in the service.
Instance Method Summary collapse
-
#complete_path ⇒ String
Returns the complete path, enriched with the path of the service.
Instance Attribute Details
#authenticated ⇒ Boolean
Returns if true, the session_id is needed for this route, if false it is not.
20 |
# File 'lib/core/models/monitoring/route.rb', line 20 field :authenticated, type: Boolean, default: true |
#groups ⇒ Array<Core::Models::Permissions::Group>
Returns the groups having permission to access this route.
28 |
# File 'lib/core/models/monitoring/route.rb', line 28 has_and_belongs_to_many :groups, class_name: 'Core::Models::Permissions::Group', inverse_of: :groups |
#path ⇒ String
Returns the path (URI) of the route in the service?.
14 |
# File 'lib/core/models/monitoring/route.rb', line 14 field :path, type: String, default: '/' |
#service ⇒ Core::Models::Monitoring::Service
Returns the service in which this route is declared.
24 |
# File 'lib/core/models/monitoring/route.rb', line 24 belongs_to :service, class_name: 'Core::Models::Monitoring::Service', inverse_of: :routes |
#verb ⇒ String
Returns the verb (HTTP method) of this route in the service.
17 |
# File 'lib/core/models/monitoring/route.rb', line 17 field :verb, type: String, default: 'get' |
Instance Method Details
#complete_path ⇒ String
Returns the complete path, enriched with the path of the service.
38 39 40 |
# File 'lib/core/models/monitoring/route.rb', line 38 def complete_path path == '/' ? service.path : "#{service.path}#{path}" end |