Resources/Vault/src/PSVault/PSVault.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<#
This is an entirely optional psm1 which you can leverage to surface up
custom functions to <%=$PLASTER_PARAM_ModuleName%>.psd1
You could create a specialized wrapper function for Registering/Unregistering your vault.
You could create specialized configuration functions.
You could also register autocompleters here.
A few examples have been included below.
#>


# <#
# .SYNOPSIS
# Custom function for retrieving configuration details about your vault.
# #>
# function Get-<%=$PLASTER_PARAM_ModuleName%>Configuration {
# [CmdletBinding()]
# param (

# )
# }#Get-<%=$PLASTER_PARAM_ModuleName%>Configuration


<#
.SYNOPSIS
    Custom function for setting configuration details about your vault.
#>

# function Set-<%=$PLASTER_PARAM_ModuleName%>Configuration {
# [CmdletBinding()]
# param (

# )
# }#Get-<%=$PLASTER_PARAM_ModuleName%>Configuration

<#
.SYNOPSIS
    Custom wrapper function for registering your vault.
#>

# function Register-<%=$PLASTER_PARAM_ModuleName%>Vault {
# [CmdletBinding()]
# param (

# )

# $params = @{

# }

# Register-SecretVault @Params
# }#Register-<%=$PLASTER_PARAM_ModuleName%>Configuration

<#
.SYNOPSIS
    Custom wrapper function for unregistering your vault.
#>

# function Unregister-<%=$PLASTER_PARAM_ModuleName%>Vault {
# [CmdletBinding()]
# param (

# )

# $params = @{

# }

# Unregister-SecretVault @params
# }#Unregister-<%=$PLASTER_PARAM_ModuleName%>Configuration

<#
.SYNOPSIS
    Entirely custom function for performing some type of connection related to your vault.
#>

# function Connect-<%=$PLASTER_PARAM_ModuleName%> {
# [CmdletBinding()]
# param (

# )
# }#Connect-<%=$PLASTER_PARAM_ModuleName%>Configuration

<#
.SYNOPSIS
    Entirely custom function for performing some type of disconnect related to your vault.
#>

# function Disconnect-<%=$PLASTER_PARAM_ModuleName%> {
# [CmdletBinding()]
# param (

# )
# }#Disconnect-<%=$PLASTER_PARAM_ModuleName%>Configuration

<#
Some example of registering argument completers
#>


# $vaultArgCompleter = {
# param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)

# (Get-SecretVault -Name "*$wordToComplete*") | Select-Object -ExpandProperty Name
# }
# $vaultSplat = @{
# CommandName = 'Register-<%=$PLASTER_PARAM_ModuleName%>Vault'
# ParameterName = 'Name'
# ScriptBlock = $vaultArgCompleter
# }
# Register-ArgumentCompleter @vaultSplat

# $vaultURArgCompleter = {
# param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)

# (Get-SecretVault -Name "*$wordToComplete*") | Select-Object -ExpandProperty Name
# }
# $vaultURArgSplat = @{
# CommandName = 'Unregister-<%=$PLASTER_PARAM_ModuleName%>Vault'
# ParameterName = 'Name'
# ScriptBlock = $vaultURArgCompleter
# }
# Register-ArgumentCompleter @$vaultURArgSplat