Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SampleDesc desc.ServiceDescFunc = func() *desc.Service { return desc.NewService("SampleService"). SetEncoding(kit.JSON). AddError(dto.Err(http.StatusBadRequest, "INPUT")). AddContract( desc.NewContract(). SetInput(&dto.VeryComplexRequest{}). SetOutput(&dto.VeryComplexResponse{}). AddRoute(desc.Route("ComplexDummy", fasthttp.POST("/complexDummy"))). AddRoute(desc.Route("ComplexDummy2", fasthttp.POST("/complexDummy/:key1"))). AddRoute(desc.Route("ComplexDummy3", fasthttp.RPC("complexDummy"))). AddModifier(func(envelope *kit.Envelope) { envelope.SetHdr("X-Custom-Header", "justForTestingModifier") }). SetHandler(DummyHandler), ). AddContract( desc.NewContract(). SetInput(&dto.VeryComplexRequest{}). SetOutput(&dto.VeryComplexResponse{}). AddRoute(desc.Route("GetComplexDummy", fasthttp.GET("/complexDummy/:key1/xs/:sKey1"))). AddRoute(desc.Route("GetComplexDummy2", fasthttp.RPC("getComplexDummy"))). AddModifier(func(envelope *kit.Envelope) { envelope.SetHdr("X-Custom-Header", "justForTestingModifier") }). SetHandler(DummyHandler), ) }
Functions ¶
func DummyHandler ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.