Documentation ¶
Index ¶
- func InitDBEngine(ctx context.Context) (err error)
- func ProtocolMiddlewares() (handlers []any)
- func RenderMarkup(ctx *context.Base, repo *context.Repository, ...)
- func RenderPanicErrorPage(w http.ResponseWriter, req *http.Request, err any)
- func ServeBlob(ctx *context.Base, filePath string, blob *git.Blob, lastModified time.Time) error
- func ServeContentByReadSeeker(ctx *context.Base, filePath string, modTime time.Time, reader io.ReadSeeker)
- func ServeContentByReader(ctx *context.Base, filePath string, size int64, reader io.Reader)
- func Sessioner() func(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDBEngine ¶
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 RenderMarkup ¶
func RenderMarkup(ctx *context.Base, repo *context.Repository, mode, text, urlPrefix, filePath string, wiki bool)
RenderMarkup renders markup text for the /markup and /markdown endpoints
func RenderPanicErrorPage ¶
func RenderPanicErrorPage(w http.ResponseWriter, req *http.Request, err any)
RenderPanicErrorPage renders a 500 page, and it never panics
func ServeContentByReader ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.