pkg

package
v0.0.0-...-55e1567 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubscribeRoutine

func SubscribeRoutine(subscriber *Subscriber, dao *dao.Follow)

Types

type Publisher

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

Publisher implements an amqp publisher.

func NewPublisher

func NewPublisher(conn *amqp.Connection, exchange string) (*Publisher, error)

func (*Publisher) Publish

Publish publishes a message.

type RedisManager

type RedisManager struct {
	RedisClient *redis.Client
}

func NewRedisManager

func NewRedisManager(client *redis.Client) *RedisManager

func (*RedisManager) Action

func (*RedisManager) Check

func (r *RedisManager) Check(ctx context.Context, uid, toUid int64) (bool, error)

func (*RedisManager) Count

func (r *RedisManager) Count(ctx context.Context, uid int64, option int8) (int64, error)

func (*RedisManager) List

func (r *RedisManager) List(ctx context.Context, uid int64, option int8) (list []int64, err error)

type Subscriber

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

Subscriber implements an amqp subscriber.

func NewSubscriber

func NewSubscriber(conn *amqp.Connection, exchange string) (*Subscriber, error)

NewSubscriber creates an amqp subscriber.

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(c context.Context) (chan *sociality.DouyinRelationActionRequest, func(), error)

Subscribe subscribes and returns a channel with CarEntity data.

func (*Subscriber) SubscribeRaw

func (s *Subscriber) SubscribeRaw(_ context.Context) (<-chan amqp.Delivery, func(), error)

SubscribeRaw subscribes and returns a channel with raw amqp delivery.

type UserManager

type UserManager struct {
	UserService userservice.Client
	ChatService chatservice.Client
}

func (*UserManager) GetFriendUsers

func (m *UserManager) GetFriendUsers(ctx context.Context, list []int64, viewerId int64) ([]*base.FriendUser, error)

func (*UserManager) GetUsers

func (m *UserManager) GetUsers(ctx context.Context, list []int64, viewerId int64) ([]*base.User, error)

GetUsers gets users info by list.

Jump to

Keyboard shortcuts

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