eacl

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action = eacl.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 = extended.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

type MatchType = eacl.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

type Storage = storage.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

type Table = eacl.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

type Target = eacl.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

func NewValidator(st Storage, lg *logger.Logger) (*Validator, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL