routes

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PublicLimter = rate_limiter.New(rate_limiter.Config{
	Max:        3,
	Expiration: 1 * time.Second,
	KeyGenerator: func(c *fiber.Ctx) string {
		return c.Get("x-forwarded-for")
	},
	LimitReached:      PublicMaxedOut,
	LimiterMiddleware: rate_limiter.SlidingWindow{},
})
View Source
var UUIDFileLimter = rate_limiter.New(rate_limiter.Config{
	Max:        10,
	Expiration: 1 * time.Second,
	KeyGenerator: func(c *fiber.Ctx) string {
		return c.Get("x-forwarded-for")
	},
	LimitReached:      PublicMaxedOut,
	LimiterMiddleware: rate_limiter.SlidingWindow{},
})

Functions

func LibraryGetEntries

func LibraryGetEntries(s *server.Server) fiber.Handler

func PublicMaxedOut

func PublicMaxedOut(c *fiber.Ctx) error

func SessionHTMLPlayer

func SessionHTMLPlayer(s *server.Server) fiber.Handler

func SessionHTMLPlayerAtIndex

func SessionHTMLPlayerAtIndex(s *server.Server) fiber.Handler

func SessionIndex

func SessionIndex(s *server.Server) fiber.Handler

func SessionNext

func SessionNext(s *server.Server) fiber.Handler

func SessionPrevious

func SessionPrevious(s *server.Server) fiber.Handler

func SessionReset

func SessionReset(s *server.Server) fiber.Handler

func SessionSetIndex

func SessionSetIndex(s *server.Server) fiber.Handler

func SessionTotal

func SessionTotal(s *server.Server) fiber.Handler

func SetDebounceFlag

func SetDebounceFlag(db *redis.Client, ctx context.Context, key string, ttl time.Duration) bool

func SetupAdminRoutes

func SetupAdminRoutes(s *server.Server)

func SetupPublicRoutes

func SetupPublicRoutes(s *server.Server)

func UpdatePosition

func UpdatePosition(s *server.Server) fiber.Handler

func YouTubeAddPlaylist

func YouTubeAddPlaylist(s *server.Server) fiber.Handler

func YouTubeSessionHTMLPlayer

func YouTubeSessionHTMLPlayer(s *server.Server) fiber.Handler

Types

type YouTubePlaylist

type YouTubePlaylist struct {
	Name  string                  `json:"name"`
	Items []*youtube.PlaylistItem `json:"items"`
}

func YouTubeGetVideosInPlaylist

func YouTubeGetVideosInPlaylist(api_key string, playlist_id string) (result YouTubePlaylist)

Jump to

Keyboard shortcuts

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