Documentation ¶
Index ¶
- Variables
- type HttpCookie
- func (t *HttpCookie) FromHttp(cookie []*http.Cookie)
- func (t *HttpCookie) Get(key string) string
- func (t *HttpCookie) GetAsMap() map[string]string
- func (t *HttpCookie) Set(key string, value string, path string, expires time.Duration)
- func (t *HttpCookie) ToHttp(domain string, sameSite string, httpOnly bool, secure bool) []string
- type HttpCtx
- func (t *HttpCtx) Fill(request *http.Request)
- func (t *HttpCtx) GetRequest() interfaces.IRequest
- func (t *HttpCtx) GetResponse() interfaces.IResponse
- func (t *HttpCtx) GetRouterValue(key string) string
- func (t *HttpCtx) GetUserValue(key string) (interface{}, error)
- func (t *HttpCtx) PushUserValue(key string, val interface{})
- func (t *HttpCtx) SetRouteProps(values map[string]string)
- type HttpHeader
- type HttpRequest
- func (t *HttpRequest) Fill(request *http.Request)
- func (t *HttpRequest) GetBody() io.ReadCloser
- func (t *HttpRequest) GetBodySize() int64
- func (t *HttpRequest) GetCookie() interfaces.ICookie
- func (t *HttpRequest) GetHeader() interfaces.IHeader
- func (t *HttpRequest) GetMethod() string
- func (t *HttpRequest) GetQuery() interfaces.IQuery
- func (t *HttpRequest) GetRemoteHost() string
- func (t *HttpRequest) GetRemoteIP() string
- func (t *HttpRequest) GetURI() string
- func (t *HttpRequest) GetUserAgent() string
- type HttpResponse
- func (t *HttpResponse) Clear()
- func (t *HttpResponse) Cookie() interfaces.ICookie
- func (t *HttpResponse) GetBody() []byte
- func (t *HttpResponse) GetStatus() int
- func (t *HttpResponse) Header() interfaces.IHeader
- func (t *HttpResponse) SetBody(data []byte)
- func (t *HttpResponse) SetStatus(status int)
- type KafkaCtx
- func (t *KafkaCtx) Fill(msg *kafka.Message)
- func (t *KafkaCtx) GetRequest() interfaces.IRequest
- func (t *KafkaCtx) GetResponse() interfaces.IResponse
- func (t *KafkaCtx) GetRouterValue(key string) string
- func (t *KafkaCtx) GetUserValue(key string) (interface{}, error)
- func (t *KafkaCtx) PushUserValue(key string, val interface{})
- func (t *KafkaCtx) SetRouteProps(values map[string]string)
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpCtxPool = sync.Pool{ New: func() interface{} { return &HttpCtx{ request: &HttpRequest{}, response: &HttpResponse{}, values: make(map[string]interface{}, 10), routerValues: nil, } }, }
View Source
var KafkaCtxPool = sync.Pool{ New: func() interface{} { return &KafkaCtx{ request: &kafkaRequest{}, response: &HttpResponse{}, values: make(map[string]interface{}, 10), } }, }
Functions ¶
This section is empty.
Types ¶
type HttpCookie ¶
type HttpCookie struct {
// contains filtered or unexported fields
}
func (*HttpCookie) FromHttp ¶
func (t *HttpCookie) FromHttp(cookie []*http.Cookie)
func (*HttpCookie) Get ¶
func (t *HttpCookie) Get(key string) string
func (*HttpCookie) GetAsMap ¶
func (t *HttpCookie) GetAsMap() map[string]string
type HttpCtx ¶
type HttpCtx struct {
// contains filtered or unexported fields
}
func (*HttpCtx) GetRequest ¶
func (t *HttpCtx) GetRequest() interfaces.IRequest
func (*HttpCtx) GetResponse ¶
func (t *HttpCtx) GetResponse() interfaces.IResponse
func (*HttpCtx) GetRouterValue ¶ added in v0.1.0
func (*HttpCtx) GetUserValue ¶
func (*HttpCtx) PushUserValue ¶
func (*HttpCtx) SetRouteProps ¶ added in v0.1.0
type HttpHeader ¶
func (*HttpHeader) GetAsMap ¶
func (t *HttpHeader) GetAsMap() map[string][]string
type HttpRequest ¶
type HttpRequest struct {
// contains filtered or unexported fields
}
func (*HttpRequest) Fill ¶
func (t *HttpRequest) Fill(request *http.Request)
func (*HttpRequest) GetBody ¶
func (t *HttpRequest) GetBody() io.ReadCloser
func (*HttpRequest) GetBodySize ¶
func (t *HttpRequest) GetBodySize() int64
func (*HttpRequest) GetCookie ¶
func (t *HttpRequest) GetCookie() interfaces.ICookie
func (*HttpRequest) GetHeader ¶
func (t *HttpRequest) GetHeader() interfaces.IHeader
func (*HttpRequest) GetMethod ¶
func (t *HttpRequest) GetMethod() string
func (*HttpRequest) GetQuery ¶
func (t *HttpRequest) GetQuery() interfaces.IQuery
func (*HttpRequest) GetRemoteHost ¶
func (t *HttpRequest) GetRemoteHost() string
func (*HttpRequest) GetRemoteIP ¶
func (t *HttpRequest) GetRemoteIP() string
func (*HttpRequest) GetURI ¶
func (t *HttpRequest) GetURI() string
func (*HttpRequest) GetUserAgent ¶
func (t *HttpRequest) GetUserAgent() string
type HttpResponse ¶
func (*HttpResponse) Clear ¶
func (t *HttpResponse) Clear()
func (*HttpResponse) Cookie ¶
func (t *HttpResponse) Cookie() interfaces.ICookie
func (*HttpResponse) GetBody ¶
func (t *HttpResponse) GetBody() []byte
func (*HttpResponse) GetStatus ¶
func (t *HttpResponse) GetStatus() int
func (*HttpResponse) Header ¶
func (t *HttpResponse) Header() interfaces.IHeader
func (*HttpResponse) SetBody ¶
func (t *HttpResponse) SetBody(data []byte)
func (*HttpResponse) SetStatus ¶
func (t *HttpResponse) SetStatus(status int)
type KafkaCtx ¶
type KafkaCtx struct {
// contains filtered or unexported fields
}
func (*KafkaCtx) GetRequest ¶
func (t *KafkaCtx) GetRequest() interfaces.IRequest
func (*KafkaCtx) GetResponse ¶
func (t *KafkaCtx) GetResponse() interfaces.IResponse
func (*KafkaCtx) GetRouterValue ¶ added in v0.1.0
func (*KafkaCtx) GetUserValue ¶
func (*KafkaCtx) PushUserValue ¶
func (*KafkaCtx) SetRouteProps ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.