Documentation
¶
Index ¶
- Constants
- func Equal(a, b ACL) bool
- func Marshal(a ACL) []byte
- func ToUint32(v ACL) uint32
- type ACL
- func (a *ACL) AllowBearer(op uint8)
- func (a *ACL) AllowOthers(op uint8)
- func (a *ACL) AllowSystem(op uint8)
- func (a *ACL) AllowUser(n uint8)
- func (a ACL) BearerAllowed(op uint8) bool
- func (a ACL) Final() bool
- func (a *ACL) ForbidBearer(op uint8)
- func (a *ACL) ForbidOthers(op uint8)
- func (a *ACL) ForbidSystem(op uint8)
- func (a *ACL) ForbidUser(n uint8)
- func (a ACL) OthersAllowed(op uint8) bool
- func (a ACL) Reserved(n uint8) bool
- func (a *ACL) ResetFinal()
- func (a *ACL) ResetReserved(bit uint8)
- func (a *ACL) ResetSticky()
- func (a *ACL) SetFinal()
- func (a *ACL) SetReserved(bit uint8)
- func (a *ACL) SetSticky()
- func (a ACL) Sticky() bool
- func (a ACL) SystemAllowed(n uint8) bool
- func (a *ACL) UnmarshalBinary(data []byte) error
- func (a ACL) UserAllowed(n uint8) bool
Constants ¶
const ( // OpGetRangeHash is an index of GetRangeHash operation in basic ACL bitmask order. OpGetRangeHash uint8 = iota // OpGetRange is an index of GetRange operation in basic ACL bitmask order. OpGetRange // OpSearch is an index of Search operation in basic ACL bitmask order. OpSearch // OpDelete is an index of Delete operation in basic ACL bitmask order. OpDelete // OpPut is an index of Put operation in basic ACL bitmask order. OpPut // OpHead is an index of Head operation in basic ACL bitmask order. OpHead // OpGet is an index of Get operation in basic ACL bitmask order. OpGet )
const Size = 4
Size is a size of ACL in a binary form.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal reports whether e and e2 are the same ACL.
Function defines the relation of equality between two ACL. Try to avoid comparison through "==" operator for better portability.
Types ¶
type ACL ¶
type ACL uint32
ACL represents a container's basic permission bits.
func FromUint32 ¶
FromUint32 converts builtin uint32 value to ACL.
Try to avoid direct cast for better portability.
func (*ACL) AllowBearer ¶
AllowBearer allows Bearer token usage for n-th operation in basic ACL.
func (*ACL) AllowOthers ¶
AllowOthers allows Others group the n-th operation in basic ACL.
func (*ACL) AllowSystem ¶
AllowSystem allows System group the n-th operation in basic ACL.
func (ACL) BearerAllowed ¶
BearerAllowed returns true if Bearer token usage is allowed for n-th operation in basic ACL.
func (*ACL) ForbidBearer ¶
ForbidBearer forbids Bearer token usage for n-th operation in basic ACL.
func (*ACL) ForbidOthers ¶
ForbidOthers forbids Others group the n-th operation in basic ACL.
func (*ACL) ForbidSystem ¶
ForbidSystem forbids System group the n-th operation in basic ACL.
func (*ACL) ForbidUser ¶
ForbidUser forbids user the n-th operation in basic ACL.
func (ACL) OthersAllowed ¶
OthersAllowed returns true if Others group allowed the n-th operation is set in basic ACL.
func (*ACL) ResetReserved ¶
ResetReserved disables the n-th reserved option in basic ACL.
func (*ACL) ResetSticky ¶
func (a *ACL) ResetSticky()
ResetSticky disables the sticky option in basic ACL.
func (*ACL) SetReserved ¶
SetReserved enables the n-th reserved option in basic ACL.
func (ACL) SystemAllowed ¶
SystemAllowed returns true if System group allowed the n-th operation is set in basic ACL.
func (*ACL) UnmarshalBinary ¶
UnmarshalBinary unmarshals ACL from a binary representation.
If buffer size is insufficient, io.ErrUnexpectedEOF is returned.
func (ACL) UserAllowed ¶
UserAllowed returns true if user allowed the n-th operation in basic ACL.