options

package
v7.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package options 构建路由的参数

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

type CORS struct {
	Origins []string

	AllowHeaders []string

	ExposedHeaders []string

	MaxAge int

	AllowCredentials bool
	// contains filtered or unexported fields
}

func (*CORS) Handle

func (c *CORS) Handle(node types.Node, wh http.Header, r *http.Request)

type Option

type Option func(*Options)

type Options

type Options struct {
	Lock         bool
	CORS         *CORS
	Interceptors *syntax.Interceptors
	URLDomain    string
	RecoverFunc  RecoverFunc
}

func Build

func Build(o ...Option) (*Options, error)

type RecoverFunc

type RecoverFunc func(http.ResponseWriter, any)

Jump to

Keyboard shortcuts

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