Documentation ¶
Index ¶
- Variables
- func StartService(ops ...Optional) error
- func StartTLSService(ops ...Optional) error
- type MiddlewareOps
- type Optional
- type ServerConfig
- func (c *ServerConfig) AddExclude(pkg ...string)
- func (c *ServerConfig) AddIncludeRegex(regex ...string)
- func (c *ServerConfig) Dwarf() *dwarf.DwarfMaker
- func (c *ServerConfig) Listen() string
- func (c *ServerConfig) LoadPath() *string
- func (c *ServerConfig) SetDwarfMaker(dwarf *dwarf.DwarfMaker)
- func (c *ServerConfig) SetDwarfMode(mode dwarf.FilterMode)
- func (c *ServerConfig) SetExePath(path string)
- func (c *ServerConfig) SetListen(ser string)
- type ServerMain
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HEAD = core.HttpM(stdhttp.MethodHead, def.DefaultContext) GET = core.HttpM(stdhttp.MethodGet, def.DefaultContext) POST = core.HttpM(stdhttp.MethodPost, def.DefaultContext) PUT = core.HttpM(stdhttp.MethodPut, def.DefaultContext) PATCH = core.HttpM(stdhttp.MethodPatch, def.DefaultContext) DELETE = core.HttpM(stdhttp.MethodDelete, def.DefaultContext) OPTIONS = core.HttpM(stdhttp.MethodOptions, def.DefaultContext) // RegisterErrorHandler error handler RegisterErrorHandler = http.RegisterErrorHandler // AddHttpHandle http handler AddHttpHandle = http.AddHttpHandle // RegisterTypeMapper type handler RegisterTypeMapper = call.RegisterTypeMapper // RegisterReturnHandler register handler RegisterReturnHandler = http.RegisterReturnHandler NewStream = rettypes.NewStream Html = rettypes.NewHtml HtmlView = rettypes.HtmlView // Static static web Static = http.DefaultStatic.HandleStatic NewRedirect = rettypes.NewRedirect NewResp = rettypes.NewResp )
Functions ¶
func StartService ¶
func StartTLSService ¶
Types ¶
type MiddlewareOps ¶ added in v0.1.0
type MiddlewareOps struct {
// contains filtered or unexported fields
}
func AddRoutes ¶ added in v0.1.0
func AddRoutes(os ...def.Option) *MiddlewareOps
func (*MiddlewareOps) Middleware ¶ added in v0.1.0
func (m *MiddlewareOps) Middleware(mw ...def.MiddleWare) *MiddlewareOps
func (*MiddlewareOps) Swagger ¶ added in v0.1.0
func (o *MiddlewareOps) Swagger(opsFn func(swagger def.SwaggerSecurity)) *MiddlewareOps
func (*MiddlewareOps) WithPrefix ¶ added in v0.1.0
func (m *MiddlewareOps) WithPrefix(...def.MiddleWare) *MiddlewareOps
type Optional ¶ added in v0.1.0
type Optional func(conf *ServerConfig)
func WithListen ¶ added in v0.1.0
func WithTLSFile ¶ added in v0.1.0
type ServerConfig ¶ added in v0.1.0
type ServerConfig struct {
// contains filtered or unexported fields
}
func (*ServerConfig) AddExclude ¶ added in v0.1.0
func (c *ServerConfig) AddExclude(pkg ...string)
func (*ServerConfig) AddIncludeRegex ¶ added in v0.1.0
func (c *ServerConfig) AddIncludeRegex(regex ...string)
func (*ServerConfig) Dwarf ¶ added in v0.1.0
func (c *ServerConfig) Dwarf() *dwarf.DwarfMaker
func (*ServerConfig) Listen ¶ added in v0.1.0
func (c *ServerConfig) Listen() string
func (*ServerConfig) LoadPath ¶ added in v0.1.0
func (c *ServerConfig) LoadPath() *string
func (*ServerConfig) SetDwarfMaker ¶ added in v0.1.0
func (c *ServerConfig) SetDwarfMaker(dwarf *dwarf.DwarfMaker)
func (*ServerConfig) SetDwarfMode ¶ added in v0.1.0
func (c *ServerConfig) SetDwarfMode(mode dwarf.FilterMode)
func (*ServerConfig) SetExePath ¶ added in v0.1.0
func (c *ServerConfig) SetExePath(path string)
func (*ServerConfig) SetListen ¶ added in v0.1.0
func (c *ServerConfig) SetListen(ser string)
type ServerMain ¶ added in v0.1.0
type ServerMain struct {
// contains filtered or unexported fields
}
func NewServer ¶ added in v0.1.0
func NewServer(pool *def.MethodsPools) *ServerMain
func (*ServerMain) Maker ¶ added in v0.1.0
func (ad *ServerMain) Maker() *dwarf.DwarfMaker
func (*ServerMain) ServeHTTP ¶ added in v0.1.0
func (ad *ServerMain) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.