Cloned UserKey struct to config so it can be documented. Added examples. (#149)

This commit is contained in:
Fabian Kammel 2022-05-17 10:52:37 +02:00 committed by GitHub
parent b905c28515
commit cfad36720b
4 changed files with 152 additions and 48 deletions

View file

@ -80,7 +80,15 @@ func initialize(ctx context.Context, cmd *cobra.Command, protCl protoClient, ser
return err
}
protoSSHUserKeys := ssh.ToProtoSlice(config.SSHUsers)
var sshUsers []*ssh.UserKey
for _, user := range config.SSHUsers {
sshUsers = append(sshUsers, &ssh.UserKey{
Username: user.Username,
PublicKey: user.PublicKey,
})
}
protoSSHUserKeys := ssh.ToProtoSlice(sshUsers)
var stat state.ConstellationState
err = fileHandler.ReadJSON(constants.StateFilename, &stat)