Help us shape the future of Go! Take the 2026 Go Developer Survey

user

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(ctx context.Context, c *app.RequestContext)

ChangePassword . @router /user/change-password [POST]

func CreateAPIKey

func CreateAPIKey(ctx context.Context, c *app.RequestContext)

CreateAPIKey 为当前用户创建新的 API Key @router /user/api-keys [POST]

func DeleteAPIKey

func DeleteAPIKey(ctx context.Context, c *app.RequestContext)

DeleteAPIKey 撤销指定的 API Key @router /user/api-keys/:id [DELETE]

func ListAPIKeys

func ListAPIKeys(ctx context.Context, c *app.RequestContext)

ListAPIKeys 获取当前用户的 API Key 列表 @router /user/api-keys [GET]

func Login

func Login(ctx context.Context, c *app.RequestContext)

Login . @router /user/login [POST]

func Register

func Register(ctx context.Context, c *app.RequestContext)

Register . @router /user/register [POST]

func RevokeAllAPIKeys

func RevokeAllAPIKeys(ctx context.Context, c *app.RequestContext)

RevokeAllAPIKeys 一键吊销当前用户全部有效 API Key(JWT-only,应急止损) @router /user/api-keys/revoke-all [POST]

func SetUserService added in v0.15.1

func SetUserService(s *userservice.Service)

SetUserService 注入装配级 user 服务(bootstrap 调用)。注入实例带 DefaultsProvider(桥到 admin 域持久化配置)——注册开关/配额默认值等 管理后台在线设置由此生效;未注入时用包级默认实例,回退 yaml 语义。 此前本文件直接 import admin 域调包级单例 EffectiveUserSettings(user 面 → admin 域的隐形跨面依赖,app 层 import 图上不可见),2026-10-10 收编。

func UpdateProfile

func UpdateProfile(ctx context.Context, c *app.RequestContext)

UpdateProfile . @router /user/profile [PUT]

func UserFiles

func UserFiles(ctx context.Context, c *app.RequestContext)

UserFiles . @router /user/files [GET]

func UserInfo

func UserInfo(ctx context.Context, c *app.RequestContext)

UserInfo . @router /user/info [GET]

func UserStats

func UserStats(ctx context.Context, c *app.RequestContext)

UserStats . @router /user/stats [GET]

Types

This section is empty.

Jump to

Keyboard shortcuts

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