server

package
v0.0.0-...-3c9b827 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package server defines the Server type for serving the Open Data Link frontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// If DevMode is true, templates will not be cached.
	DevMode              bool
	DB                   *database.DB
	FastText             *fasttext.FastText
	MetadataIndex        *index.MetadataIndex
	JoinabilityThreshold float64
	JoinabilityIndex     *lshensemble.LshEnsemble
	OrganizeConfig       *nav.Config
}

Config is used to configure the server.

type Server

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

Server serves the Open Data Link frontend.

func New

func New(cfg *Config) (*Server, error)

New creates a new Server with the given configuration.

func (*Server) NewHandler

func (s *Server) NewHandler() http.Handler

NewHandler returns an HTTP handler that handles requests to the server.

Jump to

Keyboard shortcuts

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