routes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(router *mux.Router, routeList []*Route)

Install registers a new route with a matcher for the URL path.

func WithCORS

func WithCORS(router *mux.Router) http.Handler

WithCORS provides Cross-Origin Resource Sharing middleware.

Types

type Route

type Route struct {
	Method       string
	Path         string
	Handler      http.HandlerFunc
	AuthRequired bool
}

Route provides the route instance for routing operation.

func NewAuthRoutes

func NewAuthRoutes(authHandlers handlers.AuthHandlers) []*Route

NewAuthRoutes provides the routing process for authentication.

func NewCatRoutes

func NewCatRoutes(catHandlers handlers.CatHandlers) []*Route

NewCatRoutes provides the routing process for categorization.

func NewCatzeRoutes

func NewCatzeRoutes(catzeHandlers handlers.CatzeHandlers) []*Route

NewCatzeRoutes provides the routing process for categorizer.

func NewCrawlRoutes

func NewCrawlRoutes(crawlHandlers handlers.CrawlHandlers) []*Route

NewCrawlRoutes provides the routing process for crawler.

Jump to

Keyboard shortcuts

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