serve

package
v0.0.0-...-1c65ec8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ResponseLimit = 36
)

Variables

This section is empty.

Functions

func NewFileSearcher

func NewFileSearcher() *fileSearcher

func Serve

func Serve(fs FileSearcher)

Types

type File

type File struct {
	Name             string
	Link             string
	Description      string
	Docs             string
	Labels           []string
	Examples         string
	ExamplesLanguage string
	ExtraLinks       []string

	Path string
}

type FileSearcher

type FileSearcher interface {
	LibPattern() *regexp.Regexp
	DocsPattern() *regexp.Regexp
	LabelsPattern() *regexp.Regexp
	LinksPattern() *regexp.Regexp
	ExamplesPattern() *regexp.Regexp
	DescriptionPattern() *regexp.Regexp
	Collect() ([]File, error)
}

type Server

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

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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