get.porter.sh/porter@v1.3.0/pkg/storage/provider.go (about) 1 package storage 2 3 import ( 4 "context" 5 ) 6 7 // Provider handles high level functions over Porter's storage systems such as 8 // migrating data formats. 9 type Provider interface { 10 Store 11 12 // WriteSchema persists an up-to-date schema to the underlying storage. 13 WriteSchema(ctx context.Context) error 14 15 // Migrate executes a migration on any/all of Porter's storage sub-systems. 16 Migrate(ctx context.Context, opts MigrateOptions) error 17 } 18 19 // MigrateOptions are the set of available options to configure a storage data migration 20 // from an older version of Porter into the current version. 21 type MigrateOptions struct { 22 // OldHome is the path to the PORTER_HOME directory for the previous version of porter. 23 OldHome string 24 25 // OldStorageAccount is the name of the storage account configured in MigrateOptions.OldHome 26 // where records should be migrated from. 27 OldStorageAccount string 28 29 // NewNamespace is the namespace into which records should be imported. 30 NewNamespace string 31 }