frostfs-node/pkg/services/object/acl/eacl/v2/opts.go
Leonard Lyubich 69a69cdbee [#67] object/eacl: Implement eACL validator
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-02 19:46:45 +03:00

35 lines
566 B
Go

package v2
import (
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
)
func WithObjectStorage(v ObjectStorage) Option {
return func(c *cfg) {
c.storage = v
}
}
func WithLocalObjectStorage(v *localstore.Storage) Option {
return func(c *cfg) {
c.storage = &localStorage{
ls: v,
}
}
}
func WithServiceRequest(v Request) Option {
return func(c *cfg) {
c.msg = &requestXHeaderSource{
req: v,
}
}
}
func WithServiceResponse(v Response) Option {
return func(c *cfg) {
c.msg = &responseXHeaderSource{
resp: v,
}
}
}