Ravn::Tactical::

ServiceV1 module

:nocov:

Public Class Methods

included( app )

Inclusion callback – include the routes in this module in app.

   # File lib/ravn/tactical/service_v1.rb
30 def self::included( app )
31     super
32 
33     self.mount( app )
34 
35     app.include( Ravn::Tactical::ServiceV1::Bolts )
36     app.include( Ravn::Tactical::ServiceV1::Changes )
37     app.include( Ravn::Tactical::ServiceV1::Diagnostics )
38     # app.include( Ravn::Tactical::ServiceV1::Logs )
39     app.include( Ravn::Tactical::ServiceV1::Missions )
40     app.include( Ravn::Tactical::ServiceV1::Nodes )
41     app.include( Ravn::Tactical::ServiceV1::Roles )
42 end
mount( app )

Declare endpoints relative to the given route.

   # File lib/ravn/tactical/service_v1.rb
46 def self::mount( app )
47     app.hash_branch( :api, 'v1' ) do |r|
48         # :TODO: Add webauthn(?)
49 
50         r.get( true ) do |variable|
51             return { version: '1' }
52         end
53 
54         r.hash_branches( :v1 )
55     end
56 end