user

package
v0.0.0-...-385473e Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserController

type UserController struct {
	pb.UnimplementedBlogServer
	// contains filtered or unexported fields
}

UserController 是 user 模块在 Controller 层的实现,用来处理用户模块的请求.

func New

func New(ds store.IStore, a *auth.Authz) *UserController

New 创建一个 user controller.

func (*UserController) ChangePassword

func (ctrl *UserController) ChangePassword(c *gin.Context)

ChangePassword 用来修改指定用户的密码.

func (*UserController) Create

func (ctrl *UserController) Create(c *gin.Context)

Create 创建一个新的用户.

func (*UserController) Delete

func (ctrl *UserController) Delete(c *gin.Context)

Delete 删除一个用户.

func (*UserController) Get

func (ctrl *UserController) Get(c *gin.Context)

Get 获取一个用户的详细信息.

func (*UserController) List

func (ctrl *UserController) List(c *gin.Context)

List 返回用户列表,只有 root 用户才能获取用户列表.

func (*UserController) ListUser

ListUser 返回用户列表,只有 root 用户才能获取用户列表.

func (*UserController) Login

func (ctrl *UserController) Login(c *gin.Context)

登录 miniblog 并返回一个 JWT Token.

func (*UserController) Update

func (ctrl *UserController) Update(c *gin.Context)

Update 更新用户信息.

Jump to

Keyboard shortcuts

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