| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| "v.io/syncbase/x/ref/services/syncbase/server/util" |
| "v.io/syncbase/x/ref/services/syncbase/store" |
| "v.io/v23/security/access" |
| // Database is an internal interface to the database layer. |
| // All methods return VDL-compatible errors. |
| type Database interface { |
| // St returns the storage engine instance for this database. |
| // App returns the app handle for this database. |
| // CheckPermsInternal checks whether the given RPC (ctx, call) is allowed per |
| // Designed for use from within App.DeleteNoSQLDatabase. |
| CheckPermsInternal(ctx *context.T, call rpc.ServerCall, st store.StoreReadWriter) error |
| // SetPermsInternal updates the database perms. |
| // Designed for use from within App.SetDatabasePerms. |
| SetPermsInternal(ctx *context.T, call rpc.ServerCall, perms access.Permissions, version string) error |