public

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Provide(
	func(
		l *zap.Logger,
		pSetting pfx.ProfileSettingParams,
		dbProvider ofx.DocumentStoreParams,
		redisParams ofx.RedisParams,
		rcParams ofx.RedisCacheParams,
		dbParams ofx.MongoParams,
		mqParams mfx.MessageQueueParams,
		authMiddlewareParams sfx.AuthMiddlewareParams,
		mysqlDb mysqlpkg.Param,
		set setting.Param,
	) (out sfx.GrpcServiceResult, err error) {
		if coll, e := dbProvider.DriverProvider.OpenDbDriver(pSetting.ProfileStoreName); e != nil {
			err = e
		} else {
			if svc, e := NewService(
				l,
				coll,
				redisParams.Redis,
				rcParams.RedisCache,
				dbParams.MongoClient,
				mqParams.MessageQueue,
				authMiddlewareParams.AuthMiddleware,
				mysqlDb,
				set,
			); e != nil {
				err = e
			} else {
				out.GrpcService = svc
			}
		}
		return
	},
)

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(
	l *zap.Logger,
	coll diface.ICollection,
	client *redis.Client,
	redisCache diface.ICache,
	mongoCli *mongo.Client,
	mq miface.MessageQueue,
	authMiddleware siface.IAuthMiddleware,
	mysqlDb mysqlpkg.Param,
	set setting.Param,
) (result *Service, err error)

func (*Service) CreateProfile

func (s *Service) CreateProfile(ctx context.Context, request *pb.CreateProfileRequest) (*pb.CreateProfileResponse, error)

func (*Service) CreateRole added in v0.0.5

func (s *Service) CreateRole(ctx context.Context, request *pb.CreateRoleRequest) (*pb.CreateRoleResponse, error)

func (*Service) GetProfile

func (s *Service) GetProfile(ctx context.Context, request *pb.GetProfileRequest) (*pb.GetProfileResponse, error)

func (*Service) GetProfileStatus

func (s *Service) GetProfileStatus(_ context.Context, request *pb.GetProfileStatusRequest) (*pb.GetProfileStatusResponse, error)

func (*Service) IsProfileExist

func (s *Service) IsProfileExist(ctx context.Context, request *pb.IsProfileExistRequest) (*pb.IsProfileExistResponse, error)

func (*Service) LoginAccount added in v0.0.5

func (s *Service) LoginAccount(ctx context.Context, request *pb.LoginAccountRequest) (*pb.LoginAccountResponse, error)

func (*Service) LoginRole added in v0.0.5

func (s *Service) LoginRole(ctx context.Context, request *pb.LoginRoleRequest) (*pb.LoginRoleResponse, error)

func (*Service) OnProfileUpdate

func (s *Service) OnProfileUpdate(uid string, change *pb.Profile) error

func (*Service) RandName added in v0.0.11

func (s *Service) RandName(ctx context.Context, request *pb.RandNameRequest) (*pb.RandNameResponse, error)

func (*Service) RegisterWithGrpcServer

func (s *Service) RegisterWithGrpcServer(server siface.IGrpcServer) error

func (*Service) UpdateProfile

func (s *Service) UpdateProfile(ctx context.Context, request *pb.UpdateProfileRequest) (*pb.UpdateProfileResponse, error)

func (*Service) WatchProfile

func (s *Service) WatchProfile(request *pb.WatchProfileRequest, server pb.ProfileService_WatchProfileServer) error

Jump to

Keyboard shortcuts

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