🎨 Small fixups

This commit is contained in:
Ettore Di Giacinto 2022-10-13 21:35:26 +00:00
parent 6124f9aec9
commit 7c6fa7df06
3 changed files with 11 additions and 6 deletions

View File

@ -36,7 +36,7 @@ func start() error {
factory := pluggable.NewPluginFactory()
connectionDetails := &struct {
Server string
Server string `yaml:"challenger_server"`
}{}
var server string
@ -52,6 +52,13 @@ func start() error {
// Input: bus.EventInstallPayload
// Expected output: map[string]string{}
factory.Add(bus.EventDiscoveryPassword, func(e *pluggable.Event) pluggable.EventResponse {
if server == "" {
return pluggable.EventResponse{
Error: "no server configured",
}
}
b := &block.Partition{}
err := json.Unmarshal([]byte(e.Data), b)
if err != nil {

3
go.mod
View File

@ -5,7 +5,7 @@ go 1.18
require (
github.com/gorilla/websocket v1.5.0
github.com/jaypipes/ghw v0.9.0
github.com/kairos-io/go-tpm v0.0.0-20221007215323-700d855876c5
github.com/kairos-io/go-tpm v0.0.0-20221013145523-cc421fc8c33d
github.com/kairos-io/kairos v1.1.2
github.com/kairos-io/kcrypt v0.0.0-20221006145351-cabc24dc37a7
github.com/mudler/go-pluggable v0.0.0-20220716112424-189d463e3ff3
@ -85,7 +85,6 @@ require (
github.com/pterm/pterm v0.12.41 // indirect
github.com/qeesung/image2ascii v1.0.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/wayneashleyberry/terminal-dimensions v1.1.0 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect

5
go.sum
View File

@ -581,8 +581,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV
github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kairos-io/go-tpm v0.0.0-20221007215323-700d855876c5 h1:ntceYxOrfh3HITobT/vVvBvyrKQiVrk08CfaoQkOZxw=
github.com/kairos-io/go-tpm v0.0.0-20221007215323-700d855876c5/go.mod h1:VAhWkTXuXg6L6forfoHYeawYcBsBQ6hD4A0ZU+onovk=
github.com/kairos-io/go-tpm v0.0.0-20221013145523-cc421fc8c33d h1:btH1pOJxkGpmYBFYjLD05Ugs6lcgsDVB5nytzLsxY5w=
github.com/kairos-io/go-tpm v0.0.0-20221013145523-cc421fc8c33d/go.mod h1:VAhWkTXuXg6L6forfoHYeawYcBsBQ6hD4A0ZU+onovk=
github.com/kairos-io/kairos v1.1.2 h1:xMRzB5Iqzi6t+V4uyFywEqclXWUh74P8JKNTd5A20H8=
github.com/kairos-io/kairos v1.1.2/go.mod h1:6QMx1u5rpHgLQSe+ICryMjw3tecQc2MZVTKrTVip8ok=
github.com/kairos-io/kcrypt v0.0.0-20221006145351-cabc24dc37a7 h1:5kQgugq41ADeAGRcaNtZr7ck0CrG5C72VkJ1gC/ZnOU=
@ -841,7 +841,6 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=