user

package
v0.0.0-...-e49a844 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultUserService

type DefaultUserService struct {
}

DefaultUserService 默认用户服务实现

func (*DefaultUserService) Get

func (svc *DefaultUserService) Get(id string) (*User, error)

func (*DefaultUserService) Login

func (svc *DefaultUserService) Login(username, password string) (*User, error)

type Service

type Service interface {
	// Login 登录
	Login(username, password string) (*User, error)

	// Get 根据id获取
	Get(id string) (*User, error)
}

Service 用户信息服务接口

type User

type User struct {
	ID         string    `json:"id,omitempty" db:"id"`
	Username   string    `json:"username,omitempty" db:"username"`
	Password   string    `json:"password,omitempty" db:"password"`
	NickName   string    `json:"nickName,omitempty" db:"nick_name"`
	Gender     int64     `json:"gender,omitempty" db:"gender"`
	Avatar     *string   `json:"avatar,omitempty" db:"avatar"`
	CreateTime time.Time `json:"createTime,omitempty" db:"create_time"`
}

User 用户实体

Jump to

Keyboard shortcuts

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