-
Notifications
You must be signed in to change notification settings - Fork 38
/
opts.go
51 lines (44 loc) · 1.29 KB
/
opts.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
package acl
import (
"github.com/nspcc-dev/neofs-node/pkg/core/container"
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object"
"github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl"
)
// WithContainerSource returns option to set container source.
func WithContainerSource(v container.Source) Option {
return func(c *cfg) {
c.containers = v
}
}
// WithSenderClassifier returns option to set sender classifier.
func WithSenderClassifier(v SenderClassifier) Option {
return func(c *cfg) {
c.sender = v
}
}
// WithNextService returns option to set next object service.
func WithNextService(v objectSvc.ServiceServer) Option {
return func(c *cfg) {
c.next = v
}
}
// WithEACLValidatorOptions returns options to set eACL validator options.
func WithEACLValidatorOptions(v ...eacl.Option) Option {
return func(c *cfg) {
c.eACLOpts = v
}
}
// WithLocalStorage returns options to set local object storage.
func WithLocalStorage(v *engine.StorageEngine) Option {
return func(c *cfg) {
c.localStorage = v
}
}
// WithNetmapState returns options to set global netmap state.
func WithNetmapState(v netmap.State) Option {
return func(c *cfg) {
c.state = v
}
}