[#139] sdk/acl: Highlight prefix of well known header names

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-09-16 12:15:20 +03:00 committed by Stanislav Bogatyrev
parent d1499e65b9
commit 052a4a97dc

View file

@ -60,23 +60,29 @@ const (
)
const (
// ReservedHeaderNamePrefix used in filter names to specify well known
// headers such as container id, object id, owner id, etc.
// All names without this prefix used to lookup through user defined headers
// in object or x-headers in request.
ReservedHeaderNamePrefix = "_"
// HdrObjSysNameID is a name of ID field in system header of object.
HdrObjSysNameID = "_ID"
HdrObjSysNameID = ReservedHeaderNamePrefix + "ID"
// HdrObjSysNameCID is a name of cid field in system header of object.
HdrObjSysNameCID = "_CID"
HdrObjSysNameCID = ReservedHeaderNamePrefix + "CID"
// HdrObjSysNameOwnerID is a name of OwnerID field in system header of object.
HdrObjSysNameOwnerID = "_OWNER_ID"
HdrObjSysNameOwnerID = ReservedHeaderNamePrefix + "OWNER_ID"
// HdrObjSysNameVersion is a name of version field in system header of object.
HdrObjSysNameVersion = "_VERSION"
HdrObjSysNameVersion = ReservedHeaderNamePrefix + "VERSION"
// HdrObjSysNamePayloadLength is a name of PayloadLength field in system header of object.
HdrObjSysNamePayloadLength = "_PAYLOAD_LENGTH"
HdrObjSysNamePayloadLength = ReservedHeaderNamePrefix + "PAYLOAD_LENGTH"
// HdrObjSysNameCreatedEpoch is a name of CreatedAt.Epoch field in system header of object.
HdrObjSysNameCreatedEpoch = "_CREATED_EPOCH"
HdrObjSysNameCreatedEpoch = ReservedHeaderNamePrefix + "CREATED_EPOCH"
)
func (a Action) ToV2() v2acl.Action {