handler

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check2FA

func Check2FA(client *ent.Client) echo.HandlerFunc

func CheckAccessPolicyName

func CheckAccessPolicyName(client *ent.Client) echo.HandlerFunc

func CheckRoleName

func CheckRoleName(client *ent.Client) echo.HandlerFunc

func CheckSession

func CheckSession(c echo.Context) error

func CheckTenantName

func CheckTenantName(client *ent.Client) echo.HandlerFunc

func Confirm2FA

func Confirm2FA(client *ent.Client) echo.HandlerFunc

func CreateRole

func CreateRole(client *ent.Client) echo.HandlerFunc

CreateRole 创建role

func CreateTenant

func CreateTenant(client *ent.Client) echo.HandlerFunc

func CreateUser

func CreateUser(client *ent.Client) echo.HandlerFunc

CreateUser 创建一个新用户

func DeleteRoleByName

func DeleteRoleByName(client *ent.Client) echo.HandlerFunc

func DeleteTenantName

func DeleteTenantName(client *ent.Client) echo.HandlerFunc

func DeleteUserByUsername

func DeleteUserByUsername(client *ent.Client) echo.HandlerFunc

DeleteUserByUsername 删除一个用户

func Enable2FA

func Enable2FA(client *ent.Client) echo.HandlerFunc

func GetAllAccessPolicyByAccountByTenant

func GetAllAccessPolicyByAccountByTenant(client *ent.Client) echo.HandlerFunc

GetAllAccessPolicyByAccountByTenant 查询当前租户下的用户,管理员登陆时查询所有

func GetAllRoles

func GetAllRoles(client *ent.Client) echo.HandlerFunc

GetAllRoles 获取所有role

func GetAllRolesByAccountByTenant

func GetAllRolesByAccountByTenant(client *ent.Client) echo.HandlerFunc

GetAllRolesByAccountByTenant 查询当前租户下的用户,管理员登陆时查询所有

func GetAllUsers

func GetAllUsers(client *ent.Client) echo.HandlerFunc

GetAllUsers 获取所有用户

func GetAllUsersByTenant

func GetAllUsersByTenant(client *ent.Client) echo.HandlerFunc

func GetTenantByName

func GetTenantByName(client *ent.Client) echo.HandlerFunc

func GetUserByEmail

func GetUserByEmail(client *ent.Client) echo.HandlerFunc

GetUserByEmail 根据邮箱查找用户

func GetUserByUsername

func GetUserByUsername(client *ent.Client) echo.HandlerFunc

GetUserByUsername 根据用户名查找

func Hello

func Hello(client *ent.Client) echo.HandlerFunc

func IsDefaultRole

func IsDefaultRole(roleName string) bool

IsDefaultRole 检查角色是否为默认角色

func RealIP

func RealIP() echo.HandlerFunc

func Reset2FA

func Reset2FA(client *ent.Client) echo.HandlerFunc

Reset2FA 用户重新设置2FA

func UpdateUser

func UpdateUser(client *ent.Client) echo.HandlerFunc

UpdateUser 更新一个用户

func UpdateUserByUUID

func UpdateUserByUUID(client *ent.Client) echo.HandlerFunc

func UpdateUserInfo

func UpdateUserInfo(client *ent.Client) echo.HandlerFunc

UpdateUserInfo Update user info

func UploadFile

func UploadFile() echo.HandlerFunc

UploadFile UploadAvatar upload Avatar

Types

type AccessPolicyDTO

type AccessPolicyDTO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type FaDTO

type FaDTO struct {
	Email  string  `json:"email"`
	OTP    *string `json:"otp,omitempty"`
	Secret string  `json:"secret"`
}

FaDTO 2FaDTO

type RoleDTO

type RoleDTO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Status

type Status int

Define the Status enum

const (
	Active Status = iota
	Inactive
	Blocked
)

type TenantDTO

type TenantDTO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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