Documentation
¶
Index ¶
- Variables
- type Accept
- type AcceptEncoding
- type AcceptLanguage
- type Authorization
- type CacheControl
- func (cacheControl *CacheControl) MaxAge() (int, error)
- func (cacheControl *CacheControl) MaxStale() (int, bool, error)
- func (cacheControl *CacheControl) MinFresh() (int, error)
- func (cacheControl *CacheControl) MustRevalidate() bool
- func (cacheControl *CacheControl) MustUnderstand() bool
- func (cacheControl *CacheControl) NoCache() bool
- func (cacheControl *CacheControl) NoCacheFieldNames() []string
- func (cacheControl *CacheControl) NoStore() bool
- func (cacheControl *CacheControl) NoTransform() bool
- func (cacheControl *CacheControl) OnlyIfCached() bool
- func (cacheControl *CacheControl) Private() bool
- func (cacheControl *CacheControl) PrivateFieldNames() []string
- func (cacheControl *CacheControl) ProxyRevalidate() bool
- func (cacheControl *CacheControl) Public() bool
- func (cacheControl *CacheControl) SMaxAge() (int, error)
- type CacheControlDirective
- type ContentDisposition
- type ContentNegotiation
- type ContentType
- type CorsConfiguration
- type ETag
- type Encoding
- type Forwarded
- type ForwardedElement
- type HttpContext
- type LanguageQ
- type LanguageTag
- type MediaRange
- type MediaType
- type RetryAfter
- type RobotsTxt
- type RobotsTxtGroup
- type SecurityTxt
- type ServerMediaRange
- type StrictTransportSecurityPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDirectiveNotPresent = errors.New("directive not present")
Functions ¶
This section is empty.
Types ¶
type Accept ¶
type Accept struct {
MediaRanges []*MediaRange
Raw string
}
func (*Accept) GetPriorityOrderedEncodings ¶
func (accept *Accept) GetPriorityOrderedEncodings() []*MediaRange
type AcceptEncoding ¶
func (*AcceptEncoding) GetPriorityOrderedEncodings ¶
func (acceptEncoding *AcceptEncoding) GetPriorityOrderedEncodings() []*Encoding
type AcceptLanguage ¶
func (*AcceptLanguage) GetPriorityOrderedLanguages ¶
func (acceptLanguage *AcceptLanguage) GetPriorityOrderedLanguages() []*LanguageQ
type Authorization ¶
func (*Authorization) String ¶
func (authorization *Authorization) String() string
type CacheControl ¶
type CacheControl struct {
Directives []*CacheControlDirective
Raw string
}
func (*CacheControl) MaxAge ¶
func (cacheControl *CacheControl) MaxAge() (int, error)
func (*CacheControl) MinFresh ¶
func (cacheControl *CacheControl) MinFresh() (int, error)
func (*CacheControl) MustRevalidate ¶
func (cacheControl *CacheControl) MustRevalidate() bool
func (*CacheControl) MustUnderstand ¶
func (cacheControl *CacheControl) MustUnderstand() bool
func (*CacheControl) NoCache ¶
func (cacheControl *CacheControl) NoCache() bool
func (*CacheControl) NoCacheFieldNames ¶
func (cacheControl *CacheControl) NoCacheFieldNames() []string
func (*CacheControl) NoStore ¶
func (cacheControl *CacheControl) NoStore() bool
func (*CacheControl) NoTransform ¶
func (cacheControl *CacheControl) NoTransform() bool
func (*CacheControl) OnlyIfCached ¶
func (cacheControl *CacheControl) OnlyIfCached() bool
func (*CacheControl) Private ¶
func (cacheControl *CacheControl) Private() bool
func (*CacheControl) PrivateFieldNames ¶
func (cacheControl *CacheControl) PrivateFieldNames() []string
func (*CacheControl) ProxyRevalidate ¶
func (cacheControl *CacheControl) ProxyRevalidate() bool
func (*CacheControl) Public ¶
func (cacheControl *CacheControl) Public() bool
func (*CacheControl) SMaxAge ¶
func (cacheControl *CacheControl) SMaxAge() (int, error)
type CacheControlDirective ¶
type ContentDisposition ¶
type ContentNegotiation ¶
type ContentNegotiation struct {
Accept *Accept
AcceptEncoding *AcceptEncoding
AcceptLanguage *AcceptLanguage
NegotiatedAccept string
NegotiatedAcceptEncoding string
}
type ContentType ¶
type ContentType struct {
MediaType
}
type CorsConfiguration ¶
type Forwarded ¶
type Forwarded struct {
Elements []*ForwardedElement
}
Forwarded represents the parsed Forwarded HTTP header as defined in RFC 7239. The header can contain multiple elements, each potentially originating from different proxies in the request chain.
type ForwardedElement ¶
type ForwardedElement struct {
For string
By string
Host string
Proto string
// Extensions contain any non-standard parameters
Extensions map[string]string
}
ForwardedElement represents a single forwarded element containing multiple parameters. Standard parameters defined in RFC 7239 are:
- For: identifies the node making the request to the proxy
- By: identifies the interface where the request came in to the proxy
- Host: the original value of the Host request header
- Proto: indicates the protocol used to make the request (http or https)
type HttpContext ¶
type HttpContext struct {
Request *http.Request
RequestBody []byte
Response *http.Response
ResponseBody []byte
Reporting *schema.HttpReporting
TlsContext *motmedelTlsTypes.TlsContext
User *schema.User
Extra []*HttpContext
LocalAddr net.Addr
RemoteAddr net.Addr
}
type LanguageQ ¶
type LanguageQ struct {
Tag *LanguageTag
Q float32
}
type LanguageTag ¶
type MediaRange ¶
func (*MediaRange) GetFullType ¶
func (mediaRange *MediaRange) GetFullType(normalize bool) string
func (*MediaRange) GetParameterMap ¶
func (mediaRange *MediaRange) GetParameterMap(normalize bool) map[string]string
func (*MediaRange) GetStructuredSyntaxName ¶
func (mediaRange *MediaRange) GetStructuredSyntaxName(normalize bool) string
type MediaType ¶
func (*MediaType) GetFullType ¶
func (*MediaType) GetParametersMap ¶
func (*MediaType) GetStructuredSyntaxName ¶
type RetryAfter ¶
type RobotsTxt ¶
type RobotsTxt struct {
Groups []*RobotsTxtGroup
}
type RobotsTxtGroup ¶
type RobotsTxtGroup struct {
UserAgents []string
Disallowed []string
Allowed []string
OtherRecords [][2]string
}
func (*RobotsTxtGroup) String ¶
func (robotsTxtGroup *RobotsTxtGroup) String() string
type SecurityTxt ¶
type SecurityTxt struct {
}
type ServerMediaRange ¶
func (*ServerMediaRange) GetFullType ¶
func (serverMediaRange *ServerMediaRange) GetFullType(normalize bool) string
func (*ServerMediaRange) GetStructuredSyntaxName ¶
func (serverMediaRange *ServerMediaRange) GetStructuredSyntaxName(normalize bool) string
Click to show internal directories.
Click to hide internal directories.