Documentation ¶
Index ¶
- type BaseService
- type InviteCodeService
- type OrganizationService
- func (s *OrganizationService) CreateOrganization(organization *domain.Organization) (*domain.Organization, error)
- func (s *OrganizationService) DeleteOrganization(id int64) (bool, error)
- func (s *OrganizationService) GetById(id int64) (*domain.Organization, error)
- func (s *OrganizationService) GetSubList(fid int64) []domain.Organization
- func (s *OrganizationService) HasSubNode(fid int64) int64
- func (s *OrganizationService) List(fid int64, name string, pageable query.Pageable) (total int64, list []domain.Organization)
- func (s *OrganizationService) UpdateOrganization(organization *domain.Organization) (*domain.Organization, error)
- type OrganizationUserService
- type RoleService
- func (s *RoleService) Add(role *dto.Role) (*domain.Role, error)
- func (s *RoleService) Count(role *dto.Role) (int64, error)
- func (s *RoleService) Delete(id string) error
- func (s *RoleService) Edit(role *dto.Role) error
- func (s *RoleService) ExistByID(id string) (bool, error)
- func (s *RoleService) Get(id string) (*domain.Role, error)
- func (s *RoleService) GetAll(role *dto.Role, pageable query.Pageable) ([]*domain.Role, error)
- func (s *RoleService) LoadAllPolicy() error
- func (s *RoleService) LoadPolicy(id string) error
- type RoleUserService
- type SocialUserService
- func (s *SocialUserService) BoundSocialUser(socialUserId string, userId string, socialUser *domain.SocialUser) (*domain.SocialUser, error)
- func (s *SocialUserService) CreateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
- func (s *SocialUserService) GetById(id string) (*domain.SocialUser, error)
- func (s *SocialUserService) GetBySocialId(socialType string, socialId string) (*domain.SocialUser, error)
- func (s *SocialUserService) GetByUserId(socialType string, userId string) (*domain.SocialUser, error)
- func (s *SocialUserService) UpdateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
- type SysOptionService
- func (s *SysOptionService) AddSysOption(option *domain.SysOption) (*domain.SysOption, error)
- func (s *SysOptionService) AddSysOptions(options []domain.SysOption) (*[]domain.SysOption, error)
- func (s *SysOptionService) DeleteSysOption(option *domain.SysOption) (*domain.SysOption, error)
- func (s *SysOptionService) GetDefaultOptions(tenantId string) (*domain.SysOptions, error)
- func (s *SysOptionService) GetSystemOptions() (*domain.SysOptions, error)
- func (s *SysOptionService) GetTenantOptions(tenantId string) (*domain.SysOptions, error)
- func (s *SysOptionService) RemoveAllTenantOptions(tenantId string) error
- func (s *SysOptionService) RemoveTenantOption(tenantId string, key string) (*domain.SysOption, error)
- func (s *SysOptionService) SetTenantOption(tenantId string, key string, value string) (*domain.SysOption, error)
- func (s *SysOptionService) SetTenantOptions(tenantOptions *domain.SysOptions) (*domain.SysOptions, error)
- type UserOptionService
- func (s *UserOptionService) AddUserOption(option *domain.UserOption) (*domain.UserOption, error)
- func (s *UserOptionService) AddUserOptions(options []domain.UserOption) (*[]domain.UserOption, error)
- func (s *UserOptionService) GetDefaultUserOptions() (*domain.UserOptions, error)
- func (s *UserOptionService) GetUserOptions(userId string) (*domain.UserOptions, error)
- func (s *UserOptionService) RemoveAllUserOptions(userId string) error
- func (s *UserOptionService) RemoveUserOption(userId string, key string) (*domain.UserOption, error)
- func (s *UserOptionService) SetUserOption(userId string, key string, value string) (*domain.UserOption, error)
- func (s *UserOptionService) SetUserOptions(userOptions *domain.UserOptions) (*domain.UserOptions, error)
- type UserService
- func (s *UserService) Check(username, password string) (bool, error)
- func (s *UserService) Count(user *dto.User) (int64, error)
- func (s *UserService) CreateUser(user *dto.User) (*domain.User, error)
- func (s *UserService) Delete(id string) error
- func (s *UserService) ExistByID(id string) (bool, error)
- func (s *UserService) Get(username string) (*domain.User, error)
- func (s *UserService) GetAll(user *dto.User, pageable query.Pageable) (int64, []domain.User)
- func (a *UserService) GetAllWithOrganization(name string, pageable query.Pageable) (int64, []domain.UserWithOrganization)
- func (s *UserService) GetByEmail(email string) (*domain.User, error)
- func (s *UserService) GetById(id string) (*domain.User, error)
- func (s *UserService) GetByLogin(login string) (*domain.User, error)
- func (s *UserService) GetByMobile(mobile string) (*domain.User, error)
- func (s *UserService) LoadAllPolicy() error
- func (s *UserService) LoadPolicy(id string) error
- func (s *UserService) Update(id string, column string, value interface{}) (*domain.User, error)
- func (s *UserService) UpdateUser(user *dto.User) (*domain.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseService ¶
type BaseService struct { }
type InviteCodeService ¶
type InviteCodeService struct { BaseService InviteCodeRepository *repository.InviteCodeRepository `inject:"inviteCodeRepository"` UserService *service.UserService `inject:"userService"` }
func (*InviteCodeService) FindByInviteCode ¶
func (s *InviteCodeService) FindByInviteCode(inviteCode string) (*domain.InviteCode, error)
func (*InviteCodeService) GetUserInviteCode ¶
func (s *InviteCodeService) GetUserInviteCode(userId string, channel string) (*domain.InviteCode, error)
type OrganizationService ¶
type OrganizationService struct { BaseService OrganizationRepository *repository.OrganizationRepository `inject:"organizationRepository"` }
func GetOrganizationService ¶
func GetOrganizationService() *OrganizationService
func (*OrganizationService) CreateOrganization ¶
func (s *OrganizationService) CreateOrganization(organization *domain.Organization) (*domain.Organization, error)
func (*OrganizationService) DeleteOrganization ¶
func (s *OrganizationService) DeleteOrganization(id int64) (bool, error)
func (*OrganizationService) GetById ¶
func (s *OrganizationService) GetById(id int64) (*domain.Organization, error)
func (*OrganizationService) GetSubList ¶
func (s *OrganizationService) GetSubList(fid int64) []domain.Organization
func (*OrganizationService) HasSubNode ¶
func (s *OrganizationService) HasSubNode(fid int64) int64
func (*OrganizationService) List ¶
func (s *OrganizationService) List(fid int64, name string, pageable query.Pageable) (total int64, list []domain.Organization)
func (*OrganizationService) UpdateOrganization ¶
func (s *OrganizationService) UpdateOrganization(organization *domain.Organization) (*domain.Organization, error)
type OrganizationUserService ¶
type OrganizationUserService struct { BaseService OrganizationUserRepository *repository.OrganizationUserRepository `inject:"organizationUserRepository"` OrganizationRepository *repository.OrganizationRepository `inject:"organizationRepository"` }
func (*OrganizationUserService) GetUserOrganizationIds ¶
func (u *OrganizationUserService) GetUserOrganizationIds(userId string) []int
根据用户id查询所有可能的岗位节点id
func (*OrganizationUserService) ListMembers ¶
func (u *OrganizationUserService) ListMembers(organizationId int64, userName string, pageable query.Pageable) (int64, []domain.OrganizationMember)
type RoleService ¶
type RoleService struct { BaseService RoleResposity *repository.RoleRepository `inject:"roleRepository"` Enforcer *casbin.SyncedEnforcer `inject:"enforcer"` }
func GetRoleService ¶
func GetRoleService() *RoleService
func (*RoleService) Delete ¶
func (s *RoleService) Delete(id string) error
func (*RoleService) LoadAllPolicy ¶
func (s *RoleService) LoadAllPolicy() error
LoadAllPolicy 加载所有的角色策略
func (*RoleService) LoadPolicy ¶
func (s *RoleService) LoadPolicy(id string) error
LoadPolicy 加载角色权限策略
type RoleUserService ¶
type RoleUserService struct { BaseService RoleUserRepository *repository.RoleUserRepository `inject:"roleUserRepository"` RoleRepository *repository.RoleRepository `inject:"roleRepository"` }
func (*RoleUserService) GetUserRoleIds ¶
func (u *RoleUserService) GetUserRoleIds(userId string) []string
根据用户id查询所有可能的岗位节点id
func (*RoleUserService) ListMembers ¶
func (u *RoleUserService) ListMembers(roleId string, userName string, pageable query.Pageable) (int64, []domain.RoleMember)
type SocialUserService ¶
type SocialUserService struct { BaseService SocialUserRepository *repository.SocialUserRepository `inject:"socialUserRepository"` }
func GetSocialUserService ¶
func GetSocialUserService() *SocialUserService
func (*SocialUserService) BoundSocialUser ¶
func (s *SocialUserService) BoundSocialUser(socialUserId string, userId string, socialUser *domain.SocialUser) (*domain.SocialUser, error)
func (*SocialUserService) CreateSocialUser ¶
func (s *SocialUserService) CreateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
func (*SocialUserService) GetById ¶
func (s *SocialUserService) GetById(id string) (*domain.SocialUser, error)
func (*SocialUserService) GetBySocialId ¶
func (s *SocialUserService) GetBySocialId(socialType string, socialId string) (*domain.SocialUser, error)
func (*SocialUserService) GetByUserId ¶
func (s *SocialUserService) GetByUserId(socialType string, userId string) (*domain.SocialUser, error)
func (*SocialUserService) UpdateSocialUser ¶
func (s *SocialUserService) UpdateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
type SysOptionService ¶
type SysOptionService struct { BaseService SysOptionRepository *repository.SysOptionRepository `inject:"sysOptionRepository"` }
func (*SysOptionService) AddSysOption ¶
func (*SysOptionService) AddSysOptions ¶
func (*SysOptionService) DeleteSysOption ¶
func (*SysOptionService) GetDefaultOptions ¶
func (s *SysOptionService) GetDefaultOptions(tenantId string) (*domain.SysOptions, error)
func (*SysOptionService) GetSystemOptions ¶
func (s *SysOptionService) GetSystemOptions() (*domain.SysOptions, error)
func (*SysOptionService) GetTenantOptions ¶
func (s *SysOptionService) GetTenantOptions(tenantId string) (*domain.SysOptions, error)
func (*SysOptionService) RemoveAllTenantOptions ¶
func (s *SysOptionService) RemoveAllTenantOptions(tenantId string) error
func (*SysOptionService) RemoveTenantOption ¶
func (*SysOptionService) SetTenantOption ¶
func (*SysOptionService) SetTenantOptions ¶
func (s *SysOptionService) SetTenantOptions(tenantOptions *domain.SysOptions) (*domain.SysOptions, error)
type UserOptionService ¶
type UserOptionService struct { BaseService UserOptionRepository *repository.UserOptionRepository `inject:"userOptionRepository"` }
func (*UserOptionService) AddUserOption ¶
func (s *UserOptionService) AddUserOption(option *domain.UserOption) (*domain.UserOption, error)
func (*UserOptionService) AddUserOptions ¶
func (s *UserOptionService) AddUserOptions(options []domain.UserOption) (*[]domain.UserOption, error)
func (*UserOptionService) GetDefaultUserOptions ¶
func (s *UserOptionService) GetDefaultUserOptions() (*domain.UserOptions, error)
func (*UserOptionService) GetUserOptions ¶
func (s *UserOptionService) GetUserOptions(userId string) (*domain.UserOptions, error)
func (*UserOptionService) RemoveAllUserOptions ¶
func (s *UserOptionService) RemoveAllUserOptions(userId string) error
func (*UserOptionService) RemoveUserOption ¶
func (s *UserOptionService) RemoveUserOption(userId string, key string) (*domain.UserOption, error)
func (*UserOptionService) SetUserOption ¶
func (s *UserOptionService) SetUserOption(userId string, key string, value string) (*domain.UserOption, error)
func (*UserOptionService) SetUserOptions ¶
func (s *UserOptionService) SetUserOptions(userOptions *domain.UserOptions) (*domain.UserOptions, error)
type UserService ¶
type UserService struct { BaseService UserRepository *repository.UserRepository `inject:"userRepository"` Enforcer *casbin.SyncedEnforcer `inject:"enforcer"` }
func GetUserService ¶
func GetUserService() *UserService
func (*UserService) CreateUser ¶
func (*UserService) Delete ¶
func (s *UserService) Delete(id string) error
func (*UserService) GetAllWithOrganization ¶
func (a *UserService) GetAllWithOrganization(name string, pageable query.Pageable) (int64, []domain.UserWithOrganization)
查询用户信息(带岗位)
func (*UserService) GetByEmail ¶
func (s *UserService) GetByEmail(email string) (*domain.User, error)
func (*UserService) GetByLogin ¶
func (s *UserService) GetByLogin(login string) (*domain.User, error)
func (*UserService) GetByMobile ¶
func (s *UserService) GetByMobile(mobile string) (*domain.User, error)
func (*UserService) LoadAllPolicy ¶
func (s *UserService) LoadAllPolicy() error
LoadAllPolicy 加载所有的用户策略
func (*UserService) LoadPolicy ¶
func (s *UserService) LoadPolicy(id string) error
LoadPolicy 加载用户权限策略
func (*UserService) UpdateUser ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.