package
1.29.0
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
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Cast casts a value `v` to the value `to`.
ExtractGranteeID returns the ID, user or group, set in the GranteeId object.
Extract uid and gid from auth object.
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.
No description provided by the author
This function is used when we don't want to pass any additional auth info.
GetLDAPConnection initializes an LDAPS connection and allows to set TLS options e.g.
Retrieve current user fromt he context.
Returns the userAuth if this is a valid auth object, otherwise returns daemonAuth.
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.
HasOCMShareRole return true if the user has a ocm share role.
HasPermissions returns true if all permissions defined in the struct toCheck are set in the target.
HasPublicShareRole return true if the user has a public share role.
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.
IsLightweightUser returns true if the user is a lightweight or federated account.
IsRelativeReference returns true if the given reference qualifies as relative when the resource id is set and the path starts with a .
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.
ParseStorageSpaceReference parses a string into a spaces reference.
RandString is a helper to create tokens.
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.
SplitStorageSpaceID can be used to split `storagespaceid` into `storageid` and `nodeid` Currently they are built using `<storageid>!<nodeid>` in the decomposedfs, but other drivers might return different ids.
ToSnakeCase converts a CamelCase string to a snake_case string.
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.
UserTypeMap translates account type string to CS3 UserType.
UserTypeToString translates CS3 UserType to user-readable string.

# Variables

GlobalRegistry configures a service registry globally accessible.

# Structs

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