http

package
v0.0.0-...-4aa44aa Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache(duration time.Duration, handler rest.HandlerFunc) rest.HandlerFunc

Types

type AuthProvider

type AuthProvider interface {
	Get(r *http.Request) (*AuthenticatedUser, error)
}

type AuthenticatedUser

type AuthenticatedUser struct {
	User  auth.ReadUser
	Token auth.AccessToken
}

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(rw http.ResponseWriter, req *http.Request)

type HttpAuthProvider

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

func NewHttpAuthProvider

func NewHttpAuthProvider(app *application.Application) *HttpAuthProvider

func (*HttpAuthProvider) Get

type Server

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

func NewServer

func NewServer(handler http.Handler) *Server

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, address string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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