Documentation
¶
Index ¶
- type DiscretionaryAccessControlList
- func (dacl *DiscretionaryAccessControlList) AddEntry(entry ace.AccessControlEntry)
- func (dacl *DiscretionaryAccessControlList) ClearEntries()
- func (dacl *DiscretionaryAccessControlList) Describe(indent int)
- func (dacl *DiscretionaryAccessControlList) Marshal() ([]byte, error)
- func (dacl *DiscretionaryAccessControlList) RemoveEntry(entry ace.AccessControlEntry)
- func (dacl *DiscretionaryAccessControlList) Unmarshal(marshalledData []byte) (int, error)
- type DiscretionaryAccessControlListHeader
- type SystemAccessControlList
- func (sacl *SystemAccessControlList) AddEntry(entry ace.AccessControlEntry)
- func (sacl *SystemAccessControlList) ClearEntries()
- func (sacl *SystemAccessControlList) Describe(indent int)
- func (sacl *SystemAccessControlList) Marshal() ([]byte, error)
- func (sacl *SystemAccessControlList) RemoveEntry(entry ace.AccessControlEntry)
- func (sacl *SystemAccessControlList) Unmarshal(marshalledData []byte) (int, error)
- type SystemAccessControlListHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscretionaryAccessControlList ¶
type DiscretionaryAccessControlList struct {
Header DiscretionaryAccessControlListHeader
Entries []ace.AccessControlEntry
// Internal
RawBytes []byte
RawBytesSize uint32
}
DiscretionaryAccessControlList represents a Discretionary Access Control List (DACL).
func (*DiscretionaryAccessControlList) AddEntry ¶
func (dacl *DiscretionaryAccessControlList) AddEntry(entry ace.AccessControlEntry)
AddEntry adds a new ACE entry to the DiscretionaryAccessControlList.
Parameters:
- entry (ace.AccessControlEntry): The ACE entry to add.
func (*DiscretionaryAccessControlList) ClearEntries ¶
func (dacl *DiscretionaryAccessControlList) ClearEntries()
ClearEntries removes all ACE entries from the DiscretionaryAccessControlList.
Returns:
- None
func (*DiscretionaryAccessControlList) Describe ¶
func (dacl *DiscretionaryAccessControlList) Describe(indent int)
Describe prints a detailed description of the DiscretionaryAccessControlList struct, including its attributes formatted with indentation for clarity.
Parameters:
- indent (int): The indentation level for formatting the output. Each level increases the indentation depth, allowing for a hierarchical display of the DACL's components.
func (*DiscretionaryAccessControlList) Marshal ¶
func (dacl *DiscretionaryAccessControlList) Marshal() ([]byte, error)
Marshal serializes the DiscretionaryAccessControlList struct into a byte slice.
Returns:
- []byte: The serialized byte slice representing the DACL.
func (*DiscretionaryAccessControlList) RemoveEntry ¶
func (dacl *DiscretionaryAccessControlList) RemoveEntry(entry ace.AccessControlEntry)
RemoveEntry removes an ACE entry from the DiscretionaryAccessControlList.
Parameters:
- ace (ace.AccessControlEntry): The ACE entry to remove.
Returns:
- None
func (*DiscretionaryAccessControlList) Unmarshal ¶
func (dacl *DiscretionaryAccessControlList) Unmarshal(marshalledData []byte) (int, error)
Unmarshal parses the raw byte slice and initializes the DiscretionaryAccessControlList struct. It sets the RawBytes and RawBytesSize fields, parses the header, and then parses each ACE.
Parameters:
- rawBytes ([]byte): The raw byte slice to be parsed.
type DiscretionaryAccessControlListHeader ¶
type DiscretionaryAccessControlListHeader struct {
Revision revision.AccessControlListRevision
Sbz1 uint8
AclSize uint16
AceCount uint16
Sbz2 uint16
// Internal
RawBytes []byte
RawBytesSize uint32
}
DiscretionaryAccessControlListHeader represents the header of a Discretionary Access Control List (DACL).
func (*DiscretionaryAccessControlListHeader) Describe ¶
func (daclheader *DiscretionaryAccessControlListHeader) Describe(indent int)
Describe prints a detailed description of the DiscretionaryAccessControlListHeader struct, including its attributes formatted with indentation for clarity.
Parameters:
- indent (int): The indentation level for formatting the output. Each level increases the indentation depth, allowing for a hierarchical display of the DACL's components.
func (*DiscretionaryAccessControlListHeader) Marshal ¶
func (daclheader *DiscretionaryAccessControlListHeader) Marshal() ([]byte, error)
Marshal serializes the DiscretionaryAccessControlListHeader struct into a byte slice.
Returns:
- []byte: The serialized byte slice representing the DACL header.
func (*DiscretionaryAccessControlListHeader) Unmarshal ¶
func (daclheader *DiscretionaryAccessControlListHeader) Unmarshal(marshalledData []byte) (int, error)
Unmarshal initializes the DiscretionaryAccessControlListHeader struct by parsing the raw byte slice. It sets the RawBytes and RawBytesSize fields, parses the header, and then parses each ACE.
Parameters:
- rawBytes ([]byte): The raw byte slice to be parsed.
Returns:
- error: An error if parsing fails, otherwise nil.
type SystemAccessControlList ¶
type SystemAccessControlList struct {
Header SystemAccessControlListHeader
Entries []ace.AccessControlEntry
// Internal
RawBytes []byte
RawBytesSize uint32
}
SystemAccessControlList represents a System Access Control List (SACL).
func (*SystemAccessControlList) AddEntry ¶
func (sacl *SystemAccessControlList) AddEntry(entry ace.AccessControlEntry)
AddEntry adds a new ACE entry to the SystemAccessControlList.
Parameters:
- entry (ace.AccessControlEntry): The ACE entry to add.
func (*SystemAccessControlList) ClearEntries ¶
func (sacl *SystemAccessControlList) ClearEntries()
ClearEntries removes all ACE entries from the SystemAccessControlList.
Returns:
- None
func (*SystemAccessControlList) Describe ¶
func (sacl *SystemAccessControlList) Describe(indent int)
Describe prints a detailed description of the SystemAccessControlList struct, including its attributes formatted with indentation for clarity.
Parameters:
- indent (int): The indentation level for formatting the output. Each level increases the indentation depth, allowing for a hierarchical display of the SACL's components.
func (*SystemAccessControlList) Marshal ¶
func (sacl *SystemAccessControlList) Marshal() ([]byte, error)
Marshal serializes the SystemAccessControlList struct into a byte slice.
Returns:
- []byte: The serialized byte slice representing the SACL.
func (*SystemAccessControlList) RemoveEntry ¶
func (sacl *SystemAccessControlList) RemoveEntry(entry ace.AccessControlEntry)
RemoveEntry removes an ACE entry from the SystemAccessControlList.
Parameters:
- ace (ace.AccessControlEntry): The ACE entry to remove.
Returns:
- None
func (*SystemAccessControlList) Unmarshal ¶
func (sacl *SystemAccessControlList) Unmarshal(marshalledData []byte) (int, error)
Unmarshal parses the raw byte slice and initializes the SystemAccessControlList struct. It sets the RawBytes and RawBytesSize fields, parses the header, and then parses each ACE.
Parameters:
- rawBytes ([]byte): The raw byte slice to be parsed.
type SystemAccessControlListHeader ¶
type SystemAccessControlListHeader struct {
Revision revision.AccessControlListRevision
Sbz1 uint8
AclSize uint16
AceCount uint16
Sbz2 uint16
// Internal
RawBytes []byte
RawBytesSize uint32
}
SystemAccessControlListHeader represents the header of a System Access Control List (SACL).
func (*SystemAccessControlListHeader) Describe ¶
func (saclheader *SystemAccessControlListHeader) Describe(indent int)
Describe prints a detailed description of the SystemAccessControlListHeader struct, including its attributes formatted with indentation for clarity.
Parameters:
- indent (int): The indentation level for formatting the output. Each level increases the indentation depth, allowing for a hierarchical display of the SACL's components.
func (*SystemAccessControlListHeader) Marshal ¶
func (saclheader *SystemAccessControlListHeader) Marshal() ([]byte, error)
Marshal serializes the SystemAccessControlListHeader struct into a byte slice.
Returns:
- []byte: The serialized byte slice representing the SACL header.
func (*SystemAccessControlListHeader) Unmarshal ¶
func (saclheader *SystemAccessControlListHeader) Unmarshal(marshalledData []byte) (int, error)
Unmarshal initializes the SystemAccessControlListHeader struct by parsing the raw byte slice. It sets the RawBytes and RawBytesSize fields, parses the header, and then parses each ACE.
Parameters:
- rawBytes ([]byte): The raw byte slice to be parsed.
Returns:
- error: An error if parsing fails, otherwise nil.