api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, log *slog.Logger, captcha *captcha.Manager) *API

func (*API) CaptchaChallengeHandler

func (api *API) CaptchaChallengeHandler(res http.ResponseWriter, req *http.Request)

func (*API) CaptchaVerifyHandler

func (api *API) CaptchaVerifyHandler(res http.ResponseWriter, req *http.Request)

func (*API) HealthHandler

func (api *API) HealthHandler(res http.ResponseWriter, req *http.Request)

func (*API) Serve

func (api *API) Serve(ctx context.Context) error

func (*API) Shutdown

func (api *API) Shutdown(ctx context.Context) error

type Middleware added in v1.1.0

type Middleware func(http.Handler) http.Handler

Jump to

Keyboard shortcuts

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