fp

package
v0.0.0-...-4eccbda Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAccessNotPermitted        = "access not permitted"
	ErrUserNotFound              = "user not found"
	ErrPermitNotFound            = "permit not found"
	ErrRoleNotFound              = "role not found"
	ErrPermissionNotFound        = "permission not found"
	ErrGrantingPermit            = "error granting permit"
	ErrRevokingPermit            = "error revoking permit"
	ErrUnmarshallingPermits      = "error unmarshalling permits"
	ErrMarshallingPermits        = "error marshalling permits"
	ErrGettingRolePermissions    = "error getting role permissions"
	ErrRoleOrPermissionNotFound  = "role or permission not found"
	ErrAddingRolePermission      = "error adding role permission"
	ErrDeletingRolePermission    = "error deleting role permission"
	ErrGettingRoles              = "error getting roles"
	ErrAddingRoles               = "error adding roles"
	ErrDeletingRoles             = "error deleting roles"
	ErrGettingPermissions        = "error getting permissions"
	ErrAddingPermissions         = "error adding permissions"
	ErrDeletingPermissions       = "error deleting permissions"
	ErrGettingUserPermits        = "error getting user permits"
	ErrUserAlreadyHaveThisPermit = "user already have this permit"
	ErrGettingUser               = "error getting user"
)

Variables

This section is empty.

Functions

func ExistPermit

func ExistPermit(list []string, ele string) bool

func PrintError

func PrintError(msg string, err error) error

func StringInSlice

func StringInSlice(a string, list []string) bool

Types

type FP

type FP struct {
	Options *Options
}

func (*FP) GetUserId

func (f *FP) GetUserId(c *fiber.Ctx) string

type Options

type Options struct {
	UserTableName    string
	UserPermitsField string
	UserIdField      string
	JwtLocals        string
}

type User

type User struct {
	ID   uuid.UUID
	Role []string
}

Jump to

Keyboard shortcuts

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