Documentation
¶
Index ¶
- Variables
- func ExtractGranteeID(grantee *provider.Grantee) (*userpb.UserId, *grouppb.GroupId)
- func GetClientIP(r *http.Request) (string, error)
- func GranteeEqual(u, v *provider.Grantee) bool
- func GroupEqual(u, v *grouppb.GroupId) bool
- func IsEmailValid(e string) bool
- func MarshalProtoV1ToJSON(m proto.Message) ([]byte, error)
- func RandString(n int) string
- func ResolvePath(path string) (string, error)
- func ResourceEqual(u, v *provider.ResourceId) bool
- func Skip(source string, prefixes []string) bool
- func TSToTime(ts *types.Timestamp) time.Time
- func TSToUnixNano(ts *types.Timestamp) uint64
- func ToSnakeCase(str string) string
- func UnmarshalJSONToProtoV1(b []byte, m proto.Message) error
- func UserEqual(u, v *userpb.UserId) bool
Constants ¶
This section is empty.
Variables ¶
var ( // GlobalRegistry configures a service registry globally accessible. It defaults to a memory registry. The usage of // globals is not encouraged, and this is a workaround until the PR is out of a draft state. GlobalRegistry registry.Registry = memory.New(map[string]interface{}{}) )
Functions ¶
func ExtractGranteeID ¶
ExtractGranteeID returns the ID, user or group, set in the GranteeId object
func GetClientIP ¶
GetClientIP retrieves the client IP from incoming requests
func GranteeEqual ¶
GranteeEqual returns whether two grantees have the same field values.
func GroupEqual ¶
GroupEqual returns whether two groups have the same field values.
func IsEmailValid ¶
IsEmailValid checks whether the provided email has a valid format.
func MarshalProtoV1ToJSON ¶
MarshalProtoV1ToJSON marshals a proto V1 message to a JSON byte array TODO: update this once we start using V2 in CS3APIs
func ResolvePath ¶
ResolvePath converts relative local paths to absolute paths
func ResourceEqual ¶
func ResourceEqual(u, v *provider.ResourceId) bool
ResourceEqual returns whether two resources have the same field values.
func Skip ¶
Skip evaluates whether a source endpoint contains any of the prefixes. i.e: /a/b/c/d/e contains prefix /a/b/c
func TSToUnixNano ¶
TSToUnixNano converts a protobuf Timestamp to uint64 with nanoseconds resolution.
func ToSnakeCase ¶
ToSnakeCase converts a CamelCase string to a snake_case string.
func UnmarshalJSONToProtoV1 ¶
UnmarshalJSONToProtoV1 decodes a JSON byte array to a specified proto message type TODO: update this once we start using V2 in CS3APIs
Types ¶
This section is empty.