Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐ native windows registry resource #1804

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions providers-sdk/v1/testutils/testdata/windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
{
"Resource": "command",
"ID": "powershell.exe -NoProfile -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsACgAkAHAAYQB0AGgAIAA9ACAAJwBIAEsARQBZAF8ATABPAEMAQQBMAF8ATQBBAEMASABJAE4ARQBcAFMATwBGAFQAVwBBAFIARQBcAE0AaQBjAHIAbwBzAG8AZgB0AFwAVwBpAG4AZABvAHcAcwBcAEMAdQByAHIAZQBuAHQAVgBlAHIAcwBpAG8AbgBcAFAAbwBsAGkAYwBpAGUAcwBcAFMAeQBzAHQAZQBtACcACgAkAHIAZQBnACAAPQAgAEcAZQB0AC0ASQB0AGUAbQAgACgAJwBSAGUAZwBpAHMAdAByAHkAOgA6ACcAIAArACAAJABwAGEAdABoACkACgBpAGYAIAAoACQAcgBlAGcAIAAtAGUAcQAgACQAbgB1AGwAbAApACAAewAKACAAIABXAHIAaQB0AGUALQBFAHIAcgBvAHIAIAAiAEMAbwB1AGwAZAAgAG4AbwB0ACAAZgBpAG4AZAAgAHIAZQBnAGkAcwB0AHIAeQAgAGsAZQB5ACIACgAgACAAZQB4AGkAdAAgADEACgB9AAoAJABwAHIAbwBwAGUAcgB0AGkAZQBzACAAPQAgAEAAKAApAAoAJA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HQAVABvAC0ASgBzAG8AbgAgAC0ARABlAHAAdABoACAAMwAgAC0AQwBvAG0AcAByAGUAcwBzACAAJABwAHIAbwBwAGUAcgB0AGkAZQBzAAoA",
"Fields": {
"exitcode": {
"type": "\u0005",
Expand All @@ -69,7 +69,7 @@
},
{
"Resource": "command",
"ID": "powershell.exe -NoProfile -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsACgAkAHAAYQB0AGgAIAA9ACAAJwBIAEsARQBZAF8ATABPAEMAQQBMAF8ATQBBAEMASABJAE4ARQBcAFMAbwBmAHQAdwBhAHIAZQBcAFAAbwBsAGkAYwBpAGUAcwBcAE0AaQBjAHIAbwBzAG8AZgB0AFwAVwBpAG4AZABvAHcAcwBcAFAAZQByAHMAbwBuAGEAbABpAHoAYQB0AGkAbwBuACcACgAkAHIAZQBnACAAPQAgAEcAZQB0AC0ASQB0AGUAbQAgACgAJwBSAGUAZwBpAHMAdAByAHkAOgA6ACcAIAArACAAJABwAGEAdABoACkACgBpAGYAIAAoACQAcgBlAGcAIAAtAGUAcQAgACQAbgB1AGwAbAApACAAewAKACAAIABXAHIAaQB0AGUALQBFAHIAcgBvAHIAIAAiAEMAbwB1AGwAZAAgAG4AbwB0ACAAZgBpAG4AZAAgAHIAZQBnAGkAcwB0AHIAeQAgAGsAZQB5ACIACgAgACAAZQB4AGkAdAAgADEACgB9AAoAJABwAHIAbwBwAGUAcgB0AGkAZQBzACAAPQAgAEAAKAApAAoAJAByAGUAZwAuAFAAcgBvAHAAZQByAHQAeQAgAHwAIABGAG8AcgBFAGEAYwBoAC0ATwBiAGoAZQBjAHQAIAB7AAoAIAAgACAAIAAkAGYAZQB0AGMAaABLAGUAeQBWAGEAbAB1AGUAIAA9ACAAJABfAAoAIAAgACAAIABpAGYAIAAoACIAKABkAGUAZgBhAHUAbAB0ACkAIgAuAE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B1AGUAKQA7AAoACQBpAGYAIAAoACQAawBpAG4AZAAgAC0AZQBxACAANwApACAAewAKACAAIAAgACAAIAAgACQAZABhAHQAYQAgAD0AIAAkACgARwBlAHQALQBJAHQAZQBtAFAAcgBvAHAAZQByAHQAeQAgACgAJwBSAGUAZwBpAHMAdAByAHkAOgA6ACcAIAArACAAJABwAGEAdABoACkAKQAgAHwAIABTAGUAbABlAGMAdAAtAE8AYgBqAGUAYwB0ACAALQBFAHgAcABhAG4AZABQAHIAbwBwAGUAcgB0AHkAIAAkAF8ACgAJAH0ACgAgACAAIAAgACQAZQBuAHQAcgB5ACAAPQAgAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABwAHMAbwBiAGoAZQBjAHQAIAAtAFAAcgBvAHAAZQByAHQAeQAgAEAAewAKACAAIAAgACAAIAAgACIAawBlAHkAIgAgAD0AIAAkAF8ACgAgACAAIAAgACAAIAAiAHYAYQBsAHUAZQAiACAAPQAgAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABwAHMAbwBiAGoAZQBjAHQAIAAtAFAAcgBvAHAAZQByAHQAeQAgAEAAewAKACAAIAAgACAAIAAgACAAIAAiAGQAYQB0AGEAIgAgAD0AIAAkAGQAYQB0AGEAOwAKACAAIAAgACAAIAAgACAAIAAiAGsAaQBuAGQAIgAgAD0AIAAkAGsAaQBuAGQAOwAKACAAIAAgACAAIAAgAH0ACgAgACAAIAAgAH0ACgAgACAAIAAgACQAcAByAG8AcABlAHIAdABpAGUAcwAgACsAPQAgACQAZQBuAHQAcgB5AAoAfQAKAEMAbwBuAHYAZQByAHQAVABvAC0ASgBzAG8AbgAgAC0ARABlAHAAdABoACAAMwAgAC0AQwBvAG0AcAByAGUAcwBzACAAJABwAHIAbwBwAGUAcgB0AGkAZQBzAAoA",
"Fields": {
"exitcode": {
"type": "\u0005",
Expand Down
15 changes: 13 additions & 2 deletions providers/os/resources/os.lr
Original file line number Diff line number Diff line change
Expand Up @@ -963,20 +963,31 @@ registrykey @defaults("path") {
init(path string)
// Registry key path
path string
// Indicates if the property exists
exists() bool
// Registry key properties
// deprecated: Registry key properties, use `items` instead
properties() map[string]string
// Registry key items
items() []registrykey.property
// Registry key children
children() []string
}

// Windows registry key property
registrykey.property @defaults("path name") {
init(path string, name string)
// Registry key path
path string
// Registry key name
name string
// Indicates if the property exists
exists() bool
value(exists) string
// deprecated: Registry key property value converted to string, use `data` instead
value() string
// Registry key type
type() string
// Registry key data
data() dict
}

// Container Image
Expand Down
61 changes: 54 additions & 7 deletions providers/os/resources/os.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading