Documentation ¶
Index ¶
- func Auth(ctx context.Context, jwt *crypto.Jwt, audience string) error
- func ClientIP(ctx context.Context) net.IP
- func Locale(ctx context.Context) language.Tag
- func Token(ctx context.Context) (string, error)
- type AesService
- type AttachmentService
- func (p *AttachmentService) Associate(ctx context.Context, req *pb.AttachmentResourceRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) ByResource(ctx context.Context, req *pb.ResourceRequest) (*pb.AttachmentListResponse, error)
- func (p *AttachmentService) ByUser(ctx context.Context, req *pb.IdRequest) (*pb.AttachmentListResponse, error)
- func (p *AttachmentService) Clear(ctx context.Context, req *pb.AttachmentClearRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) Create(ctx context.Context, req *pb.AttachmentCreateRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) Dissociate(ctx context.Context, req *pb.AttachmentResourceRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) Index(ctx context.Context, req *pb.Pager) (*pb.AttachmentIndexResponse, error)
- func (p *AttachmentService) SetTitle(ctx context.Context, req *pb.AttachmentSetTitleRequest) (*emptypb.Empty, error)
- func (p *AttachmentService) SetUploadedAt(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- type EmailUserService
- func (p *EmailUserService) ByEmail(ctx context.Context, req *pb.EmailUserByEmailRequest) (*pb.EmailUserIndexResponse_Item, error)
- func (p *EmailUserService) ById(ctx context.Context, req *pb.IdRequest) (*pb.EmailUserIndexResponse_Item, error)
- func (p *EmailUserService) ByNickname(ctx context.Context, req *pb.EmailUserByNicknameRequest) (*pb.EmailUserIndexResponse_Item, error)
- func (p *EmailUserService) Confirm(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) ConfirmByEmail(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) ConfirmByToken(ctx context.Context, req *pb.UserByTokenRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) ForgotPassword(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) Index(ctx context.Context, req *pb.Pager) (*pb.EmailUserIndexResponse, error)
- func (p *EmailUserService) ResetPassword(ctx context.Context, req *pb.UserResetPasswordRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) SignIn(ctx context.Context, req *pb.UserSignInByEmailRequest) (*pb.UserSignInResponse, error)
- func (p *EmailUserService) SignUp(ctx context.Context, req *pb.UserSignUpByEmailRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) UnlockByEmail(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
- func (p *EmailUserService) UnlockByToken(ctx context.Context, req *pb.UserByTokenRequest) (*emptypb.Empty, error)
- type GoogleOauth2Service
- func (p *GoogleOauth2Service) ById(ctx context.Context, req *pb.IdRequest) (*pb.GoogleOauth2UserIndexResponse_Item, error)
- func (p *GoogleOauth2Service) BySubject(ctx context.Context, req *pb.GoogleOauth2UserBySubjectRequest) (*pb.GoogleOauth2UserIndexResponse_Item, error)
- func (p *GoogleOauth2Service) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *GoogleOauth2Service) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *GoogleOauth2Service) Index(ctx context.Context, req *pb.Pager) (*pb.GoogleOauth2UserIndexResponse, error)
- type HmacService
- type JwtService
- type LeaveWordService
- func (p *LeaveWordService) Destroy(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *LeaveWordService) Index(ctx context.Context, req *pb.Pager) (*pb.LeaveWordIndexResponse, error)
- func (p *LeaveWordService) Publish(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *LeaveWordService) Set(ctx context.Context, req *pb.LeaveWordCreateRequest) (*emptypb.Empty, error)
- type LocaleService
- func (p *LocaleService) ByLang(ctx context.Context, req *pb.LocaleByLangRequest) (*pb.LocaleByLangResponse, error)
- func (p *LocaleService) Index(ctx context.Context, req *pb.Pager) (*pb.LocaleIndexResponse, error)
- func (p *LocaleService) Set(ctx context.Context, req *pb.LocaleSetRequest) (*emptypb.Empty, error)
- type SessionService
- func (p *SessionService) ByUser(ctx context.Context, req *pb.IdRequest) (*pb.SessionListResponse, error)
- func (p *SessionService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *SessionService) Index(ctx context.Context, req *pb.Pager) (*pb.SessionIndexResponse, error)
- type UserService
- func (p *UserService) ById(ctx context.Context, req *pb.IdRequest) (*pb.UserIndexResponse_Item, error)
- func (p *UserService) ByUid(ctx context.Context, req *pb.UidRequest) (*pb.UserIndexResponse_Item, error)
- func (p *UserService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *UserService) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *UserService) Index(ctx context.Context, req *pb.Pager) (*pb.UserIndexResponse, error)
- func (p *UserService) Lock(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *UserService) Logs(ctx context.Context, req *pb.UserLogsRequest) (*pb.UserLogsResponse, error)
- func (p *UserService) SignOut(ctx context.Context, req *pb.UserSignOutRequest) (*emptypb.Empty, error)
- func (p *UserService) Unlock(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *UserService) UpdateProfile(ctx context.Context, req *pb.UserUpdateProfileRequest) (*emptypb.Empty, error)
- type WechatMiniProgramService
- func (p *WechatMiniProgramService) ByAppIdAndUnionId(ctx context.Context, req *pb.WechatByAppIdAndOpenIdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
- func (p *WechatMiniProgramService) ById(ctx context.Context, req *pb.IdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
- func (p *WechatMiniProgramService) ByUnionId(ctx context.Context, req *pb.WechatByUnionIdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
- func (p *WechatMiniProgramService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *WechatMiniProgramService) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *WechatMiniProgramService) Index(ctx context.Context, req *pb.Pager) (*pb.WechatMiniProgramUserIndexResponse, error)
- type WechatOauth2Service
- func (p *WechatOauth2Service) ByAppIdAndUnionId(ctx context.Context, req *pb.WechatByAppIdAndOpenIdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
- func (p *WechatOauth2Service) ById(ctx context.Context, req *pb.IdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
- func (p *WechatOauth2Service) ByUnionId(ctx context.Context, req *pb.WechatByUnionIdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
- func (p *WechatOauth2Service) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *WechatOauth2Service) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)
- func (p *WechatOauth2Service) Index(ctx context.Context, req *pb.Pager) (*pb.WechatOauth2UserIndexResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AesService ¶
type AesService struct { pb.UnimplementedAesServer // contains filtered or unexported fields }
func NewAesService ¶
func NewAesService(aes *crypto.Aes) *AesService
func (*AesService) Decrypt ¶
func (p *AesService) Decrypt(ctx context.Context, req *pb.AesCodeMessage) (*pb.AesPlainMessage, error)
func (*AesService) Encrypt ¶
func (p *AesService) Encrypt(ctx context.Context, req *pb.AesPlainMessage) (*pb.AesCodeMessage, error)
type AttachmentService ¶
type AttachmentService struct { pb.UnimplementedAttachmentServer // contains filtered or unexported fields }
func NewAttachmentService ¶
func NewAttachmentService(db *gorm.DB) *AttachmentService
func (*AttachmentService) Associate ¶
func (p *AttachmentService) Associate(ctx context.Context, req *pb.AttachmentResourceRequest) (*emptypb.Empty, error)
func (*AttachmentService) ByResource ¶
func (p *AttachmentService) ByResource(ctx context.Context, req *pb.ResourceRequest) (*pb.AttachmentListResponse, error)
func (*AttachmentService) ByUser ¶
func (p *AttachmentService) ByUser(ctx context.Context, req *pb.IdRequest) (*pb.AttachmentListResponse, error)
func (*AttachmentService) Clear ¶
func (p *AttachmentService) Clear(ctx context.Context, req *pb.AttachmentClearRequest) (*emptypb.Empty, error)
func (*AttachmentService) Create ¶
func (p *AttachmentService) Create(ctx context.Context, req *pb.AttachmentCreateRequest) (*emptypb.Empty, error)
func (*AttachmentService) Dissociate ¶
func (p *AttachmentService) Dissociate(ctx context.Context, req *pb.AttachmentResourceRequest) (*emptypb.Empty, error)
func (*AttachmentService) Index ¶
func (p *AttachmentService) Index(ctx context.Context, req *pb.Pager) (*pb.AttachmentIndexResponse, error)
func (*AttachmentService) SetTitle ¶
func (p *AttachmentService) SetTitle(ctx context.Context, req *pb.AttachmentSetTitleRequest) (*emptypb.Empty, error)
func (*AttachmentService) SetUploadedAt ¶
type EmailUserService ¶
type EmailUserService struct { pb.UnimplementedEmailUserServer // contains filtered or unexported fields }
func NewEmailUserService ¶
func (*EmailUserService) ByEmail ¶
func (p *EmailUserService) ByEmail(ctx context.Context, req *pb.EmailUserByEmailRequest) (*pb.EmailUserIndexResponse_Item, error)
func (*EmailUserService) ById ¶
func (p *EmailUserService) ById(ctx context.Context, req *pb.IdRequest) (*pb.EmailUserIndexResponse_Item, error)
func (*EmailUserService) ByNickname ¶
func (p *EmailUserService) ByNickname(ctx context.Context, req *pb.EmailUserByNicknameRequest) (*pb.EmailUserIndexResponse_Item, error)
func (*EmailUserService) ConfirmByEmail ¶
func (p *EmailUserService) ConfirmByEmail(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
func (*EmailUserService) ConfirmByToken ¶
func (p *EmailUserService) ConfirmByToken(ctx context.Context, req *pb.UserByTokenRequest) (*emptypb.Empty, error)
func (*EmailUserService) ForgotPassword ¶
func (p *EmailUserService) ForgotPassword(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
func (*EmailUserService) Index ¶
func (p *EmailUserService) Index(ctx context.Context, req *pb.Pager) (*pb.EmailUserIndexResponse, error)
func (*EmailUserService) ResetPassword ¶
func (p *EmailUserService) ResetPassword(ctx context.Context, req *pb.UserResetPasswordRequest) (*emptypb.Empty, error)
func (*EmailUserService) SignIn ¶
func (p *EmailUserService) SignIn(ctx context.Context, req *pb.UserSignInByEmailRequest) (*pb.UserSignInResponse, error)
func (*EmailUserService) SignUp ¶
func (p *EmailUserService) SignUp(ctx context.Context, req *pb.UserSignUpByEmailRequest) (*emptypb.Empty, error)
func (*EmailUserService) UnlockByEmail ¶
func (p *EmailUserService) UnlockByEmail(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)
func (*EmailUserService) UnlockByToken ¶
func (p *EmailUserService) UnlockByToken(ctx context.Context, req *pb.UserByTokenRequest) (*emptypb.Empty, error)
type GoogleOauth2Service ¶
type GoogleOauth2Service struct { pb.UnimplementedGoogleOauth2UserServer // contains filtered or unexported fields }
func NewGoogleOauth2Service ¶
func NewGoogleOauth2Service(db *gorm.DB) *GoogleOauth2Service
func (*GoogleOauth2Service) ById ¶
func (p *GoogleOauth2Service) ById(ctx context.Context, req *pb.IdRequest) (*pb.GoogleOauth2UserIndexResponse_Item, error)
func (*GoogleOauth2Service) BySubject ¶
func (p *GoogleOauth2Service) BySubject(ctx context.Context, req *pb.GoogleOauth2UserBySubjectRequest) (*pb.GoogleOauth2UserIndexResponse_Item, error)
func (*GoogleOauth2Service) Index ¶
func (p *GoogleOauth2Service) Index(ctx context.Context, req *pb.Pager) (*pb.GoogleOauth2UserIndexResponse, error)
type HmacService ¶
type HmacService struct { pb.UnimplementedHMacServer // contains filtered or unexported fields }
func NewHmacService ¶
func NewHmacService(hmac *crypto.HMac) *HmacService
func (*HmacService) Sign ¶
func (p *HmacService) Sign(ctx context.Context, req *pb.HMacSignRequest) (*pb.HMacSignResponse, error)
func (*HmacService) Verify ¶
func (p *HmacService) Verify(ctx context.Context, req *pb.HMacVerifyRequest) (*emptypb.Empty, error)
type JwtService ¶
type JwtService struct { pb.UnimplementedJwtServer // contains filtered or unexported fields }
func NewJwtService ¶
func NewJwtService(jwt *crypto.Jwt) *JwtService
func (*JwtService) Sign ¶
func (p *JwtService) Sign(ctx context.Context, req *pb.JwtSignRequest) (*pb.JwtSignResponse, error)
func (*JwtService) Verify ¶
func (p *JwtService) Verify(ctx context.Context, req *pb.JwtVerifyRequest) (*pb.JwtVerifyResponse, error)
type LeaveWordService ¶
type LeaveWordService struct { pb.UnimplementedLeaveWordServer // contains filtered or unexported fields }
func NewLeaveWordService ¶
func NewLeaveWordService(db *gorm.DB) *LeaveWordService
func (*LeaveWordService) Index ¶
func (p *LeaveWordService) Index(ctx context.Context, req *pb.Pager) (*pb.LeaveWordIndexResponse, error)
func (*LeaveWordService) Set ¶
func (p *LeaveWordService) Set(ctx context.Context, req *pb.LeaveWordCreateRequest) (*emptypb.Empty, error)
type LocaleService ¶
type LocaleService struct { pb.UnimplementedLocaleServer // contains filtered or unexported fields }
func NewLocaleService ¶
func NewLocaleService(db *gorm.DB) *LocaleService
func (*LocaleService) ByLang ¶
func (p *LocaleService) ByLang(ctx context.Context, req *pb.LocaleByLangRequest) (*pb.LocaleByLangResponse, error)
func (*LocaleService) Index ¶
func (p *LocaleService) Index(ctx context.Context, req *pb.Pager) (*pb.LocaleIndexResponse, error)
func (*LocaleService) Set ¶
func (p *LocaleService) Set(ctx context.Context, req *pb.LocaleSetRequest) (*emptypb.Empty, error)
type SessionService ¶
type SessionService struct { pb.UnimplementedSessionServer // contains filtered or unexported fields }
func NewSessionService ¶
func NewSessionService(db *gorm.DB) *SessionService
func (*SessionService) ByUser ¶
func (p *SessionService) ByUser(ctx context.Context, req *pb.IdRequest) (*pb.SessionListResponse, error)
func (*SessionService) Index ¶
func (p *SessionService) Index(ctx context.Context, req *pb.Pager) (*pb.SessionIndexResponse, error)
type UserService ¶
type UserService struct { pb.UnimplementedUserServer // contains filtered or unexported fields }
func NewUserService ¶
func NewUserService(db *gorm.DB) *UserService
func (*UserService) ById ¶
func (p *UserService) ById(ctx context.Context, req *pb.IdRequest) (*pb.UserIndexResponse_Item, error)
func (*UserService) ByUid ¶
func (p *UserService) ByUid(ctx context.Context, req *pb.UidRequest) (*pb.UserIndexResponse_Item, error)
func (*UserService) Index ¶
func (p *UserService) Index(ctx context.Context, req *pb.Pager) (*pb.UserIndexResponse, error)
func (*UserService) Logs ¶
func (p *UserService) Logs(ctx context.Context, req *pb.UserLogsRequest) (*pb.UserLogsResponse, error)
func (*UserService) SignOut ¶
func (p *UserService) SignOut(ctx context.Context, req *pb.UserSignOutRequest) (*emptypb.Empty, error)
func (*UserService) UpdateProfile ¶
func (p *UserService) UpdateProfile(ctx context.Context, req *pb.UserUpdateProfileRequest) (*emptypb.Empty, error)
type WechatMiniProgramService ¶
type WechatMiniProgramService struct { pb.UnimplementedWechatMiniProgramUserServer // contains filtered or unexported fields }
func NewWechatMiniProgramService ¶
func NewWechatMiniProgramService(db *gorm.DB) *WechatMiniProgramService
func (*WechatMiniProgramService) ByAppIdAndUnionId ¶
func (p *WechatMiniProgramService) ByAppIdAndUnionId(ctx context.Context, req *pb.WechatByAppIdAndOpenIdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
func (*WechatMiniProgramService) ById ¶
func (p *WechatMiniProgramService) ById(ctx context.Context, req *pb.IdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
func (*WechatMiniProgramService) ByUnionId ¶
func (p *WechatMiniProgramService) ByUnionId(ctx context.Context, req *pb.WechatByUnionIdRequest) (*pb.WechatMiniProgramUserIndexResponse_Item, error)
func (*WechatMiniProgramService) Index ¶
func (p *WechatMiniProgramService) Index(ctx context.Context, req *pb.Pager) (*pb.WechatMiniProgramUserIndexResponse, error)
type WechatOauth2Service ¶
type WechatOauth2Service struct { pb.UnimplementedWechatOauth2UserServer // contains filtered or unexported fields }
func NewWechatOauth2Service ¶
func NewWechatOauth2Service(db *gorm.DB) *WechatOauth2Service
func (*WechatOauth2Service) ByAppIdAndUnionId ¶
func (p *WechatOauth2Service) ByAppIdAndUnionId(ctx context.Context, req *pb.WechatByAppIdAndOpenIdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
func (*WechatOauth2Service) ById ¶
func (p *WechatOauth2Service) ById(ctx context.Context, req *pb.IdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
func (*WechatOauth2Service) ByUnionId ¶
func (p *WechatOauth2Service) ByUnionId(ctx context.Context, req *pb.WechatByUnionIdRequest) (*pb.WechatOauth2UserIndexResponse_Item, error)
func (*WechatOauth2Service) Index ¶
func (p *WechatOauth2Service) Index(ctx context.Context, req *pb.Pager) (*pb.WechatOauth2UserIndexResponse, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.