package
1.4.3
Repository: https://github.com/gotid/god.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

MustNewServer 返回一个给定配置和运行选项的服务器,遇错退出。 注意,后面的 Option 会覆盖前面的。.
NewServer 返回一个给定配置和运行选项的服务器。 注意,后面的 Option 会覆盖前面的。.
ToMiddleware 将给定的处理器转为中间件 Middleware。.
WithChain 使用给定的中间件链 chain.Chain 代替默认的。 JWT 鉴权中间件和通过 srv.Use 添加的中间件将被附带过去。.
WithCors 启用给定来源的 CORS,默认允许所有来源(*)。.
WithCustomCors 启用给定来源的 CORS,默认允许所有来源(*)。 fn 允许调用者自定义响应。.
WithJwt 使用给定的秘钥进行 Jwt 身份鉴权。.
WithJwtTransition 启用新老秘钥过度的 Jwt 身份鉴权。 这意味着新旧秘钥会在一段时间内协同工作。.
WithMaxBytes 自定义最大请求字节数。.
WithMiddleware 添加一个给定的中间件到一组给定的路由上。.
WithMiddlewares 添加一组给定的中间件到一组给定的路由上。.
WithNotAllowedHandler 自定义不允许访问处理器。.
WithNotFoundHandler 自定义未找到处理器。.
WithPrefix 添加组名作为路由路径的前缀。.
WithPriority 区分路由优先级。.
WithRouter 自定义服务器的路由器。.
WithSignature 启用内容签名校验。.
WithTimeout 自定义超时时长。.
WithTLSConfig 设置 https 配置。.
WithUnauthorizedCallback 设置未授权回调函数。.
WithUnsignedCallback 设置签名失败回调函数。.

# Variables

ErrSignatureConfig 指示签名配置的错误。.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author