interfaces

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaResult added in v0.1.5

type CaptchaResult struct {
	Image []byte
	Text  string
	ID    string
}

CaptchaResult contains the generated captcha image and its text

type HTTPServer

type HTTPServer interface {
	ListenAndServe() error
	Shutdown(context.Context) error
}

HTTPServer 定义 HTTP 服务器接口

type ImageGenerator

type ImageGenerator interface {
	GenerateCaptcha(width, height int, text string) (*CaptchaResult, error)
}

ImageGenerator 定义图片生成器接口

type OutputWriter

type OutputWriter interface {
	Write(content string)
	WriteError(err string)
	WriteInfo(content string)
	WriteResponse(content string)
}

OutputWriter 定义输出写入器接口

type Router

type Router interface {
	ServeHTTP(http.ResponseWriter, *http.Request)
}

Router 定义路由器接口

type TraceManager

type TraceManager interface {
	StartTrace() error
	StopTrace() error
}

TraceManager 定义跟踪管理的核心接口

type TraceReader

type TraceReader interface {
	ReadTrace() ([]byte, error)
}

TraceReader 定义读取跟踪数据的接口

type TraceWriter

type TraceWriter interface {
	WriteTrace(data []byte) error
}

TraceWriter 定义写入跟踪数据的接口

type Tunnel

type Tunnel interface {
	URL() string
	Close() error
	Ready() <-chan struct{}
}

Tunnel 定义隧道接口

Jump to

Keyboard shortcuts

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