user

package
v0.0.0-...-3266887 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 10 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

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

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

func NewUserController

func NewUserController(store store.Factory) *UserController

NewUserController creates a user handler.

func (*UserController) ChangePassword

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

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

func (*UserController) Create

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

Create add new user to the storage.

func (*UserController) Delete

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

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

func (*UserController) DeleteCollection

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

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

func (*UserController) Get

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

Get get an user by the user identifier.

func (*UserController) List

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

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

func (*UserController) Update

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