CLI backend to manage layout and inputs

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-03-24 17:37:50 +00:00
parent 9c110716a5
commit 7bf05d3cc9
7 changed files with 447 additions and 314 deletions

View File

@@ -33,7 +33,7 @@ var downCmd = &cobra.Command{
// TODO: Implement options: --no-cache
if err := route.Down(ctx, nil); err != nil {
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID).Msg("failed to up the route")
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID()).Msg("failed to up the route")
}
},
}

View File

@@ -37,12 +37,12 @@ var newCmd = &cobra.Command{
if err != nil {
lg.Fatal().Err(err).Msg("failed to create route")
}
lg.Info().Str("route-id", route.ID).Str("route-name", routeName).Msg("created route")
lg.Info().Str("route-id", route.ID()).Str("route-name", routeName).Msg("created route")
if upRoute {
lg.Info().Str("route-id", route.ID).Msg("bringing route online")
lg.Info().Str("route-id", route.ID()).Msg("bringing route online")
if err := route.Up(ctx, nil); err != nil {
lg.Fatal().Err(err).Str("route-id", route.ID).Msg("failed to create route")
lg.Fatal().Err(err).Str("route-id", route.ID()).Msg("failed to create route")
}
}
},

View File

@@ -36,7 +36,7 @@ var queryCmd = &cobra.Command{
out, err := route.Query(ctx, expr, nil)
if err != nil {
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID).Msg("failed to query route")
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID()).Msg("failed to query route")
}
fmt.Println(out)

View File

@@ -33,7 +33,7 @@ var upCmd = &cobra.Command{
// TODO: Implement options: --no-cache
if err := route.Up(ctx, nil); err != nil {
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID).Msg("failed to up the route")
lg.Fatal().Err(err).Str("route-name", routeName).Str("route-id", route.ID()).Msg("failed to up the route")
}
},
}