Documentation ¶ Index ¶ Variables func NewServer(config common.Config) error func TokenMiddleware(psk string, public map[string]string, h http.Handler) http.Handler type LogWriter func (w LogWriter) Write(p []byte) (n int, err error) Constants ¶ This section is empty. Variables ¶ View Source var ( // Org will carry throughout the api and get tagged on resources Org string // ResultsCache is a map of in-memory caches ResultsCache = make(map[string]*cache.Cache) ) Functions ¶ func NewServer ¶ func NewServer(config common.Config) error NewServer creates a new server and starts it func TokenMiddleware ¶ func TokenMiddleware(psk string, public map[string]string, h http.Handler) http.Handler TokenMiddleware checks the tokens for non-public URLs Types ¶ type LogWriter ¶ type LogWriter struct { http.ResponseWriter } LogWriter is an http.ResponseWriter func (LogWriter) Write ¶ func (w LogWriter) Write(p []byte) (n int, err error) Write log message if http response writer returns an error Source Files ¶ View all Source files handlers.go handlers_spaces.go middleware.go routes.go server.go Click to show internal directories. Click to hide internal directories.