user

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 11 Imported by: 0

Documentation

Overview

Package user implements the user handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePasswordRequest

type ChangePasswordRequest struct {
	// Old password.
	// Required: true
	OldPassword string `json:"oldPassword" binding:"omitempty"`

	// New password.
	// Required: true
	NewPassword string `json:"newPassword" binding:"password"`
}

ChangePasswordRequest defines the ChangePasswordRequest data format.

type UserController added in v1.0.5

type UserController struct {
	// contains filtered or unexported fields
}

UserController create a user handler used to handle request for user resource.

func NewUserController added in v1.0.5

func NewUserController(store store.Factory) *UserController

NewUserController creates a user handler.

func (*UserController) ChangePassword added in v1.0.5

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

ChangePassword change the user's password by the user identifier.

func (*UserController) Create added in v1.0.5

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

Create add new user to the storage.

func (*UserController) Delete added in v1.0.5

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

Delete delete an user by the user identifier. Only administrator can call this function.

func (*UserController) DeleteCollection added in v1.0.5

func (u *UserController) DeleteCollection(c *gin.Context)

DeleteCollection batch delete users by multiple usernames. Only administrator can call this function.

func (*UserController) Get added in v1.0.5

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

Get get an user by the user identifier.

func (*UserController) List added in v1.0.5

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

List list the users in the storage. Only administrator can call this function.

func (*UserController) Update added in v1.0.5

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

Update update a user info by the user identifier.

Jump to

Keyboard shortcuts

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