ApiRPC

package
v0.0.0-...-bbbc4ea Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CtxCanceledErr = errors.New("the client canceled or connection time out")
View Source
var ErrWrongSecretKey = errors.New("the secret key is wrong")

Functions

func CheckAuthToken

func CheckAuthToken(token string) (int64, error)

func GetDelayMessages

func GetDelayMessages(userId int64) ([][]byte, error)

func GetGroupChatUsers

func GetGroupChatUsers(groupId int64) ([]int64, error)

func GetMongoDataClient

func GetMongoDataClient() mongoPb.MongoBindServiceClient

Return the client for mongo data rpc sever. The type of client is pointer.

func GetMySQLDataClient

func GetMySQLDataClient() mysqlPb.MySQLBindServiceClient

Return the client for mysql data rpc server. The type of client is pointer.

func GetSubscriptionInfo

func GetSubscriptionInfo(subsId int64) (managerId int64, fans []int64, err error)

func GetUserAuthClient

func GetUserAuthClient() userAuthPb.UserAuthClient

Return the client for user aut rpc server.

func GetUserBlacklist

func GetUserBlacklist(userId int64) ([]int64, error)

func GetUserFriends

func GetUserFriends(userId int64) ([]int64, error)

func SaveDelayMessage

func SaveDelayMessage(userId int64, message []byte) error

func SaveGroupChatHistory

func SaveGroupChatHistory(groupId int64, message []byte) error

func SaveSubscriptionMessageHistory

func SaveSubscriptionMessageHistory(subsId int64, message []byte) error

func SaveUserChatHistory

func SaveUserChatHistory(joinId string, message []byte) error

func StartMsgTransferRPCServer

func StartMsgTransferRPCServer()

start the rpc server which for operating the data of node pool in message service

Types

type NodesData

type NodesData struct {
}

func (*NodesData) GroupChatNodeUserAdd

func (obj *NodesData) GroupChatNodeUserAdd(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) GroupChatNodeUserDel

func (obj *NodesData) GroupChatNodeUserDel(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) GroupChatNodesPoolCleanByActivity

func (obj *NodesData) GroupChatNodesPoolCleanByActivity(ctx context.Context, param *msgNodesPb.CleanNodePoolAuth) (
	*msgNodesPb.Result, error)

func (*NodesData) GroupChatNodesPoolCleanByLifeTime

func (obj *NodesData) GroupChatNodesPoolCleanByLifeTime(ctx context.Context, param *msgNodesPb.CleanNodePoolAuth) (
	*msgNodesPb.Result, error)

func (*NodesData) SubsNodeFansAdd

func (obj *NodesData) SubsNodeFansAdd(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) SubsNodeFansDel

func (obj *NodesData) SubsNodeFansDel(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) SubsNodesPoolCleanByLifeTime

func (obj *NodesData) SubsNodesPoolCleanByLifeTime(ctx context.Context, param *msgNodesPb.CleanNodePoolAuth) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeBlacklistAdd

func (obj *NodesData) UserNodeBlacklistAdd(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeBlacklistDel

func (obj *NodesData) UserNodeBlacklistDel(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeFriendsAdd

func (obj *NodesData) UserNodeFriendsAdd(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeFriendsDel

func (obj *NodesData) UserNodeFriendsDel(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeMoveFriendIntoBlacklist

func (obj *NodesData) UserNodeMoveFriendIntoBlacklist(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

func (*NodesData) UserNodeMoveFriendOutFromBlacklist

func (obj *NodesData) UserNodeMoveFriendOutFromBlacklist(ctx context.Context, param *msgNodesPb.DoubleId) (
	*msgNodesPb.Result, error)

Jump to

Keyboard shortcuts

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