class

AzuCLI::Generate::Middleware

Inherits Teeplate::FileTree < Reference < Object

Middleware generator that creates HTTP::Handler classes

Constants

OUTPUT_DIR = "./src/middleware"

Constructors

new(name : String, middleware_type : String = "authentication", skip_paths : Array(String) = [] of String, context_vars : Hash(String, String) = {} of String => String)
Source

Instance methods

____collect_files(____files)

:nodoc:

Source
__ecr0(____io)
Source
context_vars
Source
context_vars=(context_vars : Hash(String, String))
Source
context_vars_string

Get context variables string

Source
crystal_type(var_type : String) : String

Get Crystal type for context variable

Source
default_skip_paths

Get default skip paths based on middleware type

Source
get_skip_paths

Get skip paths (use provided or defaults)

Source
has_context_vars?

Check if middleware has context variables

Source
middleware_class_name

Convert name to middleware class name

Source
middleware_logic

Get middleware type specific logic

Source
middleware_type
Source
middleware_type=(middleware_type : String)
Source
name
Source
name=(name : String)
Source
private_methods

Get private methods based on middleware type

Source
skip_paths
Source
skip_paths=(skip_paths : Array(String))
Source
snake_case_name
Source
snake_case_name=(snake_case_name : String)
Source