middleware

package
v0.0.0-...-1ad4281 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheControl

func CacheControl(c *fiber.Ctx) error

CacheControl do caches

func NoIndex

func NoIndex(c *fiber.Ctx) error

NoIndex x-robots-tag

func Protected

func Protected(c *fiber.Ctx) error

Protected from non logged in users

func ProtectedCanViewPost

func ProtectedCanViewPost(c *fiber.Ctx) error

ProtectedCanViewPost only allow access to user who can view post

func ProtectedCommentPost

func ProtectedCommentPost(c *fiber.Ctx) error

ProtectedCommentPost only allow comment to be viewed with

func ProtectedCommenterOnly

func ProtectedCommenterOnly(c *fiber.Ctx) error

func ProtectedPosterOnly

func ProtectedPosterOnly(c *fiber.Ctx) error

ProtectedPosterOnly only allow access to post owner

func ProtectedPubOrFollow

func ProtectedPubOrFollow(c *fiber.Ctx) error

ProtectedPubOrFollow only allow access to user if public or is being followed or is self

Checks id's of :userName & user session

func ProtectedSelfOnly

func ProtectedSelfOnly(c *fiber.Ctx) error

ProtectedSelfOnly only allow access to user with same username as :userName

Checks id's of :userName & user session

func ServerStats

func ServerStats(c *fiber.Ctx) error

ServerStats adds server stats to header

func Session

func Session(c *fiber.Ctx) error

Session saving middelware

Types

This section is empty.

Jump to

Keyboard shortcuts

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