object

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlObjectType

type AccessControlObjectType struct {
	Flags               flags.AccessControlObjectTypeFlags
	ObjectType          ObjectType
	InheritedObjectType InheritedObjectType

	// Internal
	RawBytes     []byte
	RawBytesSize uint32
}

AccessControlObjectType represents the access control object type.

func (*AccessControlObjectType) Describe

func (aco *AccessControlObjectType) Describe(indent int)

Describe prints a human-readable representation of the AccessControlObjectType.

Attributes:

  • indent (int): The indentation level for the output.

func (*AccessControlObjectType) Equal

Equal checks if two AccessControlObjectType objects are equal by comparing all their fields.

Parameters: - other: The other AccessControlObjectType to compare with

Returns: - bool: true if the AccessControlObjectTypes are equal, false otherwise

func (*AccessControlObjectType) Marshal

func (aco *AccessControlObjectType) Marshal() ([]byte, error)

Marshal serializes the AccessControlObjectType struct into a byte slice.

Returns:

  • []byte: The serialized byte slice representing the AccessControlObjectType.

func (*AccessControlObjectType) Unmarshal

func (aco *AccessControlObjectType) Unmarshal(rawBytes []byte) (int, error)

Unmarshal parses the AccessControlObjectType from a byte slice.

Attributes:

  • rawBytes ([]byte): The byte slice to parse the AccessControlObjectType from.

Returns:

  • int: The size of the parsed AccessControlObjectType in bytes.
  • error: An error if the parsing fails.

type InheritedObjectType

type InheritedObjectType struct {
	// Name represents the name of the inherited object type.
	Name string

	// GUID is the globally unique identifier associated with this
	// inherited object type, used for distinguishing it within the
	// security descriptor.
	GUID guid.GUID

	// Internal fields
	// RawBytes holds the raw byte representation of the object type,
	// allowing for low-level access to its binary structure.
	RawBytes []byte

	// RawBytesSize stores the size of the RawBytes slice, which can
	// be useful for parsing and validating the data structure.
	RawBytesSize uint32
}

InheritedObjectType represents a type of object that inherits properties or permissions from a parent object in a security descriptor context.

func (*InheritedObjectType) Describe

func (inheritedObjType *InheritedObjectType) Describe(indent int)

Describe prints a formatted representation of the InheritedObjectType instance, including its GUID, to the standard output. The output is indented based on the provided indent level for better readability.

func (*InheritedObjectType) Equal

func (inheritedObjType *InheritedObjectType) Equal(other *InheritedObjectType) bool

Equal returns true if the InheritedObjectType is equal to the other InheritedObjectType.

func (*InheritedObjectType) GetGUID

func (inheritedObjType *InheritedObjectType) GetGUID() guid.GUID

GetGUID returns the GUID of the InheritedObjectType.

func (*InheritedObjectType) GetName

func (inheritedObjType *InheritedObjectType) GetName() string

GetName returns the name of the InheritedObjectType.

func (*InheritedObjectType) Marshal

func (inheritedObjType *InheritedObjectType) Marshal() ([]byte, error)

Marshal returns the raw byte representation of the InheritedObjectType. It returns the GUID as a byte slice.

func (*InheritedObjectType) SetGUID

func (inheritedObjType *InheritedObjectType) SetGUID(guid guid.GUID)

SetGUID sets the GUID of the InheritedObjectType.

func (*InheritedObjectType) SetName

func (inheritedObjType *InheritedObjectType) SetName(name string)

SetName sets the name of the InheritedObjectType.

func (*InheritedObjectType) Unmarshal

func (inheritedObjType *InheritedObjectType) Unmarshal(rawBytes []byte) (int, error)

Unmarshal takes a byte slice (RawBytes) as input, which represents the raw data for an InheritedObjectType instance. It populates the instance's fields, specifically setting the RawBytes and RawBytesSize, and parsing the GUID from the provided raw data.

type ObjectType

type ObjectType struct {
	// Name is the human-readable name of the object type.
	Name string

	// GUID is the globally unique identifier for the object type.
	GUID guid.GUID

	// RawBytes stores the raw byte representation of the object type.
	// This is useful for low-level operations or serialization.
	RawBytes []byte

	// RawBytesSize stores the size of the RawBytes field in bytes.
	RawBytesSize uint32
}

ObjectType represents a type of object with an associated GUID. It contains the object's name, its GUID for identification, and internal fields for storing raw bytes and their size.

func (*ObjectType) Describe

func (objType *ObjectType) Describe(indent int)

Describe prints a formatted representation of the ObjectType instance, including its GUID, to the standard output. The output is indented based on the provided indent level for better readability.

func (*ObjectType) Equal

func (objType *ObjectType) Equal(other *ObjectType) bool

Equal returns true if the ObjectType is equal to the other ObjectType.

func (*ObjectType) GetGUID

func (objType *ObjectType) GetGUID() guid.GUID

GetGUID returns the GUID of the ObjectType.

func (*ObjectType) GetName

func (objType *ObjectType) GetName() string

GetName returns the name of the ObjectType.

func (*ObjectType) Marshal

func (objType *ObjectType) Marshal() ([]byte, error)

Marshal returns the raw byte representation of the ObjectType. It returns the GUID as a byte slice.

func (*ObjectType) SetGUID

func (objType *ObjectType) SetGUID(guid guid.GUID)

SetGUID sets the GUID of the ObjectType.

func (*ObjectType) SetName

func (objType *ObjectType) SetName(name string)

SetName sets the name of the ObjectType.

func (*ObjectType) Unmarshal

func (objType *ObjectType) Unmarshal(rawBytes []byte) (int, error)

Unmarshal initializes the ObjectType from the given raw byte slice. It expects the RawBytes to be at least 16 bytes long, as that is the size needed to store the GUID. It also sets the RawBytes and RawBytesSize fields.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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