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: 0

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