authkit

package
v0.0.0-...-ef20829 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEvent

func AddEvent(nx *nex.Conn, userId uint, action string, meta map[string]any, ip, ua string) error

func AddEventExt

func AddEventExt(nx *nex.Conn, action string, meta map[string]any, c *fiber.Ctx) error

func CheckRealmMemberPerm

func CheckRealmMemberPerm(nx *nex.Conn, realmID uint, userID, power int) bool

func EnsureUserPermGranted

func EnsureUserPermGranted(nx *nex.Conn, userId, otherId uint, key string, val any) error

func GetAccountFromUserInfo

func GetAccountFromUserInfo(info *sec.UserInfo) models.Account

GetAccountFromUserInfo returns the account from the user info This method will not to query the database, it will parse the token and get the subject of the userinfo token

func GetRealm

func GetRealm(nx *nex.Conn, id uint) (models.Realm, error)

func GetRealmByAlias

func GetRealmByAlias(nx *nex.Conn, alias string) (models.Realm, error)

func GetRealmMember

func GetRealmMember(nx *nex.Conn, realmID, userID uint) (models.RealmMember, error)

func GetThirdClient

func GetThirdClient(nx *nex.Conn, id uint, secret *string) (*models.ThirdClient, error)

func GetThirdClientByAlias

func GetThirdClientByAlias(nx *nex.Conn, alias string, secret *string) (*models.ThirdClient, error)

func GetUser

func GetUser(nx *nex.Conn, userId uint) (models.Account, error)

func GetUserByName

func GetUserByName(nx *nex.Conn, name string) (models.Account, error)

func ListRealm

func ListRealm(nx *nex.Conn, id []uint) ([]models.Realm, error)

func ListRealmMember

func ListRealmMember(nx *nex.Conn, realmID uint) ([]models.RealmMember, error)

func ListRelative

func ListRelative(nx *nex.Conn, userId uint, status int32, isRelated bool) ([]*proto.UserInfo, error)

func ListUser

func ListUser(nx *nex.Conn, userIds []uint) ([]models.Account, error)

func NotifyUser

func NotifyUser(nx *nex.Conn, userId uint64, notify pushkit.Notification, unsaved ...bool) error

func NotifyUserBatch

func NotifyUserBatch(nx *nex.Conn, userId []uint64, notify pushkit.Notification, unsaved ...bool) error

func ParseAccountMiddleware

func ParseAccountMiddleware(c *fiber.Ctx) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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