Documentation ¶
Index ¶
- func CheckVersion(ctx *context.T, presented string, actual uint64) error
- func ErrorToExists(err error) (bool, error)
- func FormatVersion(version uint64) string
- func GetWithAuth(ctx *context.T, call rpc.ServerCall, st store.StoreReader, k string, v Permser) error
- func GlobChildren(ctx *context.T, call rpc.GlobChildrenServerCall, matcher *glob.Element, ...) error
- func UpdateWithAuth(ctx *context.T, call rpc.ServerCall, tx store.Transaction, k string, v Permser, ...) error
- type Permser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorToExists ¶
ErrorToExists wraps a call to Get and returns true if Get found the object, false otherwise, suppressing ErrNoExist. Access errors are suppressed as well because they imply existence in some Get implementations. TODO(ivanpi): Revisit once ACL specification is finalized.
func FormatVersion ¶
func GetWithAuth ¶
func GetWithAuth(ctx *context.T, call rpc.ServerCall, st store.StoreReader, k string, v Permser) error
GetWithAuth does Get followed by an auth check.
func GlobChildren ¶
func GlobChildren(ctx *context.T, call rpc.GlobChildrenServerCall, matcher *glob.Element, sntx store.SnapshotOrTransaction, stKeyPrefix string) error
GlobChildren implements glob over the Syncbase namespace.
func UpdateWithAuth ¶
func UpdateWithAuth(ctx *context.T, call rpc.ServerCall, tx store.Transaction, k string, v Permser, fn func() error) error
UpdateWithAuth performs a read-modify-write. Input v is populated by the "read" step. fn should "modify" v. Performs an auth check as part of the "read" step.
Types ¶
type Permser ¶
type Permser interface { // GetPerms returns the Permissions for this Layer. GetPerms() access.Permissions }
Click to show internal directories.
Click to hide internal directories.