forked from ldez/mimetype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage.go
103 lines (100 loc) · 3.17 KB
/
message.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package mimetype
// CODE GENERATED AUTOMATICALLY
// THIS FILE MUST NOT BE EDITED BY HAND
const (
// MessageBhttp bhttp mime type.
MessageBhttp = "message/bhttp"
// MessageCpim CPIM mime type.
MessageCpim = "message/CPIM"
// MessageDeliveryStatus delivery-status mime type.
MessageDeliveryStatus = "message/delivery-status"
// MessageDispositionNotification disposition-notification mime type.
MessageDispositionNotification = "message/disposition-notification"
// MessageExample example mime type.
MessageExample = "message/example"
// MessageExternalBody external-body mime type.
MessageExternalBody = "message/external-body"
// MessageFeedbackReport feedback-report mime type.
MessageFeedbackReport = "message/feedback-report"
// MessageGlobal global mime type.
MessageGlobal = "message/global"
// MessageGlobalDeliveryStatus global-delivery-status mime type.
MessageGlobalDeliveryStatus = "message/global-delivery-status"
// MessageGlobalDispositionNotification global-disposition-notification mime type.
MessageGlobalDispositionNotification = "message/global-disposition-notification"
// MessageGlobalHeaders global-headers mime type.
MessageGlobalHeaders = "message/global-headers"
// MessageHTTP http mime type.
MessageHTTP = "message/http"
// MessageImdnXML imdn+xml mime type.
MessageImdnXML = "message/imdn+xml"
// MessageNewsObsoletedByRfc5537 news (OBSOLETED by [RFC5537]) mime type.
MessageNewsObsoletedByRfc5537 = "message/news"
// MessagePartial partial mime type.
MessagePartial = "message/partial"
// MessageRfc822 rfc822 mime type.
MessageRfc822 = "message/rfc822"
// MessageSHTTPObsolete s-http (OBSOLETE) mime type.
MessageSHTTPObsolete = "message/s-http"
// MessageSip sip mime type.
MessageSip = "message/sip"
// MessageSipfrag sipfrag mime type.
MessageSipfrag = "message/sipfrag"
// MessageTrackingStatus tracking-status mime type.
MessageTrackingStatus = "message/tracking-status"
// MessageVndSiSimpObsoletedByRequest vnd.si.simp (OBSOLETED by request) mime type.
MessageVndSiSimpObsoletedByRequest = "message/vnd.si.simp"
// MessageVndWfaWsc vnd.wfa.wsc mime type.
MessageVndWfaWsc = "message/vnd.wfa.wsc"
)
// IsMessage checks if the mime types is message.
func IsMessage(mt string) bool {
switch mt {
case "message/CPIM":
return true
case "message/bhttp":
return true
case "message/delivery-status":
return true
case "message/disposition-notification":
return true
case "message/example":
return true
case "message/external-body":
return true
case "message/feedback-report":
return true
case "message/global":
return true
case "message/global-delivery-status":
return true
case "message/global-disposition-notification":
return true
case "message/global-headers":
return true
case "message/http":
return true
case "message/imdn+xml":
return true
case "message/news":
return true
case "message/partial":
return true
case "message/rfc822":
return true
case "message/s-http":
return true
case "message/sip":
return true
case "message/sipfrag":
return true
case "message/tracking-status":
return true
case "message/vnd.si.simp":
return true
case "message/vnd.wfa.wsc":
return true
default:
return false
}
}