webserver

package
v0.0.0-...-2a83efa Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CleanupTimeout = 10 * time.Second

CleanupTimeout cleanup timeout

View Source
var MaxHeaderSize = flagext.ByteSize(1)

MaxHeaderSize maximum header size

Functions

func InitMiddleWare

func InitMiddleWare(s *api.Server) http.Handler

InitMiddleWare init middleware steps for CORS allowance and different other middleware options

func InitServices

func InitServices()

InitServices init services signal handler

func Shutdown

func Shutdown() error

Shutdown shutdown

func StartServices

func StartServices(mainHandler http.Handler) error

StartServices start services HTTP and HTTPS

Types

type SecurityHandler

type SecurityHandler struct {
}

SecurityHandler security handler

func (SecurityHandler) HandleBasicAuth

func (sec SecurityHandler) HandleBasicAuth(ctx context.Context, operationName string, t api.BasicAuth) (context.Context, error)

HandleBasicAuth handle basic authorisation

func (SecurityHandler) HandleBearerAuth

func (sec SecurityHandler) HandleBearerAuth(ctx context.Context, operationName string, t api.BearerAuth) (context.Context, error)

HandleBearerAuth handler Bearer authentication

func (SecurityHandler) HandleTokenCheck

func (sec SecurityHandler) HandleTokenCheck(ctx context.Context, operationName string, t api.TokenCheck) (context.Context, error)

HandleTokenCheck handler for Token to authentication

func (SecurityHandler) Request

func (sec SecurityHandler) Request(ctx context.Context, req *http.Request)

Request request secruity handler

Jump to

Keyboard shortcuts

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