acl

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 27 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

WithEACLValidatorOptions 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(l *zap.Logger, ir InnerRingFetcher, nm core.Source) SenderClassifier

fixme: update classifier constructor

func (SenderClassifier) Classify

func (c SenderClassifier) Classify(
	req metaWithToken,
	cid *cid.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