Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action represents action on the request.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/acl/extended.Action.
type Header ¶
Header represents the string key-value header.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/acl/extended.Header.
type HeaderFilter ¶
type HeaderFilter = eacl.HeaderFilter
HeaderFilter represents the header filter.
It is a type alias of github.com/nspcc-dev/neofs-api-go/acl/extended.HeaderFilter.
type MatchType ¶
MatchType represents value match type.
It is a type alias of github.com/nspcc-dev/neofs-api-go/acl/extended.MatchType.
type RequestInfo ¶
type RequestInfo = extended.RequestInfo
RequestInfo represents the information about the request.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/acl/extended.RequestInfo.
type Storage ¶
Storage represents the eACL table storage.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/acl/extended/storage.Storage.
type Table ¶
Table represents extended ACL rule table.
It is a type alias of github.com/nspcc-dev/neofs-api-go/acl/extended.ExtendedACLTable.
type Target ¶
Target represents authorization group.
It is a type alias of github.com/nspcc-dev/neofs-api-go/acl/extended.Target.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is a tool that calculates the action on a request according to the extended ACL rule table.
Validator receives eACL table from the eACL storage.
func NewValidator ¶
NewValidator creates and initializes a new Validator using arguments.
Returns an error if some of the arguments is nil.
Using the Validator that has been created with new(Validator) expression (or just declaring a Validator variable) is unsafe and can lead to panic.
func (*Validator) CalculateAction ¶
func (v *Validator) CalculateAction(info RequestInfo) Action
CalculateAction calculates action on the request according to its information.
The action is calculated according to the application of eACL table of rules to the request.
If request info argument is nil, eacl.ActionUnknown is returned immediately.
If the eACL table is not available at the time of the call, eacl.ActionUnknown is returned.
If no matching table entry is found, ActionAllow is returned.