users

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	UsersService *Service
}

type Service

type Service struct {
	Values *common.Values
	Db     *mongo.Database
	Redis  *redis.Client

	RolesService       *roles.Service
	DepartmentsService *departments.Service
}

func (*Service) FindByIdentity

func (x *Service) FindByIdentity(ctx context.Context, identity string) (data model.User, err error)

FindByIdentity 从用户名或电子邮件获取用户

func (*Service) GetActived

func (x *Service) GetActived(ctx context.Context, id string) (data model.User, err error)

GetActived 获取授权用户数据

func (*Service) UpdateOneById

func (x *Service) UpdateOneById(ctx context.Context, id primitive.ObjectID, update bson.M) (*mongo.UpdateResult, error)

UpdateOneById 通过 ID 更新

Jump to

Keyboard shortcuts

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