Removes previous versions of Sync Gateway's design docs found on the server
(ctx context.Context, previewOnly bool)
| 765 | |
| 766 | // Removes previous versions of Sync Gateway's design docs found on the server |
| 767 | func (dbCtx *DatabaseContext) RemoveObsoleteDesignDocs(ctx context.Context, previewOnly bool) (removedDesignDocs []string, err error) { |
| 768 | ds := dbCtx.Bucket.DefaultDataStore() |
| 769 | viewStore, ok := ds.(sgbucket.ViewStore) |
| 770 | if !ok { |
| 771 | return []string{}, fmt.Errorf("Datastore does not support views") |
| 772 | } |
| 773 | return removeObsoleteDesignDocs(ctx, viewStore, previewOnly, dbCtx.UseViews()) |
| 774 | } |
| 775 | |
| 776 | // getDataStores returns all datastores on the database, including metadatastore |
| 777 | func (dbCtx *DatabaseContext) getDataStores() []sgbucket.DataStore { |