user

package
v0.0.0-...-da91ef8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CompanyName = "托普汇智(北京)科技有限公司"
View Source
const RootDeptID = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	GetUserByID(context.Context, string) (*v1.UserResponse, error)
	GetUserByName(context.Context, string) (*v1.UserResponse, error)
	GetUserRolesByID(context.Context, string) ([]string, error)
	GetManagedUserIDs(context.Context, string) ([]string, error)
	GetUserDepartmentTree(context.Context, string) (*v1.TreeNode, error)
	GetCompanyDepartmentTree(context.Context) (*v1.TreeNode, error)
}

type UserService

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

func NewUserService

func NewUserService(store store.UserStore) *UserService

func (*UserService) GetCompanyDepartmentTree

func (s *UserService) GetCompanyDepartmentTree(ctx context.Context) (*v1.TreeNode, error)

func (*UserService) GetManagedUserIDs

func (s *UserService) GetManagedUserIDs(ctx context.Context, userID string) ([]string, error)

func (*UserService) GetUserByID

func (s *UserService) GetUserByID(ctx context.Context, id string) (*v1.UserResponse, error)

func (*UserService) GetUserByName

func (s *UserService) GetUserByName(ctx context.Context, username string) (*v1.UserResponse, error)

func (*UserService) GetUserDepartmentTree

func (s *UserService) GetUserDepartmentTree(ctx context.Context, userID string) (*v1.TreeNode, error)

func (*UserService) GetUserRolesByID

func (s *UserService) GetUserRolesByID(ctx context.Context, userID string) ([]string, error)

Jump to

Keyboard shortcuts

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