router

package
v0.0.0-...-cf413bb Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright (C) 2021 Sysreturn Community Contributors SPDX-License-Identifier: AGPL-3.0-or-later

Copyright (C) 2021 Sysreturn Community Contributors SPDX-License-Identifier: AGPL-3.0-or-later

Copyright (C) 2021 Sysreturn Community Contributors SPDX-License-Identifier: AGPL-3.0-or-later

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorLogger

func ErrorLogger(c *gin.Context)

func WithRoutes

func WithRoutes(srv *Router) error

func WithWeb

func WithWeb(srv *Router) error

Types

type Router

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

func New

func New(opts ...RouterOptionFunc) (*Router, error)

func (*Router) ListenAndServe

func (srv *Router) ListenAndServe(addr string) *http.Server

func (*Router) RequestMustAuth

func (srv *Router) RequestMustAuth(c *gin.Context)

type RouterOptionFunc

type RouterOptionFunc func(*Router) error

func WithDB

func WithDB(db *sql.DB) RouterOptionFunc

func WithStorage

func WithStorage(stor storage.Storage) RouterOptionFunc

Jump to

Keyboard shortcuts

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