utils

package
v0.0.0-...-7eff179 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminCreation

func AdminCreation()

func CheckIfMailExists

func CheckIfMailExists(mailInput string) error

func CheckIfUsernameExists

func CheckIfUsernameExists(usernameInput string) error

func ConvertStringToStruct

func ConvertStringToStruct(input string) []string

func ConvertStringToUintStruct

func ConvertStringToUintStruct(input string) []int

func Decode

func Decode(s string) []byte

func DecryptString

func DecryptString(text, secret string) (string, error)

func Encode

func Encode(b []byte) string

func EncryptString

func EncryptString(text, secret string) (string, error)

func GetCurrentUser

func GetCurrentUser() (string, error)

func GetPoliciesWithMatchedPath

func GetPoliciesWithMatchedPath(rolePolicies []models.Policy, urlPathRequested string) (matched []models.Policy, err error)

func GetRolePolicies

func GetRolePolicies(policiesIDs []int) ([]models.Policy, error)

func GroupAdminCreation

func GroupAdminCreation()

func MatchValidator

func MatchValidator(mustValue string, toValidateValue string) bool

func PolicyAdminCreation

func PolicyAdminCreation()

func RoleAdminCreation

func RoleAdminCreation()

func TmpFolderCreation

func TmpFolderCreation(folderName string) (folderPath string, err error)

func ValidateMethodRequestWithPolicyMethod

func ValidateMethodRequestWithPolicyMethod(policies []models.Policy, methodRequested string) (isAuthorized string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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