abstract class EdgeAI::Base

Direct Known Subclasses

Defined in:

controllers/application.cr

Constant Summary

Log = ::EdgeAI::Log.for("controller")

Configure your log source name

NOTE : this is chaining from Log

PARSER_LIST = ["application/json"]
RESPONDER_LIST = ["application/json", "application/yaml"]

Instance Method Summary

Instance Method Detail

def bad_media_type(error) : AC::Error::ContentResponse #

covers no acceptable response format and not an acceptable post format


[View source]
def invalid_param(error) : AC::Error::ParameterResponse #

handles paramater missing or a bad paramater value / format


[View source]
def not_found(error) : NamedTuple(error: String | Nil) #

404 if resource not present


[View source]
def set_request_id #

This makes it simple to match client requests with server side logs. When building microservices this ID should be propagated to upstream services.


[View source]