session

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package session 用户登录登出

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSessionRouter

func InitSessionRouter(router gin.IRouter)

InitSessionRouter 注册与用户登录相关的路由及其处理函数

func Login

func Login(c *gin.Context)

Login 用于处理用户登录的请求

func Logout

func Logout(c *gin.Context)

Logout 用于处理用户登出接口的请求

Types

type LoginReq

type LoginReq struct {
	AccountName string `json:"account_name" binding:"required"`
	Password    string `json:"password" binding:"required"`
}

LoginReq 用户登录接口请求参数

type LoginResp

type LoginResp struct {
	UserInfo entity.UserInfo `json:"user_info"`
}

LoginResp 用户登录接口返回数据

Jump to

Keyboard shortcuts

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