server

package
v0.0.0-...-6dd71d7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthType ctxKeyType = "AUTH_TYPE"
	Username ctxKeyType = "USERNAME"

	AuthTypeWebSession AuthTypeValue = "WEB_SESSION"
	AuthTypeBearer     AuthTypeValue = "BEARER"
)

Variables

This section is empty.

Functions

func Recover

func Recover(w http.ResponseWriter)

func SendError

func SendError(w http.ResponseWriter, err error)

Types

type AuthTypeValue

type AuthTypeValue string

type DB

type DB struct {
	Name string
	Size string
}

type HTMLData

type HTMLData struct {
	Columns []string      `json:"columns"`
	Rows    []interface{} `json:"rows"`
}

type MeteredResponseWriter

type MeteredResponseWriter interface {
	io.Writer
	http.Flusher
}

MeteredResponseWriter errors if requested to write more than the provided limit

func NewMeteredResponseWriter

func NewMeteredResponseWriter(w http.ResponseWriter, limit int) MeteredResponseWriter

type PageData

type PageData struct {
	DBs      []DB
	DBName   string
	DBSchema string
	DefaultQ string
}

type Server

type Server interface {
	Serve() error
}

func NewServer

func NewServer(opts ServerOpts) Server

type ServerOpts

type ServerOpts struct {
	Port    int
	DataDir string
}

Jump to

Keyboard shortcuts

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