auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	// 方法配置-多个方法用逗号分隔
	Tx route.Method `tx:"AddUser"`

	// 使用的model
	UserAo user.IUser
}

Auth 认证

func (*Auth) AddLogin

func (auth *Auth) AddLogin(ctx context.Context, param route.Param) (r route.Result, err error)

AddLogin 登录

func (*Auth) AddUser

func (auth *Auth) AddUser(ctx context.Context, param route.Param) (r route.Result, err error)

AddUser 添加用户

func (*Auth) GetIslogin

func (auth *Auth) GetIslogin(ctx context.Context, param route.Param) (r route.Result, err error)

GetIslogin 是否登录

func (*Auth) GetUser

func (auth *Auth) GetUser(ctx context.Context, param route.Param) (r route.Result, err error)

GetUser 获取用户

type LoginUser

type LoginUser struct {
	Name   string `json:"name"`
	Role   string `json:"role"`
	UserID int    `json:"userID"`
}

LoginUser 登录用户

Jump to

Keyboard shortcuts

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