handler

package
v0.0.0-...-a3a6de1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequest

type BadRequest struct {
	Message string `json:"message"`
}

func (*BadRequest) Code

func (e *BadRequest) Code() int

func (*BadRequest) Error

func (e *BadRequest) Error() string

type Handler

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

func NewHandler

func NewHandler(
	userlistDB userlist.DB,
	options ...Option,
) *Handler

func (*Handler) Serve

func (h *Handler) Serve(ctx context.Context, req *Request) (*Response, error)

type Logger

type Logger interface {
	Error(error, string, *Request, ...interface{})
	Info(string, *Request, ...interface{})
}

type Option

type Option func(*Handler)

func SetLogger

func SetLogger(l Logger) Option

Jump to

Keyboard shortcuts

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