Documentation
¶
Index ¶
- Constants
- Variables
- type BasicACL
- type Container
- func (c *Container) BasicACL() BasicACL
- func (c *Container) MarshalBinary() ([]byte, error)
- func (c *Container) OwnerID() OwnerID
- func (c *Container) PlacementRule() PlacementRule
- func (c *Container) Salt() []byte
- func (c *Container) SetBasicACL(v BasicACL)
- func (c *Container) SetOwnerID(v OwnerID)
- func (c *Container) SetPlacementRule(v PlacementRule)
- func (c *Container) SetSalt(v []byte)
- func (c *Container) UnmarshalBinary(data []byte) error
- type ID
- type OwnerID
- type PlacementRule
Constants ¶
const OwnerIDSize = refs.OwnerIDSize
OwnerIDSize is a size of OwnerID in a binary form.
Variables ¶
var ErrNilContainer = errors.New("container is nil")
ErrNilContainer is the error returned by functions that expect a non-nil container pointer, but received nil.
Functions ¶
This section is empty.
Types ¶
type BasicACL ¶
BasicACL represents the basic ACL rules.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/basic.ACL.
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container represents NeoFS container.
func (*Container) MarshalBinary ¶
MarshalBinary encodes the container into a binary form and returns the result.
func (*Container) PlacementRule ¶
func (c *Container) PlacementRule() PlacementRule
PlacementRule returns placement rule of the container.
func (*Container) Salt ¶
Salt returns the container salt.
Slice is returned by reference without copying.
func (*Container) SetBasicACL ¶
SetBasicACL sets the mask of basic container permissions.
func (*Container) SetOwnerID ¶
SetOwnerID sets the ID of the container's owner.
func (*Container) SetPlacementRule ¶
func (c *Container) SetPlacementRule(v PlacementRule)
SetPlacementRule sets placement rule of the container.
func (*Container) SetSalt ¶
SetSalt sets the container salt.
Slice is assigned by reference without copying.
func (*Container) UnmarshalBinary ¶
UnmarshalBinary unmarshals container from a binary representation.
If buffer size is insufficient, io.ErrUnexpectedEOF is returned.
type ID ¶
ID represents the container identifier.
It is a type alias of github.com/nspcc-dev/neofs-api-go/refs.CID. FIXME: container id should be defined in core package.
func CalculateID ¶
CalculateID calculates container identifier as SHA256 checksum of the binary form.
If container is nil, ErrNilContainer is returned.
type OwnerID ¶
OwnerID represents the container owner identifier.
It is a type alias of github.com/nspcc-dev/neofs-api-go/refs.OwnerID. FIXME: owner ID should be defined in core lib.
type PlacementRule ¶
type PlacementRule = netmap.PlacementRule
PlacementRule represents placement rules of the container.
It is a type alias of github.com/nspcc-dev/netmap.PlacementRule. FIXME: container placement rules should be defined in core lib.