Documentation ¶
Index ¶
- Constants
- Variables
- func FormFile(r *http.Request, key string) (*multipart.FileHeader, error)
- func FormFiles(r *http.Request, key string, maxMemory int64) ([]*multipart.FileHeader, error)
- func ParseCorrelationID(r *http.Request) (string, error)
- func ParseDateTime(r *http.Request, key string, required bool) (time.Time, error)
- func ParseEnum(r *http.Request, key string, required bool) (string, error)
- func ParseEnumList(r *http.Request, key string) ([]string, error)
- func ParseInt64(r *http.Request, key string, required bool) (int64, error)
- func ParseInt64List(r *http.Request, key string) ([]int64, error)
- func ParseLanguage(r *http.Request) []string
- func ParseNullableBool(r *http.Request, key string) (*bool, error)
- func ParsePageParams(r *http.Request, keyIndex, keySize string) (mrtype.PageParams, error)
- func ParseRangeInt64(r *http.Request, key string) (mrtype.RangeInt64, error)
- func ParseRequiredBool(r *http.Request, key string) (bool, error)
- func ParseSortParams(r *http.Request, keyField, keyDirection string) (mrtype.SortParams, error)
- func ParseStr(r *http.Request, key string, required bool) (string, error)
- func ParseStrList(r *http.Request, key string) ([]string, error)
- func ParseUUID(r *http.Request, key string, required bool) (uuid.UUID, error)
- func ParseUserIP(r *http.Request) (net.IP, error)
Constants ¶
View Source
const ( // HeaderKeyCorrelationID - название заголовка содержащего ID запроса. // sample: f7479171-83d2-4f64-84ac-892f8c0aaf48. HeaderKeyCorrelationID = "X-Correlation-Id" )
View Source
const (
// HeaderKeyIdempotencyKey - название заголовка содержащего ключ идемпотентности операции.
HeaderKeyIdempotencyKey = "X-Idempotency-Key"
)
Variables ¶
View Source
var ( // ErrHttpRequestCorrelationID - header 'X-Correlation-Id' contains incorrect value. ErrHttpRequestCorrelationID = mrerr.NewProto( "errHttpRequestCorrelationID", mrerr.ErrorKindInternal, "header 'X-Correlation-Id' contains incorrect value '{{ .value }}'") // ErrHttpRequestUserIP - userIP is not IP:port. ErrHttpRequestUserIP = mrerr.NewProto( "errHttpRequestUserIP", mrerr.ErrorKindInternal, "userIP '{{ .value }}' is not IP:port") // ErrHttpRequestParseUserIP - userIP contains incorrect value. ErrHttpRequestParseUserIP = mrerr.NewProto( "errHttpRequestParseUserIP", mrerr.ErrorKindInternal, "userIP contains incorrect value '{{ .value }}'") )
Functions ¶
func ParseCorrelationID ¶
ParseCorrelationID - comment func.
func ParseDateTime ¶
ParseDateTime - comment func.
func ParseEnumList ¶
ParseEnumList - comment func.
func ParseInt64 ¶
ParseInt64 - comment func.
func ParseInt64List ¶
ParseInt64List - comment func.
func ParseNullableBool ¶
ParseNullableBool - comment func.
func ParsePageParams ¶
ParsePageParams - comment func.
func ParseRangeInt64 ¶
ParseRangeInt64 - comment func.
func ParseRequiredBool ¶
ParseRequiredBool - comment func.
func ParseSortParams ¶
ParseSortParams - comment func.
func ParseStrList ¶
ParseStrList - comment func.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.