Documentation ¶
Index ¶
- Constants
- func BatchIDs(ids []int64, batchSize int) [][]int64
- func ExtractFeatureFromPerm(perm Permission) string
- func ExtractIDs(objLen int, fn func(index int) int64) []int64
- func ExtractIndex(objLen int, fn func(index int) int64) map[int64]int
- func HasPerm(req *request.Request, user types.IUserContainer, perm Permission) bool
- func HasPermOld(userID int64, perms []string, permName Permission) bool
- func OpenFile(filePath string) (byteCount int, buffer *bytes.Buffer, e error)
- func QueryIDs(query string) []int64
- func QueryStrings(query string) []string
- func SumFloat(objLen int, fn func(index int) float64) float64
- func SumInt64(objLen int, fn func(index int) int64) int64
- type Permission
Constants ¶
View Source
const ( SuperUserID = int64(1) RequestPathUserIDArgName = "userID" AsOwnerSuffix = "AsOwner" FeaturePermSeparator = "_" )
Variables ¶
This section is empty.
Functions ¶
func ExtractFeatureFromPerm ¶ added in v1.8.59
func ExtractFeatureFromPerm(perm Permission) string
ExtractPermParts extracts the parts of a permission into a featureName and a permissionName
func ExtractIndex ¶ added in v1.8.75
func HasPerm ¶
func HasPerm(req *request.Request, user types.IUserContainer, perm Permission) bool
func HasPermOld ¶
func HasPermOld(userID int64, perms []string, permName Permission) bool
HasPerm verifies that a permission exists in a userProfile's permissions
func QueryStrings ¶ added in v1.8.37
Types ¶
Click to show internal directories.
Click to hide internal directories.