constants

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default      = "default"
	AUTH_USER_ID = "X-Auth-User-Id"
)
View Source
const (
	ContentTypeName            = "Content-Type"
	ContentTypeApplicationJSON = "application/json;charset=utf-8"
	ContentTypeTextPlain       = "text/plain;charset=utf-8"
	ContentTypeUrlencoded      = "application/x-www-form-urlencoded;charset=utf-8"
)
View Source
const (
	HeaderRequestId    = "X-Request-Id"
	HeaderRemoteHeader = "X-Remote-Addr"
	HeaderSourceIp     = "X-Src-Ip"
	HeaderSourceName   = "X-Src-Name"
)

Variables

Functions

This section is empty.

Types

type Header interface {
	Get(key string) string
}

type HeaderGetter added in v0.7.0

type HeaderGetter interface {
	Key() string
	Get(headers Header) string
}

type StrHeaderGetter added in v0.7.0

type StrHeaderGetter string
const (
	HeaderXForwardedFor StrHeaderGetter = "X-Forwarded-For"
	HeaderAuthorization StrHeaderGetter = "Authorization"
	HeaderReferer       StrHeaderGetter = "Referer"
)

func (StrHeaderGetter) Get added in v0.7.0

func (s StrHeaderGetter) Get(headers Header) string

func (StrHeaderGetter) Key added in v0.7.0

func (s StrHeaderGetter) Key() string

Jump to

Keyboard shortcuts

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