Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: impl/memory/mail_static_lists.go

Issue 1525923002: Implement Mail service. (Closed) Base URL: https://github.com/luci/gae.git@filter_user
Patch Set: tests and words Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « impl/memory/mail.go ('k') | impl/memory/mail_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package memory
6
7 import (
8 "github.com/luci/luci-go/common/stringset"
9 )
10
11 // all of these constants were imported on Mon Dec 14 18:18:00 PST 2015 from
12 // https://cloud.google.com/appengine/docs/go/mail/
13
14 var okHeaders = stringset.NewFromSlice(
15 "In-Reply-To",
16 "List-Id",
17 "List-Unsubscribe",
18 "On-Behalf-Of",
19 "References",
20 "Resent-Date",
21 "Resent-From",
22 "Resent-To",
23 )
24
25 var okMimeTypes = stringset.NewFromSlice(
26 "application/msword",
27 "application/pdf",
28 "application/rss+xml",
29 "application/vnd.google-earth.kml+xml",
30 "application/vnd.google-earth.kmz",
31 "application/vnd.ms-excel",
32 "application/vnd.ms-powerpoint",
33 "application/vnd.oasis.opendocument.presentation",
34 "application/vnd.oasis.opendocument.spreadsheet",
35 "application/vnd.oasis.opendocument.text",
36 "application/vnd.sun.xml.calc",
37 "application/vnd.sun.xml.writer",
38 "application/x-gzip",
39 "application/zip",
40 "audio/basic",
41 "audio/flac",
42 "audio/mid",
43 "audio/mp4",
44 "audio/mpeg",
45 "audio/ogg",
46 "audio/x-aiff",
47 "audio/x-wav",
48 "image/gif",
49 "image/jpeg",
50 "image/png",
51 "image/tiff",
52 "image/vnd.wap.wbmp",
53 "image/x-ms-bmp",
54 "text/calendar",
55 "text/comma-separated-values",
56 "text/css",
57 "text/html",
58 "text/plain",
59 "text/x-vcard",
60 "video/mp4",
61 "video/mpeg",
62 "video/ogg",
63 "video/quicktime",
64 "video/x-msvideo",
65 )
66
67 var badExtensions = stringset.NewFromSlice(
68 "ade",
69 "adp",
70 "bat",
71 "chm",
72 "cmd",
73 "com",
74 "cpl",
75 "exe",
76 "hta",
77 "ins",
78 "isp",
79 "jse",
80 "lib",
81 "mde",
82 "msc",
83 "msp",
84 "mst",
85 "pif",
86 "scr",
87 "sct",
88 "shb",
89 "sys",
90 "vb",
91 "vbe",
92 "vbs",
93 "vxd",
94 "wsc",
95 "wsf",
96 "wsh",
97 )
98
99 var extensionMapping = map[string]string{
100 "aif": "audio/x-aiff",
101 "aifc": "audio/x-aiff",
102 "aiff": "audio/x-aiff",
103 "asc": "text/plain",
104 "au": "audio/basic",
105 "avi": "video/x-msvideo",
106 "bmp": "image/x-ms-bmp",
107 "css": "text/css",
108 "csv": "text/comma-separated-values",
109 "diff": "text/plain",
110 "doc": "application/msword",
111 "docx": "application/msword",
112 "flac": "audio/flac",
113 "gif": "image/gif",
114 "gzip": "application/x-gzip",
115 "htm": "text/html",
116 "html": "text/html",
117 "ics": "text/calendar",
118 "jpe": "image/jpeg",
119 "jpeg": "image/jpeg",
120 "jpg": "image/jpeg",
121 "kml": "application/vnd.google-earth.kml+xml",
122 "kmz": "application/vnd.google-earth.kmz",
123 "m4a": "audio/mp4",
124 "mid": "audio/mid",
125 "mov": "video/quicktime",
126 "mp3": "audio/mpeg",
127 "mp4": "video/mp4",
128 "mpe": "video/mpeg",
129 "mpeg": "video/mpeg",
130 "mpg": "video/mpeg",
131 "odp": "application/vnd.oasis.opendocument.presentation",
132 "ods": "application/vnd.oasis.opendocument.spreadsheet",
133 "odt": "application/vnd.oasis.opendocument.text",
134 "oga": "audio/ogg",
135 "ogg": "audio/ogg",
136 "ogv": "video/ogg",
137 "pdf": "application/pdf",
138 "png": "image/png",
139 "pot": "text/plain",
140 "pps": "application/vnd.ms-powerpoint",
141 "ppt": "application/vnd.ms-powerpoint",
142 "pptx": "application/vnd.ms-powerpoint",
143 "qt": "video/quicktime",
144 "rmi": "audio/mid",
145 "rss": "application/rss+xml",
146 "snd": "audio/basic",
147 "sxc": "application/vnd.sun.xml.calc",
148 "sxw": "application/vnd.sun.xml.writer",
149 "text": "text/plain",
150 "tif": "image/tiff",
151 "tiff": "image/tiff",
152 "txt": "text/plain",
153 "vcf": "text/x-vcard",
154 "wav": "audio/x-wav",
155 "wbmp": "image/vnd.wap.wbmp",
156 "xls": "application/vnd.ms-excel",
157 "xlsx": "application/vnd.ms-excel",
158 "zip": "application/zip",
159 }
OLDNEW
« no previous file with comments | « impl/memory/mail.go ('k') | impl/memory/mail_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698