-
Notifications
You must be signed in to change notification settings - Fork 70
CDTOOL-1254 convert dictionary to service dictionary #1630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,6 @@ config | |
| config-store | ||
| config-store-entry | ||
| dashboard | ||
| dictionary | ||
| dictionary-entry | ||
| domain | ||
| install | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| newcmd "github.com/fastly/cli/pkg/commands/service/dictionary" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| "github.com/fastly/cli/pkg/text" | ||
| ) | ||
|
|
||
| // CreateCommand wraps the CreateCommand from the newcmd package. | ||
| type CreateCommand struct { | ||
| *newcmd.CreateCommand | ||
| } | ||
|
|
||
| // NewCreateCommand returns a usable command registered under the parent. | ||
| func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateCommand { | ||
| c := CreateCommand{newcmd.NewCreateCommand(parent, g)} | ||
| c.CmdClause.Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *CreateCommand) Exec(in io.Reader, out io.Writer) error { | ||
| text.Deprecated(out, "Use the 'service dictionary create' command instead.") | ||
| return c.CreateCommand.Exec(in, out) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| newcmd "github.com/fastly/cli/pkg/commands/service/dictionary" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| "github.com/fastly/cli/pkg/text" | ||
| ) | ||
|
|
||
| // DeleteCommand wraps the DeleteCommand from the newcmd package. | ||
| type DeleteCommand struct { | ||
| *newcmd.DeleteCommand | ||
| } | ||
|
|
||
| // NewDeleteCommand returns a usable command registered under the parent. | ||
| func NewDeleteCommand(parent argparser.Registerer, g *global.Data) *DeleteCommand { | ||
| c := DeleteCommand{newcmd.NewDeleteCommand(parent, g)} | ||
| c.CmdClause.Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *DeleteCommand) Exec(in io.Reader, out io.Writer) error { | ||
| text.Deprecated(out, "Use the 'service dictionary delete' command instead.") | ||
| return c.DeleteCommand.Exec(in, out) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| newcmd "github.com/fastly/cli/pkg/commands/service/dictionary" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| "github.com/fastly/cli/pkg/text" | ||
| ) | ||
|
|
||
| // DescribeCommand wraps the DescribeCommand from the newcmd package. | ||
| type DescribeCommand struct { | ||
| *newcmd.DescribeCommand | ||
| } | ||
|
|
||
| // NewDescribeCommand returns a usable command registered under the parent. | ||
| func NewDescribeCommand(parent argparser.Registerer, g *global.Data) *DescribeCommand { | ||
| c := DescribeCommand{newcmd.NewDescribeCommand(parent, g)} | ||
| c.CmdClause.Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *DescribeCommand) Exec(in io.Reader, out io.Writer) error { | ||
| if !c.JSONOutput.Enabled { | ||
| text.Deprecated(out, "Use the 'service dictionary describe' command instead.") | ||
| } | ||
| return c.DescribeCommand.Exec(in, out) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| // Package dictionary contains deprecated aliases for the 'service dictionary' commands. | ||
| package dictionary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| newcmd "github.com/fastly/cli/pkg/commands/service/dictionary" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| "github.com/fastly/cli/pkg/text" | ||
| ) | ||
|
|
||
| // ListCommand wraps the ListCommand from the newcmd package. | ||
| type ListCommand struct { | ||
| *newcmd.ListCommand | ||
| } | ||
|
|
||
| // NewListCommand returns a usable command registered under the parent. | ||
| func NewListCommand(parent argparser.Registerer, g *global.Data) *ListCommand { | ||
| c := ListCommand{newcmd.NewListCommand(parent, g)} | ||
| c.CmdClause.Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *ListCommand) Exec(in io.Reader, out io.Writer) error { | ||
| if !c.JSONOutput.Enabled { | ||
| text.Deprecated(out, "Use the 'service dictionary list' command instead.") | ||
| } | ||
| return c.ListCommand.Exec(in, out) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| ) | ||
|
|
||
| // RootCommand is the parent command for all subcommands in this package. | ||
| // It should be installed under the primary root command. | ||
| type RootCommand struct { | ||
| argparser.Base | ||
| // no flags | ||
| } | ||
|
|
||
| // CommandName is the string to be used to invoke this command. | ||
| const CommandName = "dictionary" | ||
|
|
||
| // NewRootCommand returns a new command registered in the parent. | ||
| func NewRootCommand(parent argparser.Registerer, g *global.Data) *RootCommand { | ||
| var c RootCommand | ||
| c.Globals = g | ||
| c.CmdClause = parent.Command(CommandName, "Manipulate FastlyService Dictionaries").Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *RootCommand) Exec(_ io.Reader, _ io.Writer) error { | ||
| panic("unreachable") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package dictionary | ||
|
|
||
| import ( | ||
| "io" | ||
|
|
||
| newcmd "github.com/fastly/cli/pkg/commands/service/dictionary" | ||
|
|
||
| "github.com/fastly/cli/pkg/argparser" | ||
| "github.com/fastly/cli/pkg/global" | ||
| "github.com/fastly/cli/pkg/text" | ||
| ) | ||
|
|
||
| // UpdateCommand wraps the UpdateCommand from the newcmd package. | ||
| type UpdateCommand struct { | ||
| *newcmd.UpdateCommand | ||
| } | ||
|
|
||
| // NewUpdateCommand returns a usable command registered under the parent. | ||
| func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateCommand { | ||
| c := UpdateCommand{newcmd.NewUpdateCommand(parent, g)} | ||
| c.CmdClause.Hidden() | ||
| return &c | ||
| } | ||
|
|
||
| // Exec implements the command interface. | ||
| func (c *UpdateCommand) Exec(in io.Reader, out io.Writer) error { | ||
| text.Deprecated(out, "Use the 'service dictionary update' command instead.") | ||
| return c.UpdateCommand.Exec(in, out) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.