api

package
v0.0.0-...-d30abd5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

README

package api

import "github.com/zeebo/rothko/api"

package api provides apis for interacting with a rothko server

Usage

type Options
type Options struct {
	// Origin is sent back in Access-Control-Allow-Origin. If not set, sends
	// back '*'.
	Origin string

	// Username and Password control basic auth to the server. If unset, no
	// basic auth will be required.
	Username string
	Password string
}

Options for the server.

type Server
type Server struct {
}

Server is an http.Handler that can serve responses for a frontend.

func New
func New(db database.DB, static http.Handler, opts Options) *Server

New returns a new Server.

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

ServeHTTP implements the http.Handler interface for the server. It just looks at the method and last path component to route.

Documentation

Overview

package api provides apis for interacting with a rothko server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Origin is sent back in Access-Control-Allow-Origin. If not set, sends
	// back '*'.
	Origin string

	// Username and Password control basic auth to the server. If unset, no
	// basic auth will be required.
	Username string
	Password string
}

Options for the server.

type Server

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

Server is an http.Handler that can serve responses for a frontend.

func New

func New(db database.DB, static http.Handler, opts Options) *Server

New returns a new Server.

func (*Server) ServeHTTP

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

ServeHTTP implements the http.Handler interface for the server. It just looks at the method and last path component to route.

Directories

Path Synopsis
package query provides routines to query out of a set of metrics.
package query provides routines to query out of a set of metrics.

Jump to

Keyboard shortcuts

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