utils

package
v1.8.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuperUserID              = int64(1)
	RequestPathUserIDArgName = "userID"
	AsOwnerSuffix            = "AsOwner"
)

Variables

This section is empty.

Functions

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 OpenFile

func OpenFile(filePath string) (byteCount int, buffer *bytes.Buffer, e error)

OpenFile opens a file in chunks

func QueryIDs

func QueryIDs(query string) []int64

func QueryStrings added in v1.8.37

func QueryStrings(query string) []string

Types

type Permission

type Permission string

Permission is the name of a permission

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL