package
2.27.7
Repository: https://github.com/cs3org/reva.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AppendJSONToOpaque adds a new key value pair as a json on the given opaque and returns it.
AppendPlainToOpaque adds a new key value pair as a plain string on the given opaque and returns it.
CheckPermission checks if the user role contains the given permission.
ExistsInOpaque returns true if the key exists in the opaque (ignoring the value).
ExtractGranteeID returns the ID, user or group, set in the GranteeId object.
GetUserWithContext gets the specified accepted user.
GetAppViewMode converts a human-readable string to an appprovider view mode for opening a resource in an app.
GetClientIP retrieves the client IP from incoming requests.
GetGroupMembers returns all members of the given group.
GetLDAPClientForAuth initializes an LDAP connection.
GetLDAPClientWithReconnect initializes a long-lived LDAP connection that automatically reconnects on connection errors.
GetResource returns a resource by reference.
GetResourceByID is a convenience method to get a resource by its resourceID.
GetServiceUserContext returns an authenticated context of the given service user Deprecated: Use GetServiceUserContextWithContext().
GetServiceUserContextWithContext returns an authenticated context of the given service user.
GetServiceUserToken returns a reva authentication token for the given service user.
GetSpace returns the given space.
GetSpaceMembers returns all members of the given space that have at least the given role.
GetUser gets the specified user Deprecated: Use GetUserWithContext().
GetUserWithContext gets the specified user.
GetViewMode converts a human-readable string to a view mode for opening a resource in an app.
GranteeEqual returns whether two grantees have the same field values.
GroupEqual returns whether two groups have the same field values.
IsAbsolutePathReference returns true if the given reference qualifies as a global path when only the path is set and starts with /.
IsAbsoluteReference returns true if the given reference qualifies as absolute when either only the resource id is set or only the path is set and starts with / TODO(corby): Currently if the path is empty, the ResourceId is set but has empty storageId and OpaqueId then the reference is still being viewed as absolute.
IsEmailValid checks whether the provided email has a valid format.
IsRelativeReference returns true if the given reference qualifies as relative when the resource id is set and the path starts with a .
IsSpaceRoot checks if the given resource info is referring to a space root.
IsStatusCodeError returns true if `err` was caused because of status code `code`.
IsValidName cheks if the given name doesn't contain any non-alpha, space or dash characters.
IsValidPhoneNumber checks whether the provided phone number has a valid format.
IsValidWebAddress checks whether the provided address is a valid URL.
LaterTS returns the timestamp which occurs later.
MakeRelativePath prefixes the path with a .
MarshalProtoV1ToJSON marshals a proto V1 message to a JSON byte array TODO: update this once we start using V2 in CS3APIs.
MergeOpaques will merge the opaques.
MTimeToTime converts a string in the form "<unix>.<nanoseconds>" into a go time.Time.
MTimeToTS converts a string in the form "<unix>.<nanoseconds>" into a CS3 Timestamp.
RandString is a helper to create tokens.
ReadJSONFromOpaque reads and unmarshals a value from the opaque in the given interface{} (Make sure it's a pointer!).
ReadPlainFromOpaque reads a plain string from the given opaque map.
RemoveItem removes the given item, its children and all empty parent folders.
ResolveID returns either the given userID or all members of the given groupID (if userID is nil).
ResolvePath converts relative local paths to absolute paths.
ResourceEqual returns whether two resources have the same field values.
ResourceIDEqual returns whether two resources have the same field values.
Skip evaluates whether a source endpoint contains any of the prefixes.
StatusCodeErrorToCS3Status translate the `statusCodeError` type to CS3 Status returns nil if `err` does not match to the `statusCodeError` type.
TimeToOCMtime converts a Go time.Time to a string in the form "<unix>.<nanoseconds>".
TimeToTS converts Go's time.Time to a protobuf Timestamp.
ToSnakeCase converts a CamelCase string to a snake_case string.
TSNow returns the current UTC timestamp.
TSToTime converts a protobuf Timestamp to Go's time.Time.
TSToUnixNano converts a protobuf Timestamp to uint64 with nanoseconds resolution.
UnmarshalJSONToProtoV1 decodes a JSON byte array to a specified proto message type TODO: update this once we start using V2 in CS3APIs.
UserEqual returns whether two users have the same field values.
UserIDEqual returns whether two users have the same opaqueid values.
UserTypeMap translates account type string to CS3 UserType.
UserTypeToString translates CS3 UserType to user-readable string.

# Variables

Possible roles in spaces.
Possible roles in spaces.
Package error checkers.
Package error checkers.
Possible roles in spaces.
OCMStorageProviderID is the storage id used by the ocmreceived storageprovider.
OCMStorageSpaceID is the space id used by the ocmreceived storageprovider.
PublicStorageProviderID is the storage id used by the sharestorageprovider.
PublicStorageSpaceID is the space id used by the sharestorageprovider.
ShareStorageProviderID is the provider id used by the sharestorageprovider.
ShareStorageSpaceID is the space id used by the sharestorageprovider share jail space.
SpaceGrant is used to signal the storageprovider that the grant is on a space.
Possible roles in spaces.

# Structs

LDAPConn holds the basic parameter for setting up an LDAP connection.

# Type aliases

SpaceRole defines the user role on space.