class PlaceOS::FrontendLoader::Api::Root

Defined in:

placeos-frontend-loader/api/root.cr

Constant Summary

AFTER = {} of Nil => Nil
AROUND = {} of Nil => Nil
BEFORE = {set_request_id => {nil, nil}} of Nil => Nil
FORCE = {} of Nil => Nil
LOCAL_AFTER = {} of Nil => Nil

function => options

LOCAL_AROUND = {} of Nil => Nil

function => options

LOCAL_BEFORE = {} of Nil => Nil

function => options

LOCAL_FORCE = {} of Nil => Nil

function => options

LOCAL_RESCUE = {} of Nil => Nil

function => options

LOCAL_ROUTES = {root => {"get", "/", nil, do head(:ok) end, false}, startup => {"get", "/startup", nil, do if PlaceOS::FrontendLoader::Loader.instance.startup_finished? head(:ok) else head(:service_unavailable) end end, false}, version => {"get", "/version", nil, do render(:ok, json: PlaceOS::Model::Version.new(version: VERSION, build_time: BUILD_TIME, commit: BUILD_COMMIT, service: APP_NAME)) end, false}} of Nil => Nil

function => options

LOCAL_SKIP = {} of Nil => Nil

function => options

NAMESPACE = ["/api/frontend-loader/v1"]

default namespace based on class

RESCUE = {} of Nil => Nil
ROUTES = {root => {"get", "/", nil, do head(:ok) end, false}, startup => {"get", "/startup", nil, do if PlaceOS::FrontendLoader::Loader.instance.startup_finished? head(:ok) else head(:service_unavailable) end end, false}, version => {"get", "/version", nil, do render(:ok, json: PlaceOS::Model::Version.new(version: VERSION, build_time: BUILD_TIME, commit: BUILD_COMMIT, service: APP_NAME)) end, false}} of Nil => Nil
SKIP = {} of Nil => Nil

Class Method Summary

Instance Method Summary

Macro Summary

Instance methods inherited from class PlaceOS::FrontendLoader::Api::Base

set_request_id set_request_id

Class Method Detail

def self.__init_routes__(router) #

Routes call the functions generated above


def self.__route_list__ #

Create draw_routes function

Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers


def self.base_route #

Helper for obtaining base route


def self.context(method : String, route : String, route_params : Hash(String, String) | Nil = nil, headers : Hash(String, String) | Nil = nil, body : String | Bytes | IO | Nil = nil, &) #

[View source]
def self.get__api_frontend_loader_v1_(context, head_request) #

Generate functions for each route


def self.get__api_frontend_loader_v1_startup(context, head_request) #

Create draw_routes function

Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers


def self.get__api_frontend_loader_v1_version(context, head_request) #

Create draw_routes function

Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers


def self.root(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Helper methods for performing redirect_to calls


def self.startup(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Create draw_routes function

Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers


def self.version(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Create draw_routes function

Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers


Instance Method Detail

def base_route(*args, **options) #

Helper for obtaining base route


def base_route(*args, **options, &) #

Helper for obtaining base route


def root #

Create functions for named routes Skip the CRUD verbs, as they are already defined Annotations defined via the annotations argument are applied here


def startup #

def version #

Macro Detail

macro __inherit_after_filters__ #

macro __inherit_around_filters__ #

macro __inherit_before_filters__ #

macro __inherit_force_filters__ #

macro __inherit_rescue_filters__ #

macro __inherit_routes_filters__ #

macro __inherit_skip_filters__ #