Documentation
¶
Index ¶
- 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 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 UserEqual(u, v *userpb.UserId) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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.
Types ¶
This section is empty.