http

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Check(r *http.Request) (bool, error)
}

type Entry

type Entry struct {
	Bucket bool   `json:"bucket"`
	Key    Key    `json:"key"`
	Value  *Value `json:"value,omitempty"`
}

type Handler

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

func NewHandler

func NewHandler(app *application.Application, authProvider AuthProvider) (*Handler, error)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Key

type Key struct {
	Hex string `json:"hex"`
	Str string `json:"str,omitempty"`
}

type Server

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

func NewServer

func NewServer(handler http.Handler, conf *config.Config) *Server

func (*Server) Serve

func (s *Server) Serve() error

type TokenAuthProvider

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

func NewTokenAuthProvider

func NewTokenAuthProvider(conf *config.Config) *TokenAuthProvider

func (*TokenAuthProvider) Check

func (h *TokenAuthProvider) Check(r *http.Request) (bool, error)

type Tree

type Tree struct {
	Path    []Key   `json:"path"`
	Entries []Entry `json:"entries"`
}

type Value

type Value struct {
	Hex string `json:"hex"`
	Str string `json:"str,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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