Documentation
¶
Index ¶
- type AccessControlMask
- func (acm *AccessControlMask) AddRight(right uint32)
- func (acm *AccessControlMask) ClearRights()
- func (acm *AccessControlMask) Describe(indent int)
- func (acm *AccessControlMask) Equal(other *AccessControlMask) bool
- func (acm *AccessControlMask) HasRight(right uint32) bool
- func (acm *AccessControlMask) Marshal() ([]byte, error)
- func (acm *AccessControlMask) RemoveRight(right uint32)
- func (acm *AccessControlMask) SetRights(rights []uint32)
- func (acm *AccessControlMask) String() string
- func (acm *AccessControlMask) Unmarshal(marshalledData []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControlMask ¶
type AccessControlMask struct {
RawValue uint32 // The raw value of the access control mask
Values []uint32 // Individual flag values extracted from the mask
Flags []string // Names of the flags corresponding to their values
// Internal fields
RawBytes []byte // Raw byte representation of the mask
RawBytesSize uint32 // Size of the raw bytes
}
AccessControlMask represents a mask for access control entries. It contains the raw value, a list of individual flags represented as uint32 values, and their corresponding names for better readability.
func (*AccessControlMask) AddRight ¶
func (acm *AccessControlMask) AddRight(right uint32)
AddRight adds a specific right to the ACE's Mask.
Parameters: - right: The integer value of the right to add.
func (*AccessControlMask) ClearRights ¶
func (acm *AccessControlMask) ClearRights()
ClearRights removes all rights from the ACE's Mask.
func (*AccessControlMask) Describe ¶
func (acm *AccessControlMask) Describe(indent int)
Describe outputs the AccessControlMask details in a formatted manner. It displays the raw mask value and the associated flags.
func (*AccessControlMask) Equal ¶
func (acm *AccessControlMask) Equal(other *AccessControlMask) bool
Equal checks if two AccessControlMask objects are equal by comparing all their fields.
Parameters: - other: The other AccessControlMask to compare with
Returns: - bool: true if the AccessControlMasks are equal, false otherwise
func (*AccessControlMask) HasRight ¶
func (acm *AccessControlMask) HasRight(right uint32) bool
HasRight checks if a specific right is set within the ACE's Mask.
Parameters: - right: The integer value of the right to check.
Returns: - bool: true if the specified right is set, false otherwise.
func (*AccessControlMask) Marshal ¶
func (acm *AccessControlMask) Marshal() ([]byte, error)
Marshal serializes the AccessControlMask struct into a byte slice.
Returns:
- []byte: The serialized byte slice representing the AccessControlMask.
func (*AccessControlMask) RemoveRight ¶
func (acm *AccessControlMask) RemoveRight(right uint32)
RemoveRight removes a specific right from the ACE's Mask.
Parameters: - right: The integer value of the right to remove.
func (*AccessControlMask) SetRights ¶
func (acm *AccessControlMask) SetRights(rights []uint32)
SetRights sets the ACE's Mask to exactly match the provided rights.
Parameters: - rights: Slice of integer values representing the rights to set.
func (*AccessControlMask) String ¶
func (acm *AccessControlMask) String() string
String returns a string representation of the AccessControlMask.
Returns:
- string: The string representation of the AccessControlMask.