|
|
@ -23,6 +23,7 @@ type VirtualFilerStore interface { |
|
|
|
AddPathSpecificStore(path string, storeId string, store FilerStore) |
|
|
|
OnBucketCreation(bucket string) |
|
|
|
OnBucketDeletion(bucket string) |
|
|
|
CanDropWholeBucket() bool |
|
|
|
} |
|
|
|
|
|
|
|
type FilerStoreWrapper struct { |
|
|
@ -42,6 +43,13 @@ func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func (fsw *FilerStoreWrapper) CanDropWholeBucket() bool { |
|
|
|
if ba, ok := fsw.defaultStore.(BucketAware); ok { |
|
|
|
return ba.IsDropBucketAltogether() |
|
|
|
} |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
func (fsw *FilerStoreWrapper) OnBucketCreation(bucket string) { |
|
|
|
for _, store := range fsw.storeIdToStore { |
|
|
|
if ba, ok := store.(BucketAware); ok { |
|
|
|