middleware

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseProvider

func DatabaseProvider(db *gorm.DB) gin.HandlerFunc

func PaginatedDatabaseProvider

func PaginatedDatabaseProvider(db *gorm.DB, config PaginationConfig) gin.HandlerFunc

func RedisProvider

func RedisProvider(redis *redis.Client) gin.HandlerFunc

func RequireAdmin

func RequireAdmin() gin.HandlerFunc

func RequireAdminOrTGOwner

func RequireAdminOrTGOwner() gin.HandlerFunc

func RequireLogin

func RequireLogin() gin.HandlerFunc

func RequireRepeaterOwnerOrAdmin

func RequireRepeaterOwnerOrAdmin() gin.HandlerFunc

func RequireSelfOrAdmin

func RequireSelfOrAdmin() gin.HandlerFunc

func RequireSuperAdmin

func RequireSuperAdmin() gin.HandlerFunc

func RequireTalkgroupOwnerOrAdmin

func RequireTalkgroupOwnerOrAdmin() gin.HandlerFunc

func SuspendedUserLockout added in v1.0.14

func SuspendedUserLockout() gin.HandlerFunc

func TracingProvider

func TracingProvider() gin.HandlerFunc

Types

type PaginationConfig

type PaginationConfig struct {
	DefaultLimit int
	MaxLimit     int
}

Jump to

Keyboard shortcuts

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