Skip to content

Commit

Permalink
cleanup dsstore
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 299617479
Change-Id: If059239b1e59d77135287aea9319ad399c2548e4
  • Loading branch information
ghasemloo authored and copybara-github committed Mar 8, 2020
1 parent 37c58c4 commit e7b9300
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 107 deletions.
2 changes: 1 addition & 1 deletion gcp/dam/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func main() {
var store storage.Store
switch storageType {
case "datastore":
store = dsstore.NewDatastoreStorage(ctx, project, srvName, cfgPath)
store = dsstore.NewStore(ctx, project, srvName, cfgPath)
case "memory":
store = storage.NewMemoryStorage(srvName, cfgPath)
// Import and resolve template variables, if any.
Expand Down
4 changes: 2 additions & 2 deletions gcp/dam_import/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func main() {
accountPrefix = *pre
}
ctx := context.Background()
store := dsstore.NewDatastoreStorage(context.Background(), project, service, *path)
store := dsstore.NewStore(context.Background(), project, service, *path)
wh := saw.MustNew(ctx, store)
vars := map[string]string{
"${YOUR_PROJECT_ID}": project,
Expand Down Expand Up @@ -81,7 +81,7 @@ func main() {
glog.Infof("SUCCESS resetting DAM service %q", service)
}

func cleanupServiceAccounts(ctx context.Context, accountPrefix, project string, store *dsstore.DatastoreStorage) {
func cleanupServiceAccounts(ctx context.Context, accountPrefix, project string, store *dsstore.Store) {
wh := saw.MustNew(ctx, store)
var (
removed, skipped, errors int
Expand Down
2 changes: 1 addition & 1 deletion gcp/ic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func main() {
var store storage.Store
switch storageType {
case "datastore":
store = dsstore.NewDatastoreStorage(ctx, project, srvName, cfgPath)
store = dsstore.NewStore(ctx, project, srvName, cfgPath)
case "memory":
store = storage.NewMemoryStorage(srvName, cfgPath)
// Import and resolve template variables, if any.
Expand Down
2 changes: 1 addition & 1 deletion gcp/ic_import/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
envPrefix = "-" + env
service += envPrefix
}
store := dsstore.NewDatastoreStorage(context.Background(), project, service, *path)
store := dsstore.NewStore(context.Background(), project, service, *path)

vars := map[string]string{
"${YOUR_PROJECT_ID}": project,
Expand Down
Loading

0 comments on commit e7b9300

Please sign in to comment.