Documentation
¶
Index ¶
- type PeriHttp
- func (p *PeriHttp) BinaryResponse(httpStatusCode int, data []byte) error
- func (p *PeriHttp) EmptyResponse(httpStatusCode int)
- func (p *PeriHttp) FlushResp(w http.ResponseWriter)
- func (p *PeriHttp) IsAuthorized(role rbac.Role) bool
- func (p *PeriHttp) JsonResponse(httpStatusCode int, jsonObject any) error
- func (p *PeriHttp) ReadBody() ([]byte, error)
- func (p *PeriHttp) Req() *http.Request
- func (p *PeriHttp) Resp() http.ResponseWriter
- func (p *PeriHttp) Role() rbac.Role
- func (p *PeriHttp) SetCookie(cookie *http.Cookie)
- func (p *PeriHttp) SetReq(r *http.Request)
- func (p *PeriHttp) SetResp(w http.ResponseWriter)
- func (p *PeriHttp) SetRole(role rbac.Role)
- func (p *PeriHttp) TextResponse(httpStatusCode int, textMessage any) error
- func (p *PeriHttp) Vars() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeriHttp ¶
type PeriHttp struct {
// contains filtered or unexported fields
}
func (*PeriHttp) BinaryResponse ¶
func (*PeriHttp) EmptyResponse ¶
func (*PeriHttp) FlushResp ¶
func (p *PeriHttp) FlushResp(w http.ResponseWriter)
func (*PeriHttp) JsonResponse ¶
func (*PeriHttp) Resp ¶
func (p *PeriHttp) Resp() http.ResponseWriter
func (*PeriHttp) SetResp ¶
func (p *PeriHttp) SetResp(w http.ResponseWriter)
func (*PeriHttp) TextResponse ¶
Click to show internal directories.
Click to hide internal directories.