utils

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressRange added in v0.1.21

func AddressRange(network *net.IPNet) (net.IP, net.IP)

AddressRange returns the first and last addresses in the given CIDR range.

func Dec added in v0.1.21

func Dec(IP net.IP) net.IP

Dec decreases the IP by one this returns a new []byte for the IP

func GenSubnetsInNetwork added in v0.1.21

func GenSubnetsInNetwork(netCIDR string, subnetMaskSize int) ([]string, error)

func GenerateGpoBkupInfoFiles added in v0.1.15

func GenerateGpoBkupInfoFiles(gpoBackupPath string)

func GenerateGpoBkupInfoToStdOut added in v0.1.15

func GenerateGpoBkupInfoToStdOut(gpoName string, gpoGuid string, backupId string, domain string, domainController string)

func GeneratePassword

func GeneratePassword(length int, includeUpper bool, includeNumbers bool, includeSpecial bool) string

func Inc added in v0.1.21

func Inc(IP net.IP) net.IP

Inc increases the IP by one this returns a new []byte for the IP

func NextSubnet added in v0.1.21

func NextSubnet(network *net.IPNet, prefixLen int) (*net.IPNet, bool)

NextSubnet returns the next available subnet of the desired mask size starting for the maximum IP of the offset subnet If the IP exceeds the maxium IP then the second return value is true

func PreviousSubnet added in v0.1.21

func PreviousSubnet(network *net.IPNet, prefixLen int) (*net.IPNet, bool)

https://github.com/apparentlymart/go-cidr/tree/master PreviousSubnet returns the subnet of the desired mask in the IP space just lower than the start of IPNet provided. If the IP space rolls over then the second return value is true

Types

type GroupPolicyObjectBackupInfo added in v0.1.15

type GroupPolicyObjectBackupInfo struct {
	GPOName          string
	GPOGuid          string
	BackupId         string
	DomainController string
	Domain           string
}

Directories

Path Synopsis
From https://github.com/twpayne/go-jsonstruct
From https://github.com/twpayne/go-jsonstruct

Jump to

Keyboard shortcuts

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