Skip to content

Commit

Permalink
feat(config-store): Add Config Store commands
Browse files Browse the repository at this point in the history
  • Loading branch information
awilliams-fastly committed Mar 14, 2023
1 parent 10b5dbe commit ec57261
Show file tree
Hide file tree
Showing 26 changed files with 2,301 additions and 2 deletions.
14 changes: 14 additions & 0 deletions pkg/api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,20 @@ type Interface interface {
UpdateServiceAuthorization(i *fastly.UpdateServiceAuthorizationInput) (*fastly.ServiceAuthorization, error)
DeleteServiceAuthorization(i *fastly.DeleteServiceAuthorizationInput) error

CreateConfigStore(i *fastly.CreateConfigStoreInput) (*fastly.ConfigStore, error)
DeleteConfigStore(i *fastly.DeleteConfigStoreInput) error
GetConfigStore(i *fastly.GetConfigStoreInput) (*fastly.ConfigStore, error)
GetConfigStoreMetadata(i *fastly.GetConfigStoreMetadataInput) (*fastly.ConfigStoreMetadata, error)
ListConfigStores() ([]*fastly.ConfigStore, error)
ListConfigStoreServices(i *fastly.ListConfigStoreServicesInput) ([]*fastly.Service, error)
UpdateConfigStore(i *fastly.UpdateConfigStoreInput) (*fastly.ConfigStore, error)

CreateConfigStoreItem(i *fastly.CreateConfigStoreItemInput) (*fastly.ConfigStoreItem, error)
DeleteConfigStoreItem(i *fastly.DeleteConfigStoreItemInput) error
GetConfigStoreItem(i *fastly.GetConfigStoreItemInput) (*fastly.ConfigStoreItem, error)
ListConfigStoreItems(i *fastly.ListConfigStoreItemsInput) ([]*fastly.ConfigStoreItem, error)
UpdateConfigStoreItem(i *fastly.UpdateConfigStoreItemInput) (*fastly.ConfigStoreItem, error)

CreateObjectStore(i *fastly.CreateObjectStoreInput) (*fastly.ObjectStore, error)
ListObjectStores(i *fastly.ListObjectStoresInput) (*fastly.ListObjectStoresResponse, error)
DeleteObjectStore(i *fastly.DeleteObjectStoreInput) error
Expand Down
28 changes: 28 additions & 0 deletions pkg/app/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/fastly/cli/pkg/commands/backend"
"github.com/fastly/cli/pkg/commands/compute"
"github.com/fastly/cli/pkg/commands/config"
"github.com/fastly/cli/pkg/commands/configstore"
"github.com/fastly/cli/pkg/commands/configstoreentry"
"github.com/fastly/cli/pkg/commands/dictionary"
"github.com/fastly/cli/pkg/commands/dictionaryentry"
"github.com/fastly/cli/pkg/commands/domain"
Expand Down Expand Up @@ -115,6 +117,19 @@ func defineCommands(
computeUpdate := compute.NewUpdateCommand(computeCmdRoot.CmdClause, g, m)
computeValidate := compute.NewValidateCommand(computeCmdRoot.CmdClause, g, m)
configCmdRoot := config.NewRootCommand(app, g)
configstoreCmdRoot := configstore.NewRootCommand(app, g)
configstoreCreate := configstore.NewCreateCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreDelete := configstore.NewDeleteCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreDescribe := configstore.NewDescribeCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreList := configstore.NewListCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreListServices := configstore.NewListServicesCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreUpdate := configstore.NewUpdateCommand(configstoreCmdRoot.CmdClause, g, m)
configstoreentryCmdRoot := configstoreentry.NewRootCommand(app, g)
configstoreentryCreate := configstoreentry.NewCreateCommand(configstoreentryCmdRoot.CmdClause, g, m)
configstoreentryDelete := configstoreentry.NewDeleteCommand(configstoreentryCmdRoot.CmdClause, g, m)
configstoreentryDescribe := configstoreentry.NewDescribeCommand(configstoreentryCmdRoot.CmdClause, g, m)
configstoreentryList := configstoreentry.NewListCommand(configstoreentryCmdRoot.CmdClause, g, m)
configstoreentryUpdate := configstoreentry.NewUpdateCommand(configstoreentryCmdRoot.CmdClause, g, m)
dictionaryCmdRoot := dictionary.NewRootCommand(app, g)
dictionaryCreate := dictionary.NewCreateCommand(dictionaryCmdRoot.CmdClause, g, m)
dictionaryDelete := dictionary.NewDeleteCommand(dictionaryCmdRoot.CmdClause, g, m)
Expand Down Expand Up @@ -447,6 +462,19 @@ func defineCommands(
computeUpdate,
computeValidate,
configCmdRoot,
configstoreCmdRoot,
configstoreCreate,
configstoreDelete,
configstoreDescribe,
configstoreList,
configstoreListServices,
configstoreUpdate,
configstoreentryCmdRoot,
configstoreentryCreate,
configstoreentryDelete,
configstoreentryDescribe,
configstoreentryList,
configstoreentryUpdate,
dictionaryCmdRoot,
dictionaryCreate,
dictionaryDelete,
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ auth-token
backend
compute
config
config-store
config-store-entry
dictionary
dictionary-entry
domain
Expand Down
Loading

0 comments on commit ec57261

Please sign in to comment.