converge/pkg/server/templates/usageinputs.go
Erik Brakkee 49db7578a7 large parts of the usage is now dynamic.
Still need to generate instructions for authorized keys. A lot of troubleshooting for the form to cookie persistence.
2024-09-08 11:16:49 +02:00

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
}