Documentation ¶
Index ¶
- Constants
- type Component
- type Pager
- type PagerResponse
- type Response
- type Server
- func (s *Server) AddHttpHandler(schema string, pathGroup string, handler http.Handler) *Server
- func (s *Server) AdvancedConfig(handler func(app *iris.Application)) *Server
- func (s *Server) OnErrorCode(code int, onErr func(ctx iris.Context)) *Server
- func (s *Server) RegisterComponent(component Component) *Server
- func (s *Server) RegisterComponents(components ...Component) *Server
- func (s *Server) SetHomePage(indexHtml string) *Server
- func (s *Server) Start(ctx context.Context) error
- type ServerConfig
- type SimpleServer
Constants ¶
View Source
const ( SchemaHttp = "http" SchemaHttps = "https" DefaultSchema = SchemaHttp )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component func(app *iris.Application)
type Pager ¶
type Pager struct { Count int `json:"count,omitempty"` Data []interface{} `json:"data,omitempty"` }
type PagerResponse ¶
type Response ¶
type Response struct { Code *int `json:"code,omitempty"` Success *bool `json:"success,omitempty"` Message string `json:"message,omitempty"` }
func (*Response) SetSuccess ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(config ServerConfig) (handler *Server)
func NewSimpleServer ¶ added in v1.0.1
func NewSimpleServer(config ServerConfig) (handler *Server)
func (*Server) AddHttpHandler ¶
func (*Server) AdvancedConfig ¶
func (s *Server) AdvancedConfig(handler func(app *iris.Application)) *Server
func (*Server) OnErrorCode ¶
func (*Server) RegisterComponent ¶
func (*Server) RegisterComponents ¶
func (*Server) SetHomePage ¶
type ServerConfig ¶
type ServerConfig struct {
Listen string
}
type SimpleServer ¶ added in v1.0.1
type SimpleServer struct {
// contains filtered or unexported fields
}
func (*SimpleServer) GetDelegate ¶ added in v1.0.1
func (s *SimpleServer) GetDelegate() *iris.Application
Click to show internal directories.
Click to hide internal directories.