router

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proxy added in v0.14.0

func Proxy(w http.ResponseWriter, r *http.Request, salt string, timeouts config.ProxyTimeouts) error
func Search(w http.ResponseWriter, r *http.Request, db cache.DB, ttlConf config.TTL, settings map[engines.Name]config.Settings, categories map[category.Name]config.Category, salt string) error

returns response body, header and error

Types

type ErrorResponse added in v0.12.0

type ErrorResponse struct {
	Message string `json:"message"`
	Value   string `json:"value"`
}

type RouterWrapper

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

it's okay to store pointer since chi.NewRouter() returns a pointer

func New

func New(lgr zerolog.Logger, conf config.Config, db cache.DB, serveProfiler bool) RouterWrapper

func (RouterWrapper) Start

func (rw RouterWrapper) Start(ctx context.Context)

func (RouterWrapper) StartLambda added in v0.16.0

func (rw RouterWrapper) StartLambda()

Jump to

Keyboard shortcuts

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