common

package
v0.0.0-...-495e01f Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDBEngine

func InitDBEngine(ctx context.Context) (err error)

InitDBEngine In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology

func ProtocolMiddlewares

func ProtocolMiddlewares() (handlers []any)

ProtocolMiddlewares returns HTTP protocol related middlewares, and it provides a global panic recovery

func Sessioner

func Sessioner() func(next http.Handler) http.Handler

Types

type AuthResult

type AuthResult struct {
	Doer        *user_model.User
	IsBasicAuth bool
}

type VerifyOptions

type VerifyOptions struct {
	SignInRequired  bool
	SignOutRequired bool
	AdminRequired   bool
	DisableCSRF     bool
}

VerifyOptions contains required or check options

Jump to

Keyboard shortcuts

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