Documentation
¶
Index ¶
- func NewRegService(regRepo repository.UserReg) *regService
- func NewWhiteListService(whiteRepo repository.WhiteList) *whiteListService
- type BindEmailCmd
- type CreatePlatformAccountCmd
- type EmailService
- type FollowDTO
- type FollowsDTO
- type FollowsListCmd
- type PlatformInfoDTO
- type RefreshTokenCmd
- type RegService
- type SendBindEmailCmd
- type UpdatePlateformInfoCmd
- type UpdatePlateformTokenCmd
- type UpdateUserBasicInfoCmd
- type UserCreateCmd
- type UserDTO
- type UserInfoDTO
- type UserRegisterInfoCmd
- type UserRegisterInfoDTO
- type UserService
- type UserWhiteListCmd
- type WhiteListService
- type WhitelistDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegService ¶
func NewRegService( regRepo repository.UserReg, ) *regService
func NewWhiteListService ¶
func NewWhiteListService( whiteRepo repository.WhiteList, ) *whiteListService
Types ¶
type BindEmailCmd ¶
type EmailService ¶
type EmailService interface {
SendBindEmail(*SendBindEmailCmd) (string, error)
VerifyBindEmail(*BindEmailCmd) (string, error)
}
func NewEmailService ¶
func NewEmailService( auth authing.User, login login.Login, us UserService, ) EmailService
type FollowsDTO ¶
type FollowsListCmd ¶
type FollowsListCmd struct {
User domain.Account
repository.FollowFindOption
}
type PlatformInfoDTO ¶
type PlatformInfoDTO struct {
PlatformUser domain.PlatformUser
PlatformToken domain.PlatformToken
}
type RefreshTokenCmd ¶
type RegService ¶
type RegService interface {
// register
UpsertUserRegInfo(*UserRegisterInfoCmd) error
GetUserRegInfo(domain.Account) (UserRegisterInfoDTO, error)
}
type SendBindEmailCmd ¶
type UpdatePlateformInfoCmd ¶
type UpdatePlateformInfoCmd struct {
PlatformInfoDTO
User domain.Account
Email domain.Email
}
type UpdatePlateformTokenCmd ¶
type UpdatePlateformTokenCmd struct {
User domain.Account
PlatformToken domain.PlatformToken
}
type UpdateUserBasicInfoCmd ¶
type UserCreateCmd ¶
type UserCreateCmd struct {
Email domain.Email
Account domain.Account
Password domain.Password
Bio domain.Bio
AvatarId domain.AvatarId
}
user
func (*UserCreateCmd) Validate ¶
func (cmd *UserCreateCmd) Validate() error
type UserDTO ¶
type UserDTO struct {
Id string `json:"id"`
Email string `json:"email"`
Account string `json:"account"`
Bio string `json:"bio"`
AvatarId string `json:"avatar_id"`
FollowerCount int `json:"follower_count"`
FollowingCount int `json:"following_count"`
CourseAgreement string `json:"course_agreement"`
FinetuneAgreement string `json:"finetune_agreement"`
UserAgreement string `json:"user_agreement"`
Platform struct {
UserId string
Token string
NamespaceId string
CreateAt int64
} `json:"-"`
}
type UserInfoDTO ¶
type UserRegisterInfoCmd ¶
type UserRegisterInfoCmd domain.UserRegInfo
register
func (*UserRegisterInfoCmd) Validate ¶
func (cmd *UserRegisterInfoCmd) Validate() error
type UserRegisterInfoDTO ¶
type UserRegisterInfoDTO domain.UserRegInfo
type UserService ¶
type UserService interface {
// user
Create(*UserCreateCmd) (UserDTO, error)
CreatePlatformAccount(*CreatePlatformAccountCmd) (PlatformInfoDTO, error)
UpdatePlateformInfo(*UpdatePlateformInfoCmd) error
UpdatePlateformToken(*UpdatePlateformTokenCmd) error
NewPlatformAccountWithUpdate(*CreatePlatformAccountCmd) error
UpdateBasicInfo(domain.Account, UpdateUserBasicInfoCmd) error
UpdateAgreement(u domain.Account, t app.AgreementType) error
PrivacyRevoke(domain.Account) error
AgreementRevoke(u domain.Account, t app.AgreementType) error
UserInfo(domain.Account) (UserInfoDTO, error)
GetByAccount(domain.Account) (UserDTO, error)
GetByFollower(owner, follower domain.Account) (UserDTO, bool, error)
AddFollowing(*domain.FollowerInfo) error
RemoveFollowing(*domain.FollowerInfo) error
ListFollowing(*FollowsListCmd) (FollowsDTO, error)
AddFollower(*domain.FollowerInfo) error
RemoveFollower(*domain.FollowerInfo) error
ListFollower(*FollowsListCmd) (FollowsDTO, error)
RefreshGitlabToken(*RefreshTokenCmd) error
}
func NewUserService ¶
func NewUserService( repo repository.User, ps platform.User, sender message.MessageProducer, points pointsPort.Points, encryption utils.SymmetricEncryption, audit auditcommon.AuditService, ) UserService
ps: platform user service
type UserWhiteListCmd ¶
type UserWhiteListCmd domain.WhiteListInfo
type WhiteListService ¶
type WhitelistDTO ¶
Click to show internal directories.
Click to hide internal directories.