friend

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error

func WithDBFunc added in v3.7.0

func WithDBFunc(
	fn func(ctx context.Context, userIDs []string) (users []*relationtb.UserModel, err error),
) friendNotificationSenderOptions

func WithFriendDB added in v3.7.0

func WithFriendDB(db controller.FriendDatabase) friendNotificationSenderOptions

func WithRpcFunc added in v3.7.0

func WithRpcFunc(
	fn func(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error),
) friendNotificationSenderOptions

Types

type Config added in v3.7.0

type Config struct {
	RpcConfig          config.Friend
	RedisConfig        config.Redis
	MongodbConfig      config.Mongo
	ZookeeperConfig    config.ZooKeeper
	NotificationConfig config.Notification
	Share              config.Share
	WebhooksConfig     config.Webhooks
	LocalCacheConfig   config.LocalCache
}

type FriendNotificationSender added in v3.7.0

type FriendNotificationSender struct {
	*rpcclient.NotificationSender
	// contains filtered or unexported fields
}

func NewFriendNotificationSender added in v3.7.0

func NewFriendNotificationSender(
	conf *config.Notification,
	msgRpcClient *rpcclient.MessageRpcClient,
	opts ...friendNotificationSenderOptions,
) *FriendNotificationSender

func (*FriendNotificationSender) BlackAddedNotification added in v3.7.0

func (f *FriendNotificationSender) BlackAddedNotification(ctx context.Context, req *pbfriend.AddBlackReq)

func (*FriendNotificationSender) BlackDeletedNotification added in v3.7.0

func (f *FriendNotificationSender) BlackDeletedNotification(ctx context.Context, req *pbfriend.RemoveBlackReq)

func (*FriendNotificationSender) FriendAddedNotification added in v3.7.0

func (f *FriendNotificationSender) FriendAddedNotification(
	ctx context.Context,
	operationID, opUserID, fromUserID, toUserID string,
) error

func (*FriendNotificationSender) FriendApplicationAddNotification added in v3.7.0

func (f *FriendNotificationSender) FriendApplicationAddNotification(ctx context.Context, req *pbfriend.ApplyToAddFriendReq)

func (*FriendNotificationSender) FriendApplicationAgreedNotification added in v3.7.0

func (f *FriendNotificationSender) FriendApplicationAgreedNotification(
	ctx context.Context,
	req *pbfriend.RespondFriendApplyReq,
)

func (*FriendNotificationSender) FriendApplicationRefusedNotification added in v3.7.0

func (f *FriendNotificationSender) FriendApplicationRefusedNotification(
	ctx context.Context,
	req *pbfriend.RespondFriendApplyReq,
)

func (*FriendNotificationSender) FriendDeletedNotification added in v3.7.0

func (f *FriendNotificationSender) FriendDeletedNotification(ctx context.Context, req *pbfriend.DeleteFriendReq)

func (*FriendNotificationSender) FriendInfoUpdatedNotification added in v3.7.0

func (f *FriendNotificationSender) FriendInfoUpdatedNotification(ctx context.Context, changedUserID string, needNotifiedUserID string)

func (*FriendNotificationSender) FriendRemarkSetNotification added in v3.7.0

func (f *FriendNotificationSender) FriendRemarkSetNotification(ctx context.Context, fromUserID, toUserID string)

func (*FriendNotificationSender) FriendsInfoUpdateNotification added in v3.7.0

func (f *FriendNotificationSender) FriendsInfoUpdateNotification(ctx context.Context, toUserID string, friendIDs []string)

func (*FriendNotificationSender) UserInfoUpdatedNotification added in v3.7.0

func (f *FriendNotificationSender) UserInfoUpdatedNotification(ctx context.Context, changedUserID string)

Jump to

Keyboard shortcuts

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