common

package
v1.15.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 20 Imported by: 7

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 LoggerHandler

func LoggerHandler(level log.Level) func(next http.Handler) http.Handler

LoggerHandler is a handler that will log the routing to the default gitea log

func Middlewares

func Middlewares() []func(http.Handler) http.Handler

Middlewares returns common middlewares

func ServeBlob

func ServeBlob(ctx *context.Context, blob *git.Blob) error

ServeBlob download a git.Blob

func ServeData

func ServeData(ctx *context.Context, name string, size int64, reader io.Reader) error

ServeData download file from io.Reader

Types

This section is empty.

Jump to

Keyboard shortcuts

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