http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormFloatValue

func FormFloatValue(r *http.Request, field string, defaultVal float64) (float64, error)

func FormIntValue

func FormIntValue(r *http.Request, field string, defaultVal int) (int, error)

func FormSimilarityValue

func FormSimilarityValue(r *http.Request, field string, defaultVal float64) (float64, error)

FormSimilarityValue returns the first value for the named component of the query and validates it with similarity value restrictions

func FormTopKValue

func FormTopKValue(r *http.Request, field string, defaultVal int) (int, error)

FormTopKValue returns the first value for the named component of the query and validates it with topK value restrictions

Types

type Server

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

func NewServer

func NewServer(r http.Handler, addr string) *Server

NewServer creates new instance of HttpServer

func (*Server) Run

func (h *Server) Run(ctx context.Context) error

Run starts serving http requests

Jump to

Keyboard shortcuts

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