-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.http_query_parameter_dictionary.go
96 lines (82 loc) · 4.4 KB
/
api.http_query_parameter_dictionary.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
package webhdfs
// HTTP Query Parameter Dictionary
const (
HttpQueryParamKeyXAttrName = "xattr.name"
HttpQueryParamKeyXAttrValueEncoding = "encoding"
)
// ACL Spec
// The ACL spec included in ACL modification operations.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_value_encoding
// See also: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html#ACLs_.28Access_Control_Lists.29
// XAttr Name
// The XAttr name of a file/directory.
// Any string prefixed with user./trusted./system./security..
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_Name
// See also: https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/ExtendedAttributes.html
//go:generate go-enum -type XAttrNamespace --linecomment
type XAttrNamespace int
const (
// In HDFS, there are five valid namespaces: user, trusted, system, security, and raw. Each of these namespaces have different access restrictions.
// The user namespace is the namespace that will commonly be used by client applications.
// Access to extended attributes in the user namespace is controlled by the corresponding file permissions.
XAttrNamespaceUser XAttrNamespace = iota // user
// The trusted namespace is available only to HDFS superusers.
XAttrNamespaceTrusted XAttrNamespace = iota // trusted
// The system namespace is reserved for internal HDFS use.
// This namespace is not accessible through userspace methods, and is reserved for implementing internal HDFS features.
XAttrNamespaceSystem XAttrNamespace = iota // system
// The security namespace is reserved for internal HDFS use.
// This namespace is generally not accessible through userspace methods.
// One particular use of security is the security.hdfs.unreadable.by.superuser extended attribute.
// This xattr can only be set on files, and it will prevent the superuser from reading the file's contents.
// The superuser can still read and modify file metadata, such as the owner, permissions, etc.
// This xattr can be set and accessed by any user, assuming normal filesystem permissions.
// This xattr is also write-once, and cannot be removed once set.
// This xattr does not allow a value to be set.
XAttrNamespaceSecurity XAttrNamespace = iota // security
// The raw namespace is reserved for internal system attributes that sometimes need to be exposed.
// Like system namespace attributes they are not visible to the user
// except when getXAttr/getXAttrs is called on a file or directory in the /.reserved/raw HDFS directory hierarchy.
// These attributes can only be accessed by the superuser.
// An example of where raw namespace extended attributes are used is the distcp utility.
// Encryption zone meta data is stored in raw.* extended attributes,
// so as long as the administrator uses /.reserved/raw pathnames in source and target,
// the encrypted files in the encryption zones are transparently copied.
XAttrNamespaceRaw XAttrNamespace = iota // raw
)
// XAttr Value
// The XAttr value of a file/directory.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_Value
// XAttr set flag
// The XAttr set flag.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_set_flag
type XAttrSetFlag string
const (
XAttrSetFlagCreate XAttrSetFlag = "CREATE"
XAttrSetFlagReplace XAttrSetFlag = "REPLACE"
)
func (f XAttrSetFlag) New() *XAttrSetFlag {
var c = f
return &c
}
// The XAttr value encoding.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#XAttr_value_encoding
type XAttrValueEncoding string
const (
XAttrValueEncodingText XAttrValueEncoding = "text"
XAttrValueEncodingHex XAttrValueEncoding = "hex"
XAttrValueEncodingBase64 XAttrValueEncoding = "base64"
)
func (f XAttrValueEncoding) New() *XAttrValueEncoding {
var c = f
return &c
}
// Access Time
// The access time of a file/directory.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Access_Time
// Block Size
// The block size of a file.
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Block_Size
// Create Flag
// Enum of possible flags to process while creating a file
// See: https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_Flag