package
0.0.0-20190422025920-beccf3fe4313
Repository: https://github.com/changwh/go-common.git
Documentation: pkg.go.dev

# README

net/http/blademaster

Blazing fast http framework for humans

项目简介

来自 bilibili 主站技术部的 http 框架,融合主站技术部的核心科技,带来如飞一般的体验。

项目特点
  • 模块化设计,核心足够轻量
编译环境
  • 请只用 Golang v1.8.x 以上版本编译执行
依赖包
  • No other dependency

# Packages

No description provided by the author
No description provided by the author
Package render is a generated protocol buffer package.
Package tests is a generated protocol buffer package.

# Functions

CORS returns the location middleware with default configuration.
CSRF returns the csrf middleware to prevent invalid cross site request.
Default returns an Engine instance with the Recovery, Logger and CSRF middleware already attached.
DefaultServer returns an Engine instance with the Recovery, Logger and CSRF middleware already attached.
Logger is logger middleware.
Mobile is the default handler.
New returns a new blank Engine instance without any middleware attached.
NewClient new a http client.
NewServer returns a new blank Engine instance without any middleware attached.
NewTraceTracesport NewTraceTracesport.
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
Trace is trace middleware.

# Constants

PlatAndroid is int8 for android.
PlatAndroidB is int8 for Android Blue.
PlatAndroidG is int8 for Android Global.
PlatAndroidI is int8 for Android Global.
PlatAndroidTV is int8 for AndroidTV Global.
PlatAndroidTVYST is int8 for AndroidTV_YST Global.
PlatBilistudio is int8 for bilistudio.
PlatIPad is int8 for ipad.
PlatIPadI is int8 for IPAD Global.
PlatIPhone is int8 for iphone.
PlatIPhoneB is int8 for Ios Blue.
PlatIPhoneI is int8 for Iphone Global.
PlatWPhone is int8 for wphone.

# Structs

App bilibili intranet authorization.
Client is http client.
ClientConfig is http client conf.
Context is the most important part.
CORSConfig represents all available options for the middleware.
Device is the mobile device model.
Engine is the framework's instance, it contains the muxer, middleware and configuration settings.
MethodConfig is.
RouterGroup is used internally to configure router, a RouterGroup is associated with a prefix and an array of handlers (middleware).
ServerConfig is the bm server config model.
TraceTransport wraps a RoundTripper.

# Interfaces

Handler responds to an HTTP request.
IRouter http router framework interface.
IRoutes http router interface.

# Type aliases

HandlerFunc http request handler function.