A few various changes

- Fixed the '-local' flag to accept host and port
- Added a '-debug' flag to accept a file to write debug log messages
- Added some logic which will force the dark background flag on if MacOS is in dark mode
This commit is contained in:
Leon Mika 2022-06-16 22:00:25 +10:00
parent 47e404aff7
commit 41af399215
18 changed files with 191 additions and 68 deletions

View file

@ -77,3 +77,24 @@ func (c *SSMController) Clone(param models.SSMParameter) tea.Cmd {
}
})
}
func (c *SSMController) DeleteParameter(param models.SSMParameter) tea.Cmd {
return events.Confirm("delete parameter? ", func() tea.Cmd {
return func() tea.Msg {
ctx := context.Background()
if err := c.service.Delete(ctx, param); err != nil {
return events.Error(err)
}
res, err := c.service.List(context.Background(), c.prefix)
if err != nil {
return events.Error(err)
}
return NewParameterListMsg{
Prefix: c.prefix,
Parameters: res,
}
}
})
}