Skip to content

Commit 2bd2a89

Browse files
committed
init updates
1 parent 5ce8043 commit 2bd2a89

18 files changed

Lines changed: 552 additions & 445 deletions

File tree

pkg/app/run_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ config-store
6767
config-store-entry
6868
dashboard
6969
dictionary
70-
dictionary-entry
7170
domain
7271
install
7372
ip-list
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
"github.com/fastly/cli/pkg/text"
11+
)
12+
13+
// CreateCommand wraps the CreateCommand from the servicedictionaryentry package.
14+
type CreateCommand struct {
15+
*servicedictionaryentry.CreateCommand
16+
}
17+
18+
// NewCreateCommand returns a usable command registered under the parent.
19+
func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateCommand {
20+
c := CreateCommand{servicedictionaryentry.NewCreateCommand(parent, g)}
21+
c.CmdClause.Hidden()
22+
return &c
23+
}
24+
25+
// Exec implements the command interface.
26+
func (c *CreateCommand) Exec(in io.Reader, out io.Writer) error {
27+
text.Deprecated(out, "Use the 'service dictionary-entry create' command instead.")
28+
return c.CreateCommand.Exec(in, out)
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
"github.com/fastly/cli/pkg/text"
11+
)
12+
13+
// DeleteCommand wraps the DeleteCommand from the servicedictionaryentry package.
14+
type DeleteCommand struct {
15+
*servicedictionaryentry.DeleteCommand
16+
}
17+
18+
// NewDeleteCommand returns a usable command registered under the parent.
19+
func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteCommand {
20+
c := DeleteCommand{servicedictionaryentry.NewDeleteCommand(parent, g)}
21+
c.CmdClause.Hidden()
22+
return &c
23+
}
24+
25+
// Exec implements the command interface.
26+
func (c *DeleteCommand) Exec(in io.Reader, out io.Writer) error {
27+
text.Deprecated(out, "Use the 'service dictionary-entry delete' command instead.")
28+
return c.DeleteCommand.Exec(in, out)
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
"github.com/fastly/cli/pkg/text"
11+
)
12+
13+
// DescribeCommand wraps the DescribeCommand from the servicedictionaryentry package.
14+
type DescribeCommand struct {
15+
*servicedictionaryentry.DescribeCommand
16+
}
17+
18+
// NewDescribeCommand returns a usable command registered under the parent.
19+
func NewDescribeCommand(parent argparser.Registerer, g *global.Data) *DescribeCommand {
20+
c := DescribeCommand{servicedictionaryentry.NewDescribeCommand(parent, g)}
21+
c.CmdClause.Hidden()
22+
return &c
23+
}
24+
25+
// Exec implements the command interface.
26+
func (c *DescribeCommand) Exec(in io.Reader, out io.Writer) error {
27+
text.Deprecated(out, "Use the 'service dictionary-entry describe' command instead.")
28+
return c.DescribeCommand.Exec(in, out)
29+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package dictionaryentry contains the 'dictionary-entry' alias for the 'service dictionary-entry' command.
2+
package dictionaryentry
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
"github.com/fastly/cli/pkg/text"
11+
)
12+
13+
// ListCommand wraps the ListCommand from the servicedictionaryentry package.
14+
type ListCommand struct {
15+
*servicedictionaryentry.ListCommand
16+
}
17+
18+
// NewListCommand returns a usable command registered under the parent.
19+
func NewListCommand(parent argparser.Registerer, g *global.Data) *ListCommand {
20+
c := ListCommand{servicedictionaryentry.NewListCommand(parent, g)}
21+
c.CmdClause.Hidden()
22+
return &c
23+
}
24+
25+
// Exec implements the command interface.
26+
func (c *ListCommand) Exec(in io.Reader, out io.Writer) error {
27+
text.Deprecated(out, "Use the 'service dictionary-entry list' command instead.")
28+
return c.ListCommand.Exec(in, out)
29+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
)
11+
12+
// RootCommand wraps the RootCommand from the servicedictionaryentry package.
13+
type RootCommand struct {
14+
*servicedictionaryentry.RootCommand
15+
}
16+
17+
// NewRootCommand returns a usable command registered under the parent.
18+
func NewRootCommand(parent argparser.Registerer, g *global.Data) *RootCommand {
19+
c := RootCommand{servicedictionaryentry.NewRootCommand(parent, g)}
20+
c.CmdClause.Hidden()
21+
return &c
22+
}
23+
24+
// Exec implements the command interface.
25+
func (c *RootCommand) Exec(in io.Reader, out io.Writer) error {
26+
return c.RootCommand.Exec(in, out)
27+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package dictionaryentry
2+
3+
import (
4+
"io"
5+
6+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
7+
8+
"github.com/fastly/cli/pkg/argparser"
9+
"github.com/fastly/cli/pkg/global"
10+
"github.com/fastly/cli/pkg/text"
11+
)
12+
13+
// UpdateCommand wraps the UpdateCommand from the servicedictionaryentry package.
14+
type UpdateCommand struct {
15+
*servicedictionaryentry.UpdateCommand
16+
}
17+
18+
// NewUpdateCommand returns a usable command registered under the parent.
19+
func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateCommand {
20+
c := UpdateCommand{servicedictionaryentry.NewUpdateCommand(parent, g)}
21+
c.CmdClause.Hidden()
22+
return &c
23+
}
24+
25+
// Exec implements the command interface.
26+
func (c *UpdateCommand) Exec(in io.Reader, out io.Writer) error {
27+
text.Deprecated(out, "Use the 'service dictionary-entry update' command instead.")
28+
return c.UpdateCommand.Exec(in, out)
29+
}

pkg/commands/commands.go

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
aliasaclentry "github.com/fastly/cli/pkg/commands/alias/aclentry"
99
aliasalerts "github.com/fastly/cli/pkg/commands/alias/alerts"
1010
aliasbackend "github.com/fastly/cli/pkg/commands/alias/backend"
11+
aliasdictionaryentry "github.com/fastly/cli/pkg/commands/alias/dictionaryentry"
1112
aliashealthcheck "github.com/fastly/cli/pkg/commands/alias/healthcheck"
1213
aliasimageoptimizerdefaults "github.com/fastly/cli/pkg/commands/alias/imageoptimizerdefaults"
1314
aliaspurge "github.com/fastly/cli/pkg/commands/alias/purge"
@@ -25,7 +26,6 @@ import (
2526
"github.com/fastly/cli/pkg/commands/dashboard"
2627
dashboardItem "github.com/fastly/cli/pkg/commands/dashboard/item"
2728
"github.com/fastly/cli/pkg/commands/dictionary"
28-
"github.com/fastly/cli/pkg/commands/dictionaryentry"
2929
"github.com/fastly/cli/pkg/commands/domain"
3030
"github.com/fastly/cli/pkg/commands/install"
3131
"github.com/fastly/cli/pkg/commands/ip"
@@ -102,6 +102,7 @@ import (
102102
serviceaclentry "github.com/fastly/cli/pkg/commands/service/aclentry"
103103
servicealert "github.com/fastly/cli/pkg/commands/service/alert"
104104
servicebackend "github.com/fastly/cli/pkg/commands/service/backend"
105+
servicedictionaryentry "github.com/fastly/cli/pkg/commands/service/dictionaryentry"
105106
servicedomain "github.com/fastly/cli/pkg/commands/service/domain"
106107
servicehealthcheck "github.com/fastly/cli/pkg/commands/service/healthcheck"
107108
serviceimageoptimizerdefaults "github.com/fastly/cli/pkg/commands/service/imageoptimizerdefaults"
@@ -200,12 +201,6 @@ func Define( // nolint:revive // function-length
200201
dictionaryCreate := dictionary.NewCreateCommand(dictionaryCmdRoot.CmdClause, data)
201202
dictionaryDelete := dictionary.NewDeleteCommand(dictionaryCmdRoot.CmdClause, data)
202203
dictionaryDescribe := dictionary.NewDescribeCommand(dictionaryCmdRoot.CmdClause, data)
203-
dictionaryEntryCmdRoot := dictionaryentry.NewRootCommand(app, data)
204-
dictionaryEntryCreate := dictionaryentry.NewCreateCommand(dictionaryEntryCmdRoot.CmdClause, data)
205-
dictionaryEntryDelete := dictionaryentry.NewDeleteCommand(dictionaryEntryCmdRoot.CmdClause, data)
206-
dictionaryEntryDescribe := dictionaryentry.NewDescribeCommand(dictionaryEntryCmdRoot.CmdClause, data)
207-
dictionaryEntryList := dictionaryentry.NewListCommand(dictionaryEntryCmdRoot.CmdClause, data)
208-
dictionaryEntryUpdate := dictionaryentry.NewUpdateCommand(dictionaryEntryCmdRoot.CmdClause, data)
209204
dictionaryList := dictionary.NewListCommand(dictionaryCmdRoot.CmdClause, data)
210205
dictionaryUpdate := dictionary.NewUpdateCommand(dictionaryCmdRoot.CmdClause, data)
211206
domainCmdRoot := domain.NewRootCommand(app, data)
@@ -655,6 +650,12 @@ func Define( // nolint:revive // function-length
655650
servicedomainList := servicedomain.NewListCommand(servicedomainCmdRoot.CmdClause, data)
656651
servicedomainUpdate := servicedomain.NewUpdateCommand(servicedomainCmdRoot.CmdClause, data)
657652
servicedomainValidate := servicedomain.NewValidateCommand(servicedomainCmdRoot.CmdClause, data)
653+
servicedictionaryentryCmdRoot := servicedictionaryentry.NewRootCommand(serviceCmdRoot.CmdClause, data)
654+
servicedictionaryentryCreate := servicedictionaryentry.NewCreateCommand(servicedictionaryentryCmdRoot.CmdClause, data)
655+
servicedictionaryentryDelete := servicedictionaryentry.NewDeleteCommand(servicedictionaryentryCmdRoot.CmdClause, data)
656+
servicedictionaryentryDescribe := servicedictionaryentry.NewDescribeCommand(servicedictionaryentryCmdRoot.CmdClause, data)
657+
servicedictionaryentryList := servicedictionaryentry.NewListCommand(servicedictionaryentryCmdRoot.CmdClause, data)
658+
servicedictionaryentryUpdate := servicedictionaryentry.NewUpdateCommand(servicedictionaryentryCmdRoot.CmdClause, data)
658659
servicebackendCmdRoot := servicebackend.NewRootCommand(serviceCmdRoot.CmdClause, data)
659660
servicebackendCreate := servicebackend.NewCreateCommand(servicebackendCmdRoot.CmdClause, data)
660661
servicebackendDelete := servicebackend.NewDeleteCommand(servicebackendCmdRoot.CmdClause, data)
@@ -731,6 +732,12 @@ func Define( // nolint:revive // function-length
731732
aliasBackendDescribe := aliasbackend.NewDescribeCommand(aliasBackendRoot.CmdClause, data)
732733
aliasBackendList := aliasbackend.NewListCommand(aliasBackendRoot.CmdClause, data)
733734
aliasBackendUpdate := aliasbackend.NewUpdateCommand(aliasBackendRoot.CmdClause, data)
735+
aliasDictionaryEntryRoot := aliasdictionaryentry.NewRootCommand(app, data)
736+
aliasDictionaryEntryCreate := aliasdictionaryentry.NewCreateCommand(aliasDictionaryEntryRoot.CmdClause, data)
737+
aliasDictionaryEntryDelete := aliasdictionaryentry.NewDeleteCommand(aliasDictionaryEntryRoot.CmdClause, data)
738+
aliasDictionaryEntryDescribe := aliasdictionaryentry.NewDescribeCommand(aliasDictionaryEntryRoot.CmdClause, data)
739+
aliasDictionaryEntryList := aliasdictionaryentry.NewListCommand(aliasDictionaryEntryRoot.CmdClause, data)
740+
aliasDictionaryEntryUpdate := aliasdictionaryentry.NewUpdateCommand(aliasDictionaryEntryRoot.CmdClause, data)
734741
aliasHealthcheckRoot := aliashealthcheck.NewRootCommand(app, data)
735742
aliasHealthcheckCreate := aliashealthcheck.NewCreateCommand(aliasHealthcheckRoot.CmdClause, data)
736743
aliasHealthcheckDelete := aliashealthcheck.NewDeleteCommand(aliasHealthcheckRoot.CmdClause, data)
@@ -845,12 +852,6 @@ func Define( // nolint:revive // function-length
845852
dictionaryCreate,
846853
dictionaryDelete,
847854
dictionaryDescribe,
848-
dictionaryEntryCmdRoot,
849-
dictionaryEntryCreate,
850-
dictionaryEntryDelete,
851-
dictionaryEntryDescribe,
852-
dictionaryEntryList,
853-
dictionaryEntryUpdate,
854855
dictionaryList,
855856
dictionaryUpdate,
856857
domainCmdRoot,
@@ -1284,6 +1285,12 @@ func Define( // nolint:revive // function-length
12841285
servicedomainList,
12851286
servicedomainUpdate,
12861287
servicedomainValidate,
1288+
servicedictionaryentryCmdRoot,
1289+
servicedictionaryentryCreate,
1290+
servicedictionaryentryDelete,
1291+
servicedictionaryentryDescribe,
1292+
servicedictionaryentryList,
1293+
servicedictionaryentryUpdate,
12871294
servicebackendCmdRoot,
12881295
servicebackendCreate,
12891296
servicebackendDelete,
@@ -1367,6 +1374,11 @@ func Define( // nolint:revive // function-length
13671374
aliasBackendDescribe,
13681375
aliasBackendList,
13691376
aliasBackendUpdate,
1377+
aliasDictionaryEntryCreate,
1378+
aliasDictionaryEntryDelete,
1379+
aliasDictionaryEntryDescribe,
1380+
aliasDictionaryEntryList,
1381+
aliasDictionaryEntryUpdate,
13701382
aliasHealthcheckCreate,
13711383
aliasHealthcheckDelete,
13721384
aliasHealthcheckDescribe,

0 commit comments

Comments
 (0)