service

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Provide(
	func(
		l *zap.Logger,
		dProvider ofx.DocumentStoreParams,
		mqParams mfx.MessageQueueParams,
		setting bfx.BuddySettingsParams,
		rcParams ofx.RedisCacheParams,
	) (out sfx.GrpcServiceResult, err error) {
		if coll, e := dProvider.DriverProvider.OpenDbDriver(setting.Name); e != nil {
			err = e
		} else if s, e := NewService(l, coll, rcParams.RedisCache, mqParams.MessageQueue, setting); e != nil {
			err = e
		} else {
			out.GrpcService = s
		}
		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,
	cache diface.ICache,
	mq miface.MessageQueue,
	setting bfx.BuddySettingsParams,
) (result *Service, err error)

func (*Service) AddBlockedProfiles

func (s *Service) AddBlockedProfiles(ctx context.Context, ids *pb.ProfileIds) (*pb.Nothing, error)

func (*Service) AddBuddy

func (s *Service) AddBuddy(ctx context.Context, request *pb.AddBuddyRequest) (*pb.AddBuddyResponse, error)

func (*Service) DeleteAccount

func (s *Service) DeleteAccount(ctx context.Context, request *pb.DeleteAccountRequest) (*pb.DeleteAccountResponse, error)

func (*Service) GetBlockedProfiles

func (s *Service) GetBlockedProfiles(ctx context.Context, _ *pb.Nothing) (*pb.ProfileIds, error)

func (*Service) GetBuddies

func (s *Service) GetBuddies(ctx context.Context, request *pb.GetBuddyRequest) (*pb.GetBuddyResponse, error)

func (*Service) IsBlocked

func (s *Service) IsBlocked(ctx context.Context, request *pb.IsBlockedRequest) (*pb.IsBlockedResponse, error)

func (*Service) RefuseBuddy

func (s *Service) RefuseBuddy(ctx context.Context, request *pb.RefuseBuddyRequest) (*pb.Nothing, error)

func (*Service) RegisterWithGrpcServer

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

func (*Service) Remark

func (s *Service) Remark(ctx context.Context, request *pb.RemarkRequest) (*pb.Nothing, error)

func (*Service) RemoveBlockedProfiles

func (s *Service) RemoveBlockedProfiles(ctx context.Context, ids *pb.ProfileIds) (*pb.Nothing, error)

func (*Service) RemoveBuddy

func (s *Service) RemoveBuddy(ctx context.Context, request *pb.RemoveBuddyRequest) (*pb.Nothing, error)

func (*Service) ReplyAddBuddy

func (s *Service) ReplyAddBuddy(ctx context.Context, request *pb.ReplyAddBuddyRequest) (*pb.ReplyAddBuddyResponse, error)

func (*Service) WatchBuddies

func (s *Service) WatchBuddies(_ *pb.Nothing, server pb.BuddyService_WatchBuddiesServer) error

Jump to

Keyboard shortcuts

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