util

package
v0.0.0-...-ff5f600 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(ctx *context.T, presented string, actual uint64) error

func ErrorToExists

func ErrorToExists(err error) (bool, error)

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 FormatVersion(version uint64) string

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL