utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPerm

func HasPerm(user IUserContainer, perm Permission) bool

func HasPermOld added in v1.5.8

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 Paged

func Paged(limit, page int64) (offset int64)

func QueryIDs added in v1.5.8

func QueryIDs(query string) []int64

Types

type IUserContainer added in v1.5.8

type IUserContainer interface {
	ID() int64
	Activated() bool
	Disabled() bool
	Locked() bool
	Permissions() []string
}

type Permission added in v1.5.1

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