Documentation ¶
Index ¶
- func AppBlessingFromContext(ctx *context.T) (string, error)
- func Decode(s string) (string, error)
- func DecodeId(s string) (wire.Id, error)
- func Encode(s string) string
- func EncodeId(id wire.Id) string
- func IsPrefix(start, limit string) bool
- func ListChildIds(ctx *context.T, parentFullName string) ([]wire.Id, error)
- func ParseCollectionRowPair(ctx *context.T, pattern string) (wire.Id, string, error)
- func PrefixRangeLimit(p string) string
- func PrefixRangeStart(p string) string
- func SortIds(ids []wire.Id)
- func UserBlessingFromContext(ctx *context.T) (string, error)
- func ValidId(id wire.Id) bool
- func ValidRowKey(s string) bool
- type AccessController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppBlessingFromContext ¶
AppBlessingFromContext returns an app blessing pattern from the given context. TODO(sadovsky,ashankar): Implement.
func Encode ¶
Encode escapes a component name for use in a Syncbase object name. In particular, it replaces bytes "%" and "/" with the "%" character followed by the byte's two-digit hex code. Clients using the client library need not escape names themselves; the client library does so on their behalf.
func IsPrefix ¶
IsPrefix returns true if start and limit together represent a prefix range. If true, start is the represented prefix.
func ListChildIds ¶
ListChildIds returns a sorted list of ids of all children of parentFullName.
func ParseCollectionRowPair ¶
ParseCollectionRowPair splits the "<collectionId>/<row>" part of a Syncbase object name into the collection id and the row key or prefix.
func PrefixRangeLimit ¶
PrefixRangeLimit returns the limit of the row range for the given prefix.
func PrefixRangeStart ¶
PrefixRangeStart returns the start of the row range for the given prefix.
func UserBlessingFromContext ¶
UserBlessingFromContext returns a user blessing pattern from the given context. TODO(sadovsky,ashankar): Implement.
func ValidRowKey ¶
ValidRowKey returns true iff the given string is a valid row key.
Types ¶
type AccessController ¶
type AccessController interface { // SetPermissions replaces the current Permissions for an object. // For detailed documentation, see Object.SetPermissions. SetPermissions(ctx *context.T, perms access.Permissions, version string) error // GetPermissions returns the current Permissions for an object. // For detailed documentation, see Object.GetPermissions. GetPermissions(ctx *context.T) (perms access.Permissions, version string, err error) }
AccessController provides access control for various syncbase objects.