web

package
v0.0.0-...-e03c1e8 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugParty

func DebugParty() module.WebModule

Party 调试模块

Types

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(port int) *WebServer

Init 初始化web服务

func (*WebServer) AddModule

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

AddModule 添加模块

func (*WebServer) AddStatic

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

AddStatic 添加静态文件

func (*WebServer) AddUploadStatic

func (webServer *WebServer) AddUploadStatic()

AddUploadStatic 添加上传文件访问地址

func (*WebServer) AddWebStatic

func (webServer *WebServer) AddWebStatic(requestPath string)

AddWebStatic 添加前端访问地址

func (*WebServer) GetAddr

func (webServer *WebServer) GetAddr() string

GetAddr 获取web服务地址

func (*WebServer) GetModules

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

GetModules 获取模块

func (*WebServer) GetSources

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

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

func (*WebServer) GetStaticPath

func (webServer *WebServer) GetStaticPath() string

GetStaticPath 获取静态路径

func (*WebServer) GetTestAuth

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

GetTestAuth 获取测试验证客户端

func (*WebServer) GetTestLogin

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

GetTestLogin 测试登录web服务

func (*WebServer) GetWebPath

func (webServer *WebServer) GetWebPath() string

GetWebPath 获取前端路径

func (*WebServer) InitRouter

func (webServer *WebServer) InitRouter() error

InitRouter 初始化模块路由

func (*WebServer) Run

func (webServer *WebServer) Run()

Run 启动web服务

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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