services

package
v0.0.0-...-d36ff20 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Locale

func Locale(ctx context.Context) language.Tag

func Token

func Token(ctx context.Context) (string, error)

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 (*AttachmentService) ByResource

func (*AttachmentService) ByUser

func (*AttachmentService) Clear

func (*AttachmentService) Create

func (*AttachmentService) Disable

func (p *AttachmentService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*AttachmentService) Dissociate

func (*AttachmentService) Index

func (*AttachmentService) SetTitle

func (*AttachmentService) SetUploadedAt

func (p *AttachmentService) SetUploadedAt(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

type EmailUserService

type EmailUserService struct {
	pb.UnimplementedEmailUserServer
	// contains filtered or unexported fields
}

func NewEmailUserService

func NewEmailUserService(db *gorm.DB, rabbitmq *rabbitmq.Config, enforcer *casbin.Enforcer, hmac *crypto.HMac, jwt *crypto.Jwt) *EmailUserService

func (*EmailUserService) ByEmail

func (*EmailUserService) ById

func (*EmailUserService) ByNickname

func (*EmailUserService) Confirm

func (p *EmailUserService) Confirm(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, 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) Disable

func (p *EmailUserService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*EmailUserService) Enable

func (p *EmailUserService) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*EmailUserService) ForgotPassword

func (p *EmailUserService) ForgotPassword(ctx context.Context, req *pb.UserByEmailRequest) (*emptypb.Empty, error)

func (*EmailUserService) Index

func (*EmailUserService) ResetPassword

func (*EmailUserService) SignIn

func (*EmailUserService) SignUp

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 (*GoogleOauth2Service) Disable

func (p *GoogleOauth2Service) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*GoogleOauth2Service) Enable

func (p *GoogleOauth2Service) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*GoogleOauth2Service) Index

type HmacService

type HmacService struct {
	pb.UnimplementedHMacServer
	// contains filtered or unexported fields
}

func NewHmacService

func NewHmacService(hmac *crypto.HMac) *HmacService

func (*HmacService) Sign

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 (*JwtService) Verify

type LeaveWordService

type LeaveWordService struct {
	pb.UnimplementedLeaveWordServer
	// contains filtered or unexported fields
}

func NewLeaveWordService

func NewLeaveWordService(db *gorm.DB) *LeaveWordService

func (*LeaveWordService) Destroy

func (p *LeaveWordService) Destroy(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*LeaveWordService) Index

func (*LeaveWordService) Publish

func (p *LeaveWordService) Publish(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*LeaveWordService) Set

type LocaleService

type LocaleService struct {
	pb.UnimplementedLocaleServer
	// contains filtered or unexported fields
}

func NewLocaleService

func NewLocaleService(db *gorm.DB) *LocaleService

func (*LocaleService) ByLang

func (*LocaleService) Index

func (p *LocaleService) Index(ctx context.Context, req *pb.Pager) (*pb.LocaleIndexResponse, error)

func (*LocaleService) Set

type SessionService

type SessionService struct {
	pb.UnimplementedSessionServer
	// contains filtered or unexported fields
}

func NewSessionService

func NewSessionService(db *gorm.DB) *SessionService

func (*SessionService) ByUser

func (*SessionService) Disable

func (p *SessionService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*SessionService) Index

type UserService

type UserService struct {
	pb.UnimplementedUserServer
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(db *gorm.DB) *UserService

func (*UserService) ById

func (*UserService) ByUid

func (*UserService) Disable

func (p *UserService) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*UserService) Enable

func (p *UserService) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*UserService) Index

func (p *UserService) Index(ctx context.Context, req *pb.Pager) (*pb.UserIndexResponse, error)

func (*UserService) Lock

func (p *UserService) Lock(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*UserService) Logs

func (*UserService) SignOut

func (p *UserService) SignOut(ctx context.Context, req *pb.UserSignOutRequest) (*emptypb.Empty, error)

func (*UserService) Unlock

func (p *UserService) Unlock(ctx context.Context, req *pb.IdRequest) (*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) ById

func (*WechatMiniProgramService) Disable

func (*WechatMiniProgramService) Enable

func (*WechatMiniProgramService) Index

type WechatOauth2Service

type WechatOauth2Service struct {
	pb.UnimplementedWechatOauth2UserServer
	// contains filtered or unexported fields
}

func NewWechatOauth2Service

func NewWechatOauth2Service(db *gorm.DB) *WechatOauth2Service

func (*WechatOauth2Service) ById

func (*WechatOauth2Service) ByUnionId

func (*WechatOauth2Service) Disable

func (p *WechatOauth2Service) Disable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*WechatOauth2Service) Enable

func (p *WechatOauth2Service) Enable(ctx context.Context, req *pb.IdRequest) (*emptypb.Empty, error)

func (*WechatOauth2Service) Index

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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