Documentation
¶
Index ¶
- Constants
- Variables
- func AcquireHeaderCache() map[string][]byte
- func ReleaseApiResponse(ar *ApiResponse)
- func ReleaseApiResponseWOData(ar *ApiResponseWOData)
- func ReleaseHeaderCache(hcache map[string][]byte)
- func RespondPlainWithStatus(c *fiber.Ctx, status int) error
- func RespondWithApiError(status int, msg, desc string, w io.Writer) (e error)
- func RespondWithRandomRelease(code string, w io.Writer) (e error)
- func SetUpSyslogWriter(c *cli.Context) (_ io.Writer, e error)
- type ApiError
- type ApiResponse
- type ApiResponseData
- type ApiResponseWOData
- type ContextKey
- type FastUserValue
- type RequestContentType
Constants ¶
const HTTPAccessLogLevel = zerolog.InfoLevel
Variables ¶
Functions ¶
func AcquireHeaderCache ¶ added in v1.0.15
func ReleaseApiResponse ¶ added in v1.0.8
func ReleaseApiResponse(ar *ApiResponse)
func ReleaseApiResponseWOData ¶ added in v1.0.8
func ReleaseApiResponseWOData(ar *ApiResponseWOData)
func ReleaseHeaderCache ¶ added in v1.0.15
func RespondPlainWithStatus ¶
func RespondWithApiError ¶ added in v1.0.6
func RespondWithRandomRelease ¶ added in v1.0.10
func SetUpSyslogWriter ¶
Types ¶
type ApiError ¶ added in v1.0.6
func (ApiError) MarshalEasyJSON ¶ added in v1.0.6
MarshalEasyJSON supports easyjson.Marshaler interface
func (ApiError) MarshalJSON ¶ added in v1.0.6
MarshalJSON supports json.Marshaler interface
func (*ApiError) UnmarshalEasyJSON ¶ added in v1.0.6
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ApiError) UnmarshalJSON ¶ added in v1.0.6
UnmarshalJSON supports json.Unmarshaler interface
type ApiResponse ¶ added in v1.0.6
type ApiResponse struct { Status bool Data *ApiResponseData Error *ApiError }
func AcquireApiResponse ¶ added in v1.0.8
func AcquireApiResponse() *ApiResponse
func (ApiResponse) MarshalEasyJSON ¶ added in v1.0.6
func (v ApiResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ApiResponse) MarshalJSON ¶ added in v1.0.6
func (v ApiResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ApiResponse) UnmarshalEasyJSON ¶ added in v1.0.6
func (v *ApiResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ApiResponse) UnmarshalJSON ¶ added in v1.0.6
func (v *ApiResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ApiResponseData ¶ added in v1.0.10
type ApiResponseData struct {
Code string
}
func (ApiResponseData) MarshalEasyJSON ¶ added in v1.0.10
func (v ApiResponseData) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ApiResponseData) MarshalJSON ¶ added in v1.0.10
func (v ApiResponseData) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ApiResponseData) UnmarshalEasyJSON ¶ added in v1.0.10
func (v *ApiResponseData) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ApiResponseData) UnmarshalJSON ¶ added in v1.0.10
func (v *ApiResponseData) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ApiResponseWOData ¶ added in v1.0.8
func AcquireApiResponseWOData ¶ added in v1.0.8
func AcquireApiResponseWOData() *ApiResponseWOData
func UnmarshalApiResponse ¶ added in v1.0.6
func UnmarshalApiResponse(payload []byte) (_ *ApiResponseWOData, e error)
func (ApiResponseWOData) MarshalEasyJSON ¶ added in v1.0.8
func (v ApiResponseWOData) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ApiResponseWOData) MarshalJSON ¶ added in v1.0.8
func (v ApiResponseWOData) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ApiResponseWOData) UnmarshalEasyJSON ¶ added in v1.0.8
func (v *ApiResponseWOData) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ApiResponseWOData) UnmarshalJSON ¶ added in v1.0.8
func (v *ApiResponseWOData) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ContextKey ¶
type ContextKey uint8
const ( CKLogger ContextKey = iota CKCliCtx CKAbortFunc CKCache CKGeoIP CKRandomizer )
type RequestContentType ¶
type RequestContentType uint8
const ( CTInvalid RequestContentType = iota CTApplicationUrlencoded CTMultipartFormData )