constants

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetEmpty      = ""
	NetUDP        = "udp"
	NetUDP4       = "udp4"
	NetUDP6       = "udp6"
	NetTCP        = "tcp"
	NetTCP4       = "tcp4"
	NetTCP6       = "tcp6"
	NetUnix       = "unix"
	NetUnixgram   = "unixgram"
	NetUnixPacket = "unixpacket"
)

NetEmpty et al are networks for net.Dial() and friends.

View Source
const (
	SchemeHTTP  = "http"
	SchemeHTTPS = "https"
	SchemeFile  = "file"
)

SchemeHTTP et al are URL schemes.

View Source
const (
	SchemeEmpty        = ""
	SchemePassthrough  = "passthrough"
	SchemeUnix         = "unix"
	SchemeUnixAbstract = "unix-abstract"
	SchemeIP           = "ip"
	SchemeDNS          = "dns"
	SchemeSRV          = "srv"
	SchemeZK           = "zk"
	SchemeEtcd         = "etcd"
	SchemeATC          = "atc"
)

SchemeEmpty et al are Target schemes.

View Source
const (
	PortDNS   = "53"
	PortHTTP  = "80"
	PortHTTPS = "443"
	PortZK    = "2181"
	PortEtcd  = "2379"
	PortATC   = "2987"
)

PortDNS et al are TCP or UDP port numbers, in decimal string form.

View Source
const (
	SubsystemAdmin = "admin"
	SubsystemProm  = "prom"
	SubsystemHTTP  = "http"
	SubsystemHTTPS = "https"
	SubsystemGRPC  = "grpc"
)

SubsystemAdmin et al are server subsystem names.

View Source
const (
	Status1XX = "1XX"
	Status100 = "100"
	Status101 = "101"
	Status2XX = "2XX"
	Status200 = "200"
	Status204 = "204"
	Status206 = "206"
	Status3XX = "3XX"
	Status301 = "301"
	Status302 = "302"
	Status304 = "304"
	Status307 = "307"
	Status308 = "308"
	Status4XX = "4XX"
	Status400 = "400"
	Status401 = "401"
	Status403 = "403"
	Status404 = "404"
	Status405 = "405"
	Status5XX = "5XX"
	Status500 = "500"
	Status503 = "503"
)

HTTP status codes (as strings).

View Source
const (
	HeaderAllow        = "allow"
	HeaderCacheControl = "cache-control"
	HeaderContentEnc   = "content-encoding"
	HeaderContentLang  = "content-language"
	HeaderContentLen   = "content-length"
	HeaderCSP          = "content-security-policy"
	HeaderContentType  = "content-type"
	HeaderDigest       = "digest"
	HeaderETag         = "etag"
	HeaderForwarded    = "forwarded"
	HeaderLastModified = "last-modified"
	HeaderLocation     = "location"
	HeaderOrigin       = "origin"
	HeaderReferer      = "referer"
	HeaderRoxyFrontend = "roxy-frontend"
	HeaderServer       = "server"
	HeaderSourceMap    = "sourcemap"
	HeaderHSTS         = "strict-transport-security"
	HeaderUserAgent    = "user-agent"
	HeaderXCTO         = "x-content-type-options"
	HeaderXFwdFor      = "x-forwarded-for"
	HeaderXFwdHost     = "x-forwarded-host"
	HeaderXFwdIP       = "x-forwarded-ip"
	HeaderXFwdProto    = "x-forwarded-proto"
	HeaderXXSSP        = "x-xss-protection"
	HeaderXID          = "xid"
)

HTTP headers.

View Source
const (
	PseudoHeaderScheme    = ":scheme"
	PseudoHeaderMethod    = ":method"
	PseudoHeaderAuthority = ":authority"
	PseudoHeaderPath      = ":path"
	PseudoHeaderStatus    = ":status"
)

HTTP/2 pseudo-headers.

View Source
const (
	CacheControlNoCache    = "no-cache"
	CacheControl1Day       = "max-age=86400, must-revalidate"
	CacheControlPublic1Day = "public, max-age=86400, must-revalidate"
)

Cache-Control header values.

View Source
const (
	ContentTypeTextPlain      = "text/plain; charset=utf-8"
	ContentTypeTextHTML       = "text/html; charset=utf-8"
	ContentTypeAppOctetStream = "application/octet-stream"
	ContentTypeAppJS          = "application/javascript"
	ContentTypeTextJS         = "text/javascript"
)

Content-Type header values.

View Source
const (
	ContentLangEN   = "en"
	ContentLangENUS = "en-US"
)

Content-Language header values.

View Source
const (
	AllowGET     = "OPTIONS, GET, HEAD"
	AllowGETPOST = "OPTIONS, GET, HEAD, POST"
	AllowGPD     = "OPTIONS, GET, HEAD, PUT, DELETE"
	AllowGPPD    = "OPTIONS, GET, HEAD, POST, PUT, DELETE"
)

Allow header values.

View Source
const (
	MethodOTHER = "OTHER"
)

HTTP methods.

View Source
const NullString = "null"

NullString is the string representation of the JSON null value.

Variables

View Source
var NullBytes = []byte("null")

NullBytes is the []byte representation of the JSON null value.

Functions

func IsNetTCP

func IsNetTCP(str string) bool

IsNetTCP returns true iff its argument is an AF_INET/AF_INET6 network with IPPROTO_TCP.

func IsNetUDP

func IsNetUDP(str string) bool

IsNetUDP returns true iff its argument is an AF_INET/AF_INET6 network with IPPROTO_UDP.

func IsNetUnix

func IsNetUnix(str string) bool

IsNetUnix returns true iff its argument is an AF_UNIX network.

Types

This section is empty.

Jump to

Keyboard shortcuts

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