v0.0.0-...-6e4d488 Latest Latest

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 22 Imported by: 0




This section is empty.


This section is empty.


func DebugParty

func DebugParty() module.WebModule

Party 调试模块


type WebServer

type WebServer struct {
	// contains filtered or unexported fields

WebServer web 服务 - app iris application - modules 服务的模块 - idleConnsClosed - addr 服务访问地址 - timeFormat 时间格式 - globalMiddlewares 全局中间件 - wg sync.WaitGroup - staticPrefix 静态文件访问地址前缀 - staticPath 静态文件地址 - webPath 前端文件地址

func Init

func Init() *WebServer

Init 初始化web服务

func (*WebServer) AddModule

func (ws *WebServer) AddModule(module ...module.WebModule)

AddModule 添加模块

func (*WebServer) AddStatic

func (ws *WebServer) AddStatic(requestPath string, fsOrDir interface{}, opts ...iris.DirOptions)

AddStatic 添加静态文件

func (*WebServer) AddUploadStatic

func (ws *WebServer) AddUploadStatic()

AddUploadStatic 添加上传文件访问地址

func (*WebServer) AddWebStatic

func (ws *WebServer) AddWebStatic(requestPath string)

AddWebStatic 添加前端访问地址

func (*WebServer) GetAddr

func (ws *WebServer) GetAddr() string

GetAddr 获取web服务地址

func (*WebServer) GetModules

func (ws *WebServer) GetModules() []module.WebModule

GetModules 获取模块

func (*WebServer) GetSources

func (ws *WebServer) GetSources() []map[string]string

GetSources 获取web服务需要认证的权限

func (*WebServer) GetStaticPath

func (ws *WebServer) GetStaticPath() string

GetStaticPath 获取静态路径

func (*WebServer) GetTestAuth

func (ws *WebServer) GetTestAuth(t *testing.T) *tests.Client

GetTestAuth 获取测试验证客户端

func (*WebServer) GetTestLogin

func (ws *WebServer) GetTestLogin(t *testing.T, url string, res tests.Responses, datas ...map[string]interface{}) *tests.Client

GetTestLogin 测试登录web服务

func (*WebServer) GetWebPath

func (ws *WebServer) GetWebPath() string

GetWebPath 获取前端路径

func (*WebServer) InitRouter

func (ws *WebServer) InitRouter() error

InitRouter 初始化模块路由

func (*WebServer) Run

func (ws *WebServer) Run()

Run 启动web服务


Path Synopsis

Jump to

Keyboard shortcuts

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