acl

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 5 Imported by: 2

Documentation

Index

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

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)

func (*DiscretionaryAccessControlList) DescribeList added in v1.3.2

func (dacl *DiscretionaryAccessControlList) DescribeList() []string

DescribeList returns the DiscretionaryAccessControlList description as a list of lines at indentation depth 0, nesting the header and each entry one level deeper.

func (*DiscretionaryAccessControlList) DescribeWithCallback added in v1.3.2

func (dacl *DiscretionaryAccessControlList) DescribeWithCallback(indent int, printf describe.Printf)

DescribeWithCallback renders the DiscretionaryAccessControlList at the given indentation depth, routing each line to the provided fmt.Printf-like callback.

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)

func (*DiscretionaryAccessControlListHeader) DescribeList added in v1.3.2

func (daclheader *DiscretionaryAccessControlListHeader) DescribeList() []string

DescribeList returns the DiscretionaryAccessControlListHeader description as a list of lines at indentation depth 0.

func (*DiscretionaryAccessControlListHeader) DescribeWithCallback added in v1.3.2

func (daclheader *DiscretionaryAccessControlListHeader) DescribeWithCallback(indent int, printf describe.Printf)

DescribeWithCallback renders the DiscretionaryAccessControlListHeader at the given indentation depth, routing each line to the provided fmt.Printf-like callback.

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)

func (*SystemAccessControlList) DescribeList added in v1.3.2

func (sacl *SystemAccessControlList) DescribeList() []string

DescribeList returns the SystemAccessControlList description as a list of lines at indentation depth 0, nesting the header and each entry one level deeper.

func (*SystemAccessControlList) DescribeWithCallback added in v1.3.2

func (sacl *SystemAccessControlList) DescribeWithCallback(indent int, printf describe.Printf)

DescribeWithCallback renders the SystemAccessControlList at the given indentation depth, routing each line to the provided fmt.Printf-like callback.

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)

func (*SystemAccessControlListHeader) DescribeList added in v1.3.2

func (saclheader *SystemAccessControlListHeader) DescribeList() []string

DescribeList returns the SystemAccessControlListHeader description as a list of lines at indentation depth 0.

func (*SystemAccessControlListHeader) DescribeWithCallback added in v1.3.2

func (saclheader *SystemAccessControlListHeader) DescribeWithCallback(indent int, printf describe.Printf)

DescribeWithCallback renders the SystemAccessControlListHeader at the given indentation depth, routing each line to the provided fmt.Printf-like callback.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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