Documentation ¶
Index ¶
- Constants
- func AddUser(rail miso.Rail, tx *gorm.DB, req AddUserParam, operator string) error
- func AddUserEp(c *gin.Context, rail miso.Rail, req AddUserParam) (any, error)
- func AdminUpdateUser(rail miso.Rail, tx *gorm.DB, req AdminUpdateUserReq, operator common.User) error
- func BootstrapServer(args []string)
- func DecodeTokenUsername(rail miso.Rail, token string) (string, error)
- func DeleteUserKey(rail miso.Rail, tx *gorm.DB, req DeleteUserKeyReq, userId int) error
- func DeleteUserKeyEp(c *gin.Context, rail miso.Rail, req DeleteUserKeyReq) (any, error)
- func ExchangeToken(rail miso.Rail, tx *gorm.DB, req ExchangeTokenReq) (string, error)
- func ExchangeTokenEp(c *gin.Context, rail miso.Rail, req ExchangeTokenReq) (any, error)
- func FindUsername(rail miso.Rail, tx *gorm.DB, username string) (string, error)
- func GenUserKey(rail miso.Rail, tx *gorm.DB, req GenUserKeyReq, username string) error
- func GenUserKeyEp(c *gin.Context, rail miso.Rail, req GenUserKeyReq) (any, error)
- func GetUserDetailEp(c *gin.Context, rail miso.Rail) (any, error)
- func GetUserInfEp(c *gin.Context, rail miso.Rail) (any, error)
- func GetUserTokenEp(c *gin.Context, rail miso.Rail) (any, error)
- func InvalidateUserInfoCache(rail miso.Rail, username string) error
- func ItnFindNameOfUserNo(rail miso.Rail, tx *gorm.DB, req api.FetchUsernameReq) (api.FetchUsernamesRes, error)
- func ItnFindUserInfo(rail miso.Rail, tx *gorm.DB, req api.FindUserReq) (api.UserInfo, error)
- func ListAccessLogEp(c *gin.Context, rail miso.Rail, req ListAccessLogReq) (any, error)
- func ListAccessLogs(rail miso.Rail, tx *gorm.DB, user common.User, req ListAccessLogReq) (miso.PageRes[ListedAccessLog], error)
- func ListUserEp(c *gin.Context, rail miso.Rail, req ListUserReq) (any, error)
- func ListUserKeyEp(c *gin.Context, rail miso.Rail, req ListUserKeysReq) (any, error)
- func ListUserKeys(rail miso.Rail, tx *gorm.DB, req ListUserKeysReq, user common.User) (miso.PageRes[ListedUserKey], error)
- func ListUsers(rail miso.Rail, tx *gorm.DB, req ListUserReq) (miso.PageRes[api.UserInfo], error)
- func RemoteAddr(forwardedFor string) string
- func ReviewUserRegistration(rail miso.Rail, tx *gorm.DB, req AdminReviewUserReq) error
- func ReviewUserRegistrationEp(c *gin.Context, rail miso.Rail, req AdminReviewUserReq) (any, error)
- func SaveAccessLogEvent(rail miso.Rail, tx *gorm.DB, evt AccessLogEvent) error
- func UpdatePassword(rail miso.Rail, tx *gorm.DB, username string, req UpdatePasswordReq) error
- func UpdatePasswordEp(c *gin.Context, rail miso.Rail, req UpdatePasswordReq) (any, error)
- func UpdateUserEp(c *gin.Context, rail miso.Rail, req AdminUpdateUserReq) (any, error)
- func UserLoginEp(gin *gin.Context, rail miso.Rail, req LoginReq) (any, error)
- func UserRegister(rail miso.Rail, tx *gorm.DB, req RegisterReq) error
- func UserReqRegisterEp(c *gin.Context, rail miso.Rail, req RegisterReq) (any, error)
- type AccessLog
- type AccessLogEvent
- type AddUserParam
- type AdminAddUserReq
- type AdminReviewUserReq
- type AdminUpdateUserReq
- type DeleteUserKeyReq
- type ExchangeTokenReq
- type GenUserKeyReq
- type ListAccessLogReq
- type ListUserKeysReq
- type ListUserReq
- type ListedAccessLog
- type ListedUserKey
- type LoginReq
- type NewUserKey
- type PasswordLoginParam
- type RegisterReq
- type RoleInfoReq
- type RoleInfoResp
- type TokenUser
- type UpdatePasswordReq
- type User
- type UserDetail
- type UserInfoBrief
Constants ¶
View Source
const ( ResourceManagerUser = "manage-users" ResourceBasicUser = "basic-user" )
Variables ¶
This section is empty.
Functions ¶
func AdminUpdateUser ¶
func BootstrapServer ¶
func BootstrapServer(args []string)
func DeleteUserKey ¶
func DeleteUserKeyEp ¶
func ExchangeToken ¶
func ExchangeTokenEp ¶
func GenUserKey ¶
func GenUserKeyEp ¶
func ItnFindNameOfUserNo ¶
func ItnFindNameOfUserNo(rail miso.Rail, tx *gorm.DB, req api.FetchUsernameReq) (api.FetchUsernamesRes, error)
func ItnFindUserInfo ¶
func ListAccessLogEp ¶
func ListAccessLogs ¶
func ListUserEp ¶
func ListUserKeyEp ¶
func ListUserKeys ¶
func RemoteAddr ¶
func ReviewUserRegistration ¶
func SaveAccessLogEvent ¶
func UpdatePassword ¶
func UpdatePasswordEp ¶
func UpdateUserEp ¶
func UserRegister ¶
func UserReqRegisterEp ¶
Types ¶
type AccessLogEvent ¶
type AddUserParam ¶
type AdminAddUserReq ¶
type AdminReviewUserReq ¶
type AdminUpdateUserReq ¶
type DeleteUserKeyReq ¶
type DeleteUserKeyReq struct {
UserKeyId int `json:"userKeyId"`
}
type ExchangeTokenReq ¶
type ExchangeTokenReq struct {
Token string `json:"token" valid:"notEmpty"`
}
type GenUserKeyReq ¶
type ListAccessLogReq ¶
type ListUserKeysReq ¶
type ListUserReq ¶
type ListedAccessLog ¶
type ListedUserKey ¶
type NewUserKey ¶
type PasswordLoginParam ¶
type RegisterReq ¶
type RoleInfoReq ¶ added in v0.0.14
type RoleInfoReq struct {
RoleNo string `json:"roleNo" `
}
type RoleInfoResp ¶ added in v0.0.14
func GetRoleInfo ¶ added in v0.0.14
func GetRoleInfo(rail miso.Rail, req RoleInfoReq) (*RoleInfoResp, error)
Retrieve role information
type UpdatePasswordReq ¶
type User ¶
type User struct { Id int UserNo string Username string Password string Salt string ReviewStatus string RoleNo string IsDisabled int CreateTime miso.ETime CreateBy string UpdateTime miso.ETime UpdateBy string IsDel common.IS_DEL }
type UserDetail ¶
type UserDetail struct { Id int `json:"id"` Username string `json:"username"` RoleName string `json:"roleName"` RoleNo string `json:"roleNo"` UserNo string `json:"userNo"` RegisterDate string `json:"registerDate"` Password string `json:"password"` Salt string `json:"salt"` }
func LoadUserBriefThrCache ¶
func LoadUserInfoBrief ¶
type UserInfoBrief ¶
type UserInfoBrief struct { Id int `json:"id"` Username string `json:"username"` RoleName string `json:"roleName"` RoleNo string `json:"roleNo"` UserNo string `json:"userNo"` RegisterDate string `json:"registerDate"` }
func FetchUserBrief ¶
func GetTokenUser ¶
Click to show internal directories.
Click to hide internal directories.