user

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 13 Imported by: 0 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 User

type User struct {
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService() *User

func (*User) BatchListByUserId

func (srv *User) BatchListByUserId(ctx context.Context, userIdStart uint64) ([]*model.UserBaseModel, error)

func (*User) Close

func (srv *User) Close()

Close close all user repo

func (*User) Create

func (srv *User) Create(
	ctx context.Context, email, password, name, ldapDN string, ldapGen uint64, status, isAdmin *uint64,
) (model.UserBaseModel, error)

Create

func (*User) CreateOrUpdateUserByEmail

func (srv *User) CreateOrUpdateUserByEmail(ctx context.Context, userEmail string,
	userName, ldapDN string, ldapGen uint64, admin bool) (*model.UserBaseModel, error)

func (*User) Creates

func (srv *User) Creates(
	ctx context.Context, users []*model.UserBaseModel,
) error

Create

func (*User) Delete

func (srv *User) Delete(ctx context.Context, id uint64) error

Delete

func (*User) DeleteOutOfSyncLdapUser

func (srv *User) DeleteOutOfSyncLdapUser(ldapGen uint64) (int64, error)

func (*User) EmailLogin

func (srv *User) EmailLogin(ctx context.Context, email, password string) (err error)

EmailLogin

func (*User) Evict

func (srv *User) Evict(id uint64)

func (*User) GetCache

func (srv *User) GetCache(id uint64) (model.UserBaseModel, error)

func (*User) GetCacheBySa

func (srv *User) GetCacheBySa(sa string) (model.UserBaseModel, error)

func (*User) GetUserByEmail

func (srv *User) GetUserByEmail(ctx context.Context, email string) (*model.UserBaseModel, error)

func (*User) GetUserByID

func (srv *User) GetUserByID(ctx context.Context, id uint64) (*model.UserBaseModel, error)

GetUserByID

func (*User) GetUserByPhone

func (srv *User) GetUserByPhone(ctx context.Context, phone int64) (*model.UserBaseModel, error)

func (*User) GetUserHasNotSa

func (srv *User) GetUserHasNotSa(ctx context.Context) ([]*model.UserBaseModel, error)

func (*User) GetUserList

func (srv *User) GetUserList(ctx context.Context) ([]*model.UserList, error)

deprecated

func (*User) GetUserPageable

func (srv *User) GetUserPageable(ctx context.Context, page, limit int) ([]*model.UserBaseModel, error)

func (*User) Register

func (srv *User) Register(ctx context.Context, email, password string) error

Register

func (*User) UpdateServiceAccountName

func (srv *User) UpdateServiceAccountName(ctx context.Context, id uint64, saName string) error

func (*User) UpdateUser

func (srv *User) UpdateUser(ctx context.Context, id uint64, user *model.UserBaseModel) (
	*model.UserBaseModel, error,
)

UpdateUser update user info

func (*User) UpdateUserByModelWithLdap

func (srv *User) UpdateUserByModelWithLdap(ctx context.Context, before *model.UserBaseModel,
	userName, ldapDN string, ldapGen uint64, admin bool) (*model.UserBaseModel, error)

func (*User) UpdateUsersLdapGen

func (srv *User) UpdateUsersLdapGen(list []*model.UserBaseModel, ldapGen uint64) bool

Jump to

Keyboard shortcuts

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