Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TopicsAccessValidator ¶
Types ¶
type AccessValidator ¶
type AccessValidatorFn ¶
type AccessValidatorFn = func(r *http.Request, channels ...string) (*AccessValidator, error)
type Request ¶
type Request struct {
// RemoteAddr contains ip address of client, make sure to check X-Real-Ip and X-Forwarded-For for real client address.
RemoteAddr string `json:"remoteAddr"`
// Protocol includes HTTP protocol version.
Protocol string `json:"protocol"`
// Method contains name of HTTP method used for the request.
Method string `json:"method"`
// URI contains full request URI with scheme and query.
URI string `json:"uri"`
// Header contains list of request headers.
Header http.Header `json:"headers"`
// Cookies contains list of request cookies.
Cookies map[string]string `json:"cookies"`
// RawQuery contains non parsed query string (to be parsed on php end).
RawQuery string `json:"rawQuery"`
// Parsed indicates that request body has been parsed on RR end.
Parsed bool `json:"parsed"`
// Attributes can be set by chained mdwr to safely pass value from Golang to PHP. See: GetAttribute, SetAttribute functions.
Attributes map[string]interface{} `json:"attributes"`
}
Request maps net/http requests to PSR7 compatible structure and managed state of temporary uploaded files.
Click to show internal directories.
Click to hide internal directories.