web

package
v6.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const VersionEnv = "DDNS_GO_VERSION"

Variables

This section is empty.

Functions

func ClearLog

func ClearLog(writer http.ResponseWriter, request *http.Request)

ClearLog

func Login added in v6.5.0

func Login(writer http.ResponseWriter, request *http.Request)

Login login page

func LoginFunc added in v6.5.0

func LoginFunc(w http.ResponseWriter, r *http.Request)

LoginFunc login func

func Logout added in v6.7.4

func Logout(w http.ResponseWriter, r *http.Request)

func Logs

func Logs(writer http.ResponseWriter, request *http.Request)

Logs web

func Save

func Save(writer http.ResponseWriter, request *http.Request)

Save 保存

func WebhookTest

func WebhookTest(writer http.ResponseWriter, request *http.Request)

func Writing

func Writing(writer http.ResponseWriter, request *http.Request)

Writing 填写信息

Types

type MemoryLogs

type MemoryLogs struct {
	MaxNum int      // 保存最大条数
	Logs   []string // 日志
}

MemoryLogs 内存中的日志

func (*MemoryLogs) Write

func (mlogs *MemoryLogs) Write(p []byte) (n int, err error)

type Result added in v6.5.0

type Result struct {
	Code int         // 状态
	Msg  string      // 消息
	Data interface{} // 数据
}

Result Result

type ViewFunc

type ViewFunc func(http.ResponseWriter, *http.Request)

ViewFunc func

func Auth added in v6.5.0

func Auth(f ViewFunc) ViewFunc

Auth 验证Token是否已经通过

func AuthAssert added in v6.5.0

func AuthAssert(f ViewFunc) ViewFunc

AuthAssert 保护静态等文件不被公网访问

Jump to

Keyboard shortcuts

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