aboutsummaryrefslogtreecommitdiffstats
path: root/library/go/httputil/headers/content.go
diff options
context:
space:
mode:
authorqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
committerqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
commit22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch)
treebffa27765faf54126ad44bcafa89fadecb7a73d7 /library/go/httputil/headers/content.go
parent332b99e2173f0425444abb759eebcb2fafaa9209 (diff)
downloadydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz
validate canons without yatest_common
Diffstat (limited to 'library/go/httputil/headers/content.go')
-rw-r--r--library/go/httputil/headers/content.go57
1 files changed, 57 insertions, 0 deletions
diff --git a/library/go/httputil/headers/content.go b/library/go/httputil/headers/content.go
new file mode 100644
index 00000000000..b92e013cc32
--- /dev/null
+++ b/library/go/httputil/headers/content.go
@@ -0,0 +1,57 @@
+package headers
+
+type ContentType string
+
+// String implements stringer interface
+func (ct ContentType) String() string {
+ return string(ct)
+}
+
+type ContentEncoding string
+
+// String implements stringer interface
+func (ce ContentEncoding) String() string {
+ return string(ce)
+}
+
+const (
+ ContentTypeKey = "Content-Type"
+ ContentLength = "Content-Length"
+ ContentEncodingKey = "Content-Encoding"
+
+ ContentTypeAny ContentType = "*/*"
+
+ TypeApplicationJSON ContentType = "application/json"
+ TypeApplicationXML ContentType = "application/xml"
+ TypeApplicationOctetStream ContentType = "application/octet-stream"
+ TypeApplicationProtobuf ContentType = "application/protobuf"
+ TypeApplicationMsgpack ContentType = "application/msgpack"
+ TypeApplicationXSolomonSpack ContentType = "application/x-solomon-spack"
+
+ EncodingAny ContentEncoding = "*"
+ EncodingZSTD ContentEncoding = "zstd"
+ EncodingLZ4 ContentEncoding = "lz4"
+ EncodingGZIP ContentEncoding = "gzip"
+ EncodingDeflate ContentEncoding = "deflate"
+
+ TypeTextPlain ContentType = "text/plain"
+ TypeTextHTML ContentType = "text/html"
+ TypeTextCSV ContentType = "text/csv"
+ TypeTextCmd ContentType = "text/cmd"
+ TypeTextCSS ContentType = "text/css"
+ TypeTextXML ContentType = "text/xml"
+ TypeTextMarkdown ContentType = "text/markdown"
+
+ TypeImageAny ContentType = "image/*"
+ TypeImageJPEG ContentType = "image/jpeg"
+ TypeImageGIF ContentType = "image/gif"
+ TypeImagePNG ContentType = "image/png"
+ TypeImageSVG ContentType = "image/svg+xml"
+ TypeImageTIFF ContentType = "image/tiff"
+ TypeImageWebP ContentType = "image/webp"
+
+ TypeVideoMPEG ContentType = "video/mpeg"
+ TypeVideoMP4 ContentType = "video/mp4"
+ TypeVideoOgg ContentType = "video/ogg"
+ TypeVideoWebM ContentType = "video/webm"
+)