forked from TrueCloudLab/frostfs-api-go
Container access control type definitions
This commit is contained in:
parent
805ef243ee
commit
6b6728356a
5 changed files with 30 additions and 0 deletions
Binary file not shown.
|
@ -41,6 +41,9 @@ message PutRequest {
|
||||||
// Rules define storage policy for the object inside the container.
|
// Rules define storage policy for the object inside the container.
|
||||||
netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false];
|
netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false];
|
||||||
|
|
||||||
|
// Container ACL.
|
||||||
|
AccessGroup Group = 5 [(gogoproto.nullable) = false];
|
||||||
|
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
|
|
|
@ -11,6 +11,19 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// AccessMode is a container access mode type.
|
||||||
|
type AccessMode uint32
|
||||||
|
|
||||||
|
const (
|
||||||
|
// AccessModeRead is a read access mode.
|
||||||
|
AccessModeRead AccessMode = 1 << iota
|
||||||
|
// AccessModeWrite is a write access mode.
|
||||||
|
AccessModeWrite
|
||||||
|
)
|
||||||
|
|
||||||
|
// AccessModeReadWrite is a read/write container access mode.
|
||||||
|
const AccessModeReadWrite = AccessModeRead | AccessModeWrite
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_ internal.Custom = (*Container)(nil)
|
_ internal.Custom = (*Container)(nil)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -17,4 +17,18 @@ message Container {
|
||||||
uint64 Capacity = 3;
|
uint64 Capacity = 3;
|
||||||
// Rules define storage policy for the object inside the container.
|
// Rules define storage policy for the object inside the container.
|
||||||
netmap.PlacementRule Rules = 4 [(gogoproto.nullable) = false];
|
netmap.PlacementRule Rules = 4 [(gogoproto.nullable) = false];
|
||||||
|
// Container ACL.
|
||||||
|
AccessControlList List = 5 [(gogoproto.nullable) = false];
|
||||||
|
}
|
||||||
|
|
||||||
|
message AccessGroup {
|
||||||
|
// Group access mode.
|
||||||
|
uint32 M = 1;
|
||||||
|
// Group members.
|
||||||
|
repeated bytes G = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
||||||
|
}
|
||||||
|
|
||||||
|
message AccessControlList {
|
||||||
|
// List of access groups.
|
||||||
|
repeated AccessGroup List = 1 [(gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue