channel

package
v0.0.0-...-d9311aa Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetChannelUsersRequestField4 = &pb.Channel_GetChannelUsersRequest_Field4{
		Field1:  1,
		Field2:  1,
		Field3:  1,
		Field4:  1,
		Field5:  1,
		Field6:  1,
		Field7:  1,
		Field8:  1,
		Field21: 1,
		Field22: 1,
		Field25: 1,
	}
)

Functions

This section is empty.

Types

type Daemon

type Daemon interface {
	Call(serviceMethod string, args *rpc.Args, reply *rpc.Reply) error
	Register(serviceMethod string, handler rpc.Handler) error

	GetFakeSource(uin int64) *fake.Source
	GetAccountManager() *account.Manager
	OnRecvChannelMessage(id int64, recv *pb.Common_Msg) error
}

type Manager

type Manager struct {
	context.Context
	Daemon
	Store
}

func NewManager

func NewManager(ctx context.Context, daemon Daemon, store Store) *Manager

func (*Manager) CallOidbSvcTrpcTcp

func (m *Manager) CallOidbSvcTrpcTcp()

func (*Manager) GetChannelRoles

func (m *Manager) GetChannelRoles(uin, channelID int64) (*pb.Channel_GetChannelRolesResponse, error)

func (*Manager) GetChannelUserRoles

func (m *Manager) GetChannelUserRoles(uin, channelID, tinyID int64) (*pb.Channel_GetChannelUserRolesResponse, error)

func (*Manager) GetChannelUsers

func (m *Manager) GetChannelUsers(uin, channelID, start int64, limit int32, cookie ...[]byte) (*pb.Channel_GetChannelUsersResponse, error)

func (*Manager) GetChannelUsersByIDs

func (m *Manager) GetChannelUsersByIDs(uin, channelID int64, tinyIDs []int64, start int64, limit int32, cookie ...[]byte) (*pb.Channel_GetChannelUsersResponse, error)

func (*Manager) GetChannels

func (m *Manager) GetChannels()

func (*Manager) SendMessage

func (m *Manager) SendMessage(uin int64, req *pb.Oidb0Xf62_ReqBody) (*pb.Oidb0Xf62_RspBody, error)

func (*Manager) SyncFirstView

func (m *Manager) SyncFirstView(uin int64, seq uint32) (*pb.SyncLogic_FirstViewRsp, error)

type Store

type Store interface {
	GetChannel(channelID int64) (oldChannel *penguin.Chat, ok bool)
	SetChannel(channelID int64, newChannel *penguin.Chat) (oldChannel *penguin.Chat, ok bool)

	GetRoom(channelID, roomID int64) (oldRoom *penguin.Chat, ok bool)
	SetRoom(channelID, roomID int64, newRoom *penguin.Chat) (oldRoom *penguin.Chat, ok bool)

	GetUser(channelID, userID int64) (oldUser *penguin.User, ok bool)
	SetUser(channelID, userID int64, newUser *penguin.User) (oldUser *penguin.User, ok bool)
}

func NewMemStore

func NewMemStore() Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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