Documentation ¶
Index ¶
Constants ¶
const ( // on a peer, local and peer supplied data LocalScope = Scope("local") PeerScope = Scope("peer") ConversationScope = Scope("conversation") // on a local profile, public data and private settings PublicScope = Scope("public") UnknownScope = Scope("unknown") )
scopes for attributes
const ( // ProfileZone for attributes related to profile details like name and profile image ProfileZone = Zone("profile") // FilesharingZone for attributes related to file sharing FilesharingZone = Zone("filesharing") // UnknownZone is a catch all useful for error handling UnknownZone = Zone("unknown") )
const Separator = "."
Separator for scope and the rest of path
Variables ¶
This section is empty.
Functions ¶
func GetLocalScope ¶
GetLocalScope takes a path and attaches the local scope to it Deprecated: Use ConstructScopedZonedPath
func GetPeerScope ¶
GetPeerScope takes a path and attaches the peer scope to it Deprecated: Use ConstructScopedZonedPath
func GetPublicScope ¶
GetPublicScope takes a path and attaches the local scope to it Deprecated: Use ConstructScopedZonedPath
Types ¶
type Scope ¶ added in v0.12.0
type Scope string
Scope strongly types Scope strings
func (Scope) ConstructScopedZonedPath ¶ added in v0.12.0
func (scope Scope) ConstructScopedZonedPath(zonedPath ZonedPath) ScopedZonedPath
ConstructScopedZonedPath enforces a scope over a zoned path
func (Scope) IsConversation ¶ added in v0.12.0
IsConversation returns true if the scope is a conversation scope
type ScopedZonedPath ¶ added in v0.12.0
type ScopedZonedPath string
ScopedZonedPath typed path with a scope and a zone
func (ScopedZonedPath) ToString ¶ added in v0.12.0
func (szp ScopedZonedPath) ToString() string
ToString converts a ScopedZonedPath to a string
type Zone ¶ added in v0.12.0
type Zone string
Zone forces attributes to belong to a given subsystem e.g profile or filesharing Note: Zone is different from Scope which deals with public visibility of a given attribute
func ParseZone ¶ added in v0.12.0
ParseZone takes in an untyped string and returns an explicit Zone along with the rest of the untyped path
func (Zone) ConstructZonedPath ¶ added in v0.12.0
ConstructZonedPath takes a path and attaches a zone to it. Note that this returns a ZonedPath which isn't directly usable, it must be given to ConstructScopedZonedPath in order to be realized into an actual attribute path.