services

package
v0.0.0-...-0c5cef1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProjectPermissionOwnedProject = iota
	ProjectPermissionDevelopProject
)

Variables

View Source
var JWTSigningMethod = jwt.SigningMethodHS512

Functions

func GetAuthorization

func GetAuthorization(c *gin.Context, abort bool, requires ...string) (*models.User, error)

func HasPermissionOnProject

func HasPermissionOnProject(uid uint, pid uint, perms int) error

func HasPermissions

func HasPermissions(user *models.User, requires ...string) bool

func ResendOneTimePasscode

func ResendOneTimePasscode(passcode models.OneTimePasscode, user models.User) (models.OneTimePasscode, error)

func SendMail

func SendMail(recipient string, subject string, content string) error

SendMail using smtp tls protocol

func SendOneTimePasscode

func SendOneTimePasscode(user models.User, email string, method int) (models.OneTimePasscode, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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