struct Noir::TreeSitterGoRouteExtractor::RestfulRoute

Overview

go-restful (github.com/emicklei/go-restful) routes. Each WebService declares a base ws.Path("/users") and registers routes as a nested builder chain: ws.Route(ws.GET("/{id}").To(h).Param(ws.PathParameter( "id", ...)).Reads(User{})). The verb and sub-path live on the inner ws.GET(...) call; the full path is the WebService's Path() prefix joined with it; params are self-declared on the chain (PathParameter/ QueryParameter/HeaderParameter/BodyParameter/FormParameter) plus Reads(struct) for the JSON body. #handler carries the .To(...) argument for callee wiring.

Defined in:

miniparsers/go_route_extractor_ts.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(verb : String, path : String, handler : String, line : Int32, params : Array(Tuple(String, String))) #

[View source]

Instance Method Detail

def handler : String #

[View source]
def line : Int32 #

[View source]
def params : Array(Tuple(String, String)) #

[View source]
def path : String #

[View source]
def verb : String #

[View source]