Split Meta back out of StateMeta
Removing the call to StateMeta.Env, so that it doesn't need an embedded Meta field. Embed Meta and StateMeta separately in all State commands.
This commit is contained in:
parent
4dac986a91
commit
39a5ddd381
|
@ -90,7 +90,7 @@ func (c *EnvDeleteCommand) Run(args []string) int {
|
||||||
|
|
||||||
// Lock the state if we can
|
// Lock the state if we can
|
||||||
lockInfo := state.NewLockInfo()
|
lockInfo := state.NewLockInfo()
|
||||||
lockInfo.Operation = "env new"
|
lockInfo.Operation = "env delete"
|
||||||
lockID, err := clistate.Lock(sMgr, lockInfo, c.Ui, c.Colorize())
|
lockID, err := clistate.Lock(sMgr, lockInfo, c.Ui, c.Colorize())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Error locking state: %s", err))
|
c.Ui.Error(fmt.Sprintf("Error locking state: %s", err))
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
// StateListCommand is a Command implementation that lists the resources
|
// StateListCommand is a Command implementation that lists the resources
|
||||||
// within a state file.
|
// within a state file.
|
||||||
type StateListCommand struct {
|
type StateListCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,9 @@ func TestStateList(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateListCommand{
|
c := &StateListCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,11 +47,9 @@ func TestStateList_backendState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateListCommand{
|
c := &StateListCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,11 +73,9 @@ func TestStateList_noState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateListCommand{
|
c := &StateListCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// StateMeta is the meta struct that should be embedded in state subcommands.
|
// StateMeta is the meta struct that should be embedded in state subcommands.
|
||||||
type StateMeta struct {
|
type StateMeta struct{}
|
||||||
Meta
|
|
||||||
}
|
|
||||||
|
|
||||||
// State returns the state for this meta. This is different then Meta.State
|
// State returns the state for this meta. This gets the appropriate state from
|
||||||
// in the way that backups are done. This configures backups to be timestamped
|
// the backend, but changes the way that backups are done. This configures
|
||||||
// rather than just the original state path plus a backup path.
|
// backups to be timestamped rather than just the original state path plus a
|
||||||
|
// backup path.
|
||||||
func (c *StateMeta) State(m *Meta) (state.State, error) {
|
func (c *StateMeta) State(m *Meta) (state.State, error) {
|
||||||
// Load the backend
|
// Load the backend
|
||||||
b, err := m.Backend(nil)
|
b, err := m.Backend(nil)
|
||||||
|
@ -25,7 +24,7 @@ func (c *StateMeta) State(m *Meta) (state.State, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
env := c.Env()
|
env := m.Env()
|
||||||
// Get the state
|
// Get the state
|
||||||
s, err := b.State(env)
|
s, err := b.State(env)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
|
|
||||||
// StateMvCommand is a Command implementation that shows a single resource.
|
// StateMvCommand is a Command implementation that shows a single resource.
|
||||||
type StateMvCommand struct {
|
type StateMvCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,9 @@ func TestStateMv(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,11 +113,9 @@ func TestStateMv_backupExplicit(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,11 +168,9 @@ func TestStateMv_stateOutNew(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,11 +240,9 @@ func TestStateMv_stateOutExisting(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,11 +281,9 @@ func TestStateMv_noState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,11 +342,9 @@ func TestStateMv_stateOutNew_count(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,11 +520,9 @@ func TestStateMv_stateOutNew_largeCount(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,11 +601,9 @@ func TestStateMv_stateOutNew_nestedModule(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateMvCommand{
|
c := &StateMvCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
|
|
||||||
// StatePullCommand is a Command implementation that shows a single resource.
|
// StatePullCommand is a Command implementation that shows a single resource.
|
||||||
type StatePullCommand struct {
|
type StatePullCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,9 @@ func TestStatePull(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePullCommand{
|
c := &StatePullCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
|
|
||||||
// StatePushCommand is a Command implementation that shows a single resource.
|
// StatePushCommand is a Command implementation that shows a single resource.
|
||||||
type StatePushCommand struct {
|
type StatePushCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,9 @@ func TestStatePush_empty(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePushCommand{
|
c := &StatePushCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,11 +49,9 @@ func TestStatePush_replaceMatch(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePushCommand{
|
c := &StatePushCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,11 +78,9 @@ func TestStatePush_lineageMismatch(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePushCommand{
|
c := &StatePushCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,11 +107,9 @@ func TestStatePush_serialNewer(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePushCommand{
|
c := &StatePushCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,11 +136,9 @@ func TestStatePush_serialOlder(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StatePushCommand{
|
c := &StatePushCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
// StateRmCommand is a Command implementation that shows a single resource.
|
// StateRmCommand is a Command implementation that shows a single resource.
|
||||||
type StateRmCommand struct {
|
type StateRmCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,9 @@ func TestStateRm(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateRmCommand{
|
c := &StateRmCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,11 +112,9 @@ func TestStateRm_backupExplicit(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateRmCommand{
|
c := &StateRmCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,11 +146,9 @@ func TestStateRm_noState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateRmCommand{
|
c := &StateRmCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ import (
|
||||||
|
|
||||||
// StateShowCommand is a Command implementation that shows a single resource.
|
// StateShowCommand is a Command implementation that shows a single resource.
|
||||||
type StateShowCommand struct {
|
type StateShowCommand struct {
|
||||||
|
Meta
|
||||||
StateMeta
|
StateMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,9 @@ func TestStateShow(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateShowCommand{
|
c := &StateShowCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,11 +92,9 @@ func TestStateShow_multi(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateShowCommand{
|
c := &StateShowCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,11 +114,9 @@ func TestStateShow_noState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateShowCommand{
|
c := &StateShowCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,11 +134,9 @@ func TestStateShow_emptyState(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateShowCommand{
|
c := &StateShowCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,11 +163,9 @@ func TestStateShow_emptyStateWithModule(t *testing.T) {
|
||||||
p := testProvider()
|
p := testProvider()
|
||||||
ui := new(cli.MockUi)
|
ui := new(cli.MockUi)
|
||||||
c := &StateShowCommand{
|
c := &StateShowCommand{
|
||||||
StateMeta: StateMeta{
|
Meta: Meta{
|
||||||
Meta: Meta{
|
ContextOpts: testCtxConfig(p),
|
||||||
ContextOpts: testCtxConfig(p),
|
Ui: ui,
|
||||||
Ui: ui,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
commands.go
21
commands.go
|
@ -46,11 +46,6 @@ func init() {
|
||||||
"debug": struct{}{}, // includes all subcommands
|
"debug": struct{}{}, // includes all subcommands
|
||||||
}
|
}
|
||||||
|
|
||||||
// meta struct used in state commands
|
|
||||||
stateMeta := command.StateMeta{
|
|
||||||
Meta: meta,
|
|
||||||
}
|
|
||||||
|
|
||||||
Commands = map[string]cli.CommandFactory{
|
Commands = map[string]cli.CommandFactory{
|
||||||
"apply": func() (cli.Command, error) {
|
"apply": func() (cli.Command, error) {
|
||||||
return &command.ApplyCommand{
|
return &command.ApplyCommand{
|
||||||
|
@ -221,44 +216,42 @@ func init() {
|
||||||
},
|
},
|
||||||
|
|
||||||
"state": func() (cli.Command, error) {
|
"state": func() (cli.Command, error) {
|
||||||
return &command.StateCommand{
|
return &command.StateCommand{}, nil
|
||||||
StateMeta: stateMeta,
|
|
||||||
}, nil
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"state list": func() (cli.Command, error) {
|
"state list": func() (cli.Command, error) {
|
||||||
return &command.StateListCommand{
|
return &command.StateListCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"state rm": func() (cli.Command, error) {
|
"state rm": func() (cli.Command, error) {
|
||||||
return &command.StateRmCommand{
|
return &command.StateRmCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"state mv": func() (cli.Command, error) {
|
"state mv": func() (cli.Command, error) {
|
||||||
return &command.StateMvCommand{
|
return &command.StateMvCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"state pull": func() (cli.Command, error) {
|
"state pull": func() (cli.Command, error) {
|
||||||
return &command.StatePullCommand{
|
return &command.StatePullCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"state push": func() (cli.Command, error) {
|
"state push": func() (cli.Command, error) {
|
||||||
return &command.StatePushCommand{
|
return &command.StatePushCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"state show": func() (cli.Command, error) {
|
"state show": func() (cli.Command, error) {
|
||||||
return &command.StateShowCommand{
|
return &command.StateShowCommand{
|
||||||
StateMeta: stateMeta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue