Still need to generate instructions for authorized keys. A lot of troubleshooting for the form to cookie persistence.
24 lines
558 B
Go
24 lines
558 B
Go
package templates
|
|
|
|
type UsageInputs struct {
|
|
Id string
|
|
SshKeys []string
|
|
RemoteShells map[string]bool
|
|
LocalShells map[string]bool
|
|
}
|
|
|
|
func NewUsageInputs(id string, remoteShells []string, localShells []string) UsageInputs {
|
|
inputs := UsageInputs{
|
|
Id: id,
|
|
RemoteShells: make(map[string]bool),
|
|
LocalShells: make(map[string]bool),
|
|
}
|
|
for _, remoteShell := range remoteShells {
|
|
inputs.RemoteShells[remoteShell] = true
|
|
}
|
|
for _, localShell := range localShells {
|
|
inputs.LocalShells[localShell] = true
|
|
}
|
|
return inputs
|
|
}
|