storage

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilStorage = errors.New("eACL storage is nil")

ErrNilStorage is the error returned by functions that expect a non-nil eACL table storage implementation, but received nil.

View Source
var ErrNotFound = errors.New("container not found")

ErrNotFound is the error returned when eACL table was not found in storage.

Functions

This section is empty.

Types

type CID

type CID = container.ID

CID represents the container identifier.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container.ID.

type Storage

type Storage interface {
	// GetEACL reads the table from the storage by identifier.
	// It returns any error encountered.
	//
	// GetEACL must return exactly one non-nil value.
	// GetEACL must return ErrNotFound if the table is not in storage.
	//
	// Implementations must not retain or modify the table
	// (even temporarily).
	GetEACL(CID) (Table, error)

	// PutEACL saves the table to the underlying storage.
	// It returns any error encountered that caused the saving to interrupt.
	//
	// PutEACL must return extended.ErrNilTable on nil table.
	//
	// Implementations must not retain or modify the table (even temporarily).
	//
	// Table rewriting behavior is dictated by implementation.
	PutEACL(CID, Table, []byte) error
}

Storage is the interface that wraps basic methods of extended ACL table storage.

type Table

type Table = eacl.Table

Table represents extended ACL rule table.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/eacl/extended.Table.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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