web

package
v0.0.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 added in v0.0.40

type Pager struct {
	Count int           `json:"count"`
	Data  []interface{} `json:"data,omitempty"`
}

type PagerResponse added in v0.0.40

type PagerResponse struct {
	Response
	Pager
}

type Response added in v0.0.39

type Response struct {
	Code    *int   `json:"code"`
	Success *bool  `json:"success"`
	Message string `json:"message,omitempty"`
}

func (*Response) SetCode added in v0.0.40

func (r *Response) SetCode(code int) *Response

func (*Response) SetSuccess added in v0.0.40

func (r *Response) SetSuccess(success bool) *Response

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New added in v0.0.6

func New(config ServerConfig) (handler *Server)

func (*Server) AddHttpHandler added in v0.0.11

func (s *Server) AddHttpHandler(schema string, pathGroup string, handler http.Handler) *Server

func (*Server) AdvancedConfig added in v0.0.6

func (s *Server) AdvancedConfig(handler func(app *iris.Application)) *Server

func (*Server) OnErrorCode

func (s *Server) OnErrorCode(code int, onErr func(ctx iris.Context)) *Server

func (*Server) RegisterComponent

func (s *Server) RegisterComponent(component Component) *Server

func (*Server) RegisterComponents added in v0.0.8

func (s *Server) RegisterComponents(components ...Component) *Server

func (*Server) SetHomePage

func (s *Server) SetHomePage(indexHtml string) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Listen string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL