interfaces

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiTest

type ApiTest interface {
	TestAllApis(channels []*types.Channel) []types.TestResult
	PrintResults(results []types.TestResult) error
}

type CaptchaResult

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 MessageSender

type MessageSender interface {
	MessageChan() <-chan types.Message
	Done() <-chan struct{}
}

MessageSender defines the interface for sending messages

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