acl

package
v1.22.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMalformedRequest = errors.New("malformed request")
	ErrUnknownRole      = errors.New("can't classify request sender")
	ErrUnknownContainer = errors.New("can't fetch container info")
)

Functions

This section is empty.

Types

type InnerRingFetcher

type InnerRingFetcher interface {
	InnerRingKeys() ([][]byte, error)
}

type Option

type Option func(*cfg)

Option represents Service constructor option.

func WithContainerSource

func WithContainerSource(v container.Source) Option

WithContainerSource returns option to set container source.

func WithEACLValidatorOptions

func WithEACLValidatorOptions(v ...eacl.Option) Option

WithEACLValidator returns options to set eACL validator options.

func WithLocalStorage

func WithLocalStorage(v *engine.StorageEngine) Option

WithLocalStorage returns options to set local object storage.

func WithNetmapState

func WithNetmapState(v netmap.State) Option

WithNetmapState returns options to set global netmap state.

func WithNextService

func WithNextService(v objectSvc.ServiceServer) Option

WithNextService returns option to set next object service.

func WithSenderClassifier

func WithSenderClassifier(v SenderClassifier) Option

WithSenderClassifier returns option to set sender classifier.

type SenderClassifier

type SenderClassifier struct {
	// contains filtered or unexported fields
}

func NewSenderClassifier

func NewSenderClassifier(ir InnerRingFetcher, nm core.Source) SenderClassifier

fixme: update classifier constructor

func (SenderClassifier) Classify

func (c SenderClassifier) Classify(
	req metaWithToken,
	cid *container.ID,
	cnr *container.Container) (role acl.Role, isIR bool, key []byte, err error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service checks basic ACL rules.

func New

func New(opts ...Option) Service

New is a constructor for object ACL checking service.

func (Service) Delete

func (b Service) Delete(
	ctx context.Context,
	request *object.DeleteRequest) (*object.DeleteResponse, error)

func (Service) Get

func (b Service) Get(request *object.GetRequest, stream objectSvc.GetObjectStream) error

func (Service) GetRange

func (b Service) GetRange(request *object.GetRangeRequest, stream objectSvc.GetObjectRangeStream) error

func (Service) GetRangeHash

func (Service) Head

func (b Service) Head(
	ctx context.Context,
	request *object.HeadRequest) (*object.HeadResponse, error)

func (Service) Put

func (Service) Search

func (b Service) Search(request *object.SearchRequest, stream objectSvc.SearchStream) error

Directories

Path Synopsis
v2

Jump to

Keyboard shortcuts

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