http

package
v0.0.0-...-24cf382 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet     = "GET"     // RFC 7231, 4.3.1
	MethodHead    = "HEAD"    // RFC 7231, 4.3.2
	MethodPost    = "POST"    // RFC 7231, 4.3.3
	MethodPut     = "PUT"     // RFC 7231, 4.3.4
	MethodPatch   = "PATCH"   // RFC 5789
	MethodDelete  = "DELETE"  // RFC 7231, 4.3.5
	MethodConnect = "CONNECT" // RFC 7231, 4.3.6
	MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
	MethodTrace   = "TRACE"   // RFC 7231, 4.3.8

)

Http Methods

Variables

This section is empty.

Functions

func AddBulkHttpGroups

func AddBulkHttpGroups(httpGroups []HttpGroup) error

AddBulkHttpGroups - add bulk http groups to the server

func AddBulkHttpRoutes

func AddBulkHttpRoutes(httpRoutes []HttpRoute) error

AddBulkHttpRoutes - add bulk http routes to the server

func AddHttpGroup

func AddHttpGroup(groupName string, f func(c *fiber.Ctx) error, groups []string, serverName ...string) error

AddHttpGroup - Add group by parameters

func AddHttpGroupByObj

func AddHttpGroupByObj(group HttpGroup) error

AddHttpGroupByObj - add group by HttpGroup obj

func AddHttpRoute

func AddHttpRoute(method string, path string, f func(c *fiber.Ctx) error, routeName string, versions []string, groupNames []string, serverName ...string) error

AddHttpRoute - Add route by parameters

func AddHttpRouteByObj

func AddHttpRouteByObj(httpRoute HttpRoute) error

AddHttpRouteByObj - add route by HttpRoute obj

func AttachHttpErrorHandler

func AttachHttpErrorHandler(f func(ctx *fiber.Ctx, err error) error, serverNames ...string) error

AttachHttpErrorHandler - Attach http error handler to the manager

func GetRouteByName

func GetRouteByName(routeName string, serverName ...string) (*fiber.Route, error)

GetRouteByName - Get route by providing the route name from specific server

Types

type HttpGroup

type HttpGroup struct {
	GroupName string
	F         *func(c *fiber.Ctx) error
	Groups    []string
	Servers   []string
}

HttpGroup - Structure of the group

type HttpRoute

type HttpRoute struct {
	Method     string
	Path       string
	RouteName  string
	Versions   []string
	GroupNames []string
	F          *func(c *fiber.Ctx) error
	Servers    []string
}

HttpRoute - Structure of the route

Jump to

Keyboard shortcuts

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