metadata

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderContentType    = "Content-Type"
	HeaderUserAgent      = "User-Agent"
	HeaderAppkey         = "Appkey"
	HeaderTimestamp      = "Timestamp"
	HeaderSign           = "Sign"
	HeaderNonce          = "Nonce"
	HeaderAcceptLanguage = "Accept-Language"
	HeaderHttpTimeout    = "X-Request-Timeout"
	HeaderHttpTraceId    = "X-Trace-Id"

	DefaultContentTypeJson = "application/json;charset=utf-8"
	DefaultUserAgentVal    = "waterdrop"
	DefaultLocale          = "zh-CN"
	DefaultRequestTimeout  = 10
	DefaultNonceLen        = 16
	DefaultSecretURL       = "/api/app/secret"
	DefaultSkipsURL        = "/api/app/skips"
	DefaultAppkeyLen       = 16

	DefaultMaxBytes = 1 << 20 // 1 MiB
)

Variables

This section is empty.

Functions

func GetTimeout

func GetTimeout(req *http.Request) time.Duration

get timeout from request header similar as grpc

Types

This section is empty.

Jump to

Keyboard shortcuts

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