Use a central list of private types

This commit is contained in:
2019-11-18 14:26:53 +09:00
parent 597f46f372
commit 12c752a272
4 changed files with 26 additions and 26 deletions

22
arn/Private.go Normal file
View File

@ -0,0 +1,22 @@
package arn
var (
privateCollections = map[string]bool{
"Analytics": true,
"Crash": true,
"ClientErrorReport": true,
"EditLogEntry": true,
"EmailToUser": true,
"FacebookToUser": true,
"PayPalPayment": true,
"Purchase": true,
"Session": true,
"TwitterToUser": true,
}
)
// IsPrivateType tells you whether the given type is private.
// Private types contains user-sensitive or security related data.
func IsPrivateType(typeName string) bool {
return privateCollections[typeName]
}