service

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func M

func M(data proto.Message) (res *v10.Result, err error)

func ML

func ML(dataList []proto.Message) (res *v10.Result, err error)

func PooledInvoke

func PooledInvoke(op v10.Op, modelOut interface{}, pbOut proto.Message, cb func(error, *Request)) (err error)

Types

type AuthServer

type AuthServer struct{}

func (*AuthServer) AddRole

func (s *AuthServer) AddRole(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) GetRole

func (s *AuthServer) GetRole(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) GetUserRoles

func (s *AuthServer) GetUserRoles(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) ListRoles

func (s *AuthServer) ListRoles(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) Login

func (s *AuthServer) Login(ctx context.Context, req *v10.LoginReq) (res *v10.Result, err error)

func (*AuthServer) LoginV11

func (s *AuthServer) LoginV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)

func (*AuthServer) RefreshToken

func (s *AuthServer) RefreshToken(ctx context.Context, req *v10.UserInfoToken) (res *v10.Result, err error)

func (*AuthServer) RefreshTokenV11

func (s *AuthServer) RefreshTokenV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)

func (*AuthServer) RefreshUserInfo

func (s *AuthServer) RefreshUserInfo(ctx context.Context, req *v10.UserInfoToken) (res *v10.Result, err error)

func (*AuthServer) Register

func (s *AuthServer) Register(ctx context.Context, req *v10.LoginReq) (res *v10.Result, err error)

func (*AuthServer) RegisterV11

func (s *AuthServer) RegisterV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)

func (*AuthServer) RemoveRole

func (s *AuthServer) RemoveRole(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) SetUserRoles

func (s *AuthServer) SetUserRoles(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) UpdateRole

func (s *AuthServer) UpdateRole(ctx context.Context, req *v10.RoleAllReq) (res *v10.RoleAllReply, err error)

func (*AuthServer) UpdateUserInfo

func (s *AuthServer) UpdateUserInfo(ctx context.Context, req *v10.UserInfoToken) (res *v10.Result, err error)

func (*AuthServer) ValidateToken

func (s *AuthServer) ValidateToken(ctx context.Context, req *v10.UserInfoToken) (res *v10.Result, err error)

func (*AuthServer) ValidateTokenString

func (s *AuthServer) ValidateTokenString(ctx context.Context, tokenT *v10.Token) (res *v10.Result, err error)

type AuthServerV11

type AuthServerV11 struct {
	UserServerV11
	AuthServer
	FriendServer
	UserContactServer
}

func NewAuthServerV11

func NewAuthServerV11() *AuthServerV11

type CmdInfo

type CmdInfo struct {
	DoFor func(*Request) error
}

type FriendServer

type FriendServer struct{}

func (*FriendServer) AddFriend

func (friser *FriendServer) AddFriend(ctx context.Context, relation *v10.Relation) (*v10.Result, error)

func (*FriendServer) DeleteFriend

func (friser *FriendServer) DeleteFriend(ctx context.Context, relation *v10.Relation) (*v10.Result, error)

func (*FriendServer) GetFriendList

func (friser *FriendServer) GetFriendList(ctx context.Context, uids *v10.UserId) (*v10.Result, error)

func (*FriendServer) UpdateFriend

func (friser *FriendServer) UpdateFriend(ctx context.Context, relation *v10.Relation) (*v10.Result, error)

type ImBase

type ImBase struct{}

type ImMemberService

type ImMemberService struct {
}

func (*ImMemberService) AddMember

func (s *ImMemberService) AddMember(ctx context.Context, req *v10.AddMemberReq) (res *v10.AddMemberReply, err error)

func (*ImMemberService) InviteMember

func (s *ImMemberService) InviteMember(ctx context.Context, req *v10.InviteMemberReq) (res *v10.InviteMemberReply, err error)

func (*ImMemberService) ListMembers

func (s *ImMemberService) ListMembers(ctx context.Context, req *v10.ListMembersReq) (res *v10.ListMembersReply, err error)

func (*ImMemberService) RemoveMember

func (s *ImMemberService) RemoveMember(ctx context.Context, req *v10.RemoveMemberReq) (res *v10.RemoveMemberReply, err error)

func (*ImMemberService) UpdateMember

func (s *ImMemberService) UpdateMember(ctx context.Context, req *v10.UpdateMemberReq) (res *v10.UpdateMemberReply, err error)

type ImMsgService

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

func NewImMsgService

func NewImMsgService() *ImMsgService

func (*ImMsgService) AckMsg

func (s *ImMsgService) AckMsg(ctx context.Context, req *v10.AckMsgReqV12) (res *v10.AckMsgReplyV12, err error)

func (*ImMsgService) GetMsg

func (s *ImMsgService) GetMsg(ctx context.Context, req *v10.GetMsgReqV12) (res *v10.GetMsgReplyV12, err error)

get the newest msg list in a topic, the page size is default 10

func (*ImMsgService) SendMsg

func (s *ImMsgService) SendMsg(ctx context.Context, req *v10.SendMsgReqV12) (res *v10.SendMsgReplyV12, err error)

func (*ImMsgService) UpdateMsg

func (s *ImMsgService) UpdateMsg(ctx context.Context, req *v10.UpdateMsgReqV12) (res *v10.UpdateMsgReplyV12, err error)

type ImOrgService

type ImOrgService struct {
	ImBase // for createBot
	ImMemberService
	// contains filtered or unexported fields
}

func NewImOrgService

func NewImOrgService() *ImOrgService

func (*ImOrgService) Add

func (s *ImOrgService) Add(ctx context.Context, req *v10.AddOrgReq) (res *v10.AddOrgReply, err error)

func (*ImOrgService) Get

func (s *ImOrgService) Get(ctx context.Context, req *v10.GetOrgReq) (res *v10.GetOrgReply, err error)

func (*ImOrgService) List

func (s *ImOrgService) List(ctx context.Context, req *v10.ListOrgsReq) (res *v10.ListOrgsReply, err error)

func (*ImOrgService) Remove

func (s *ImOrgService) Remove(ctx context.Context, req *v10.RemoveOrgReq) (res *v10.RemoveOrgReply, err error)

func (*ImOrgService) Update

func (s *ImOrgService) Update(ctx context.Context, req *v10.UpdateOrgReq) (res *v10.UpdateOrgReply, err error)

type ImTopicService

type ImTopicService struct {
	ImBase // for createBot
	ImMemberService
	// contains filtered or unexported fields
}

func NewImTopicService

func NewImTopicService() *ImTopicService

func (*ImTopicService) Add

func (s *ImTopicService) Add(ctx context.Context, req *v10.AddTopicReq) (res *v10.AddTopicReply, err error)

func (*ImTopicService) Get

func (s *ImTopicService) Get(ctx context.Context, req *v10.GetTopicReq) (res *v10.GetTopicReply, err error)

func (*ImTopicService) GetTopicUnreads

func (s *ImTopicService) GetTopicUnreads(ctx context.Context, req *v10.GetTopicUnreadsReq) (res *v10.GetTopicUnreadsReply, err error)

func (*ImTopicService) List

func (s *ImTopicService) List(ctx context.Context, req *v10.ListTopicsReq) (res *v10.ListTopicsReply, err error)

func (*ImTopicService) Remove

func (s *ImTopicService) Remove(ctx context.Context, req *v10.RemoveTopicReq) (res *v10.RemoveTopicReply, err error)

func (*ImTopicService) Update

func (s *ImTopicService) Update(ctx context.Context, req *v10.UpdateTopicReq) (res *v10.UpdateTopicReply, err error)

type Pooled

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

func (*Pooled) Init

func (s *Pooled) Init()

func (*Pooled) PooledInvoke

func (s *Pooled) PooledInvoke(op v10.Op, model interface{}, res proto.Message, cb func(error, *Request)) (err error)

type Request

type Request struct {
	// op    v10.Op
	CmdInfo  *CmdInfo
	Model    interface{}
	Res      proto.Message
	Callback func(error, *Request)
}

type TokenBody

type TokenBody struct {
	Expire int64
	Uid    string
}

type UserContactServer

type UserContactServer struct{}

func (*UserContactServer) AddContact

func (s *UserContactServer) AddContact(ctx context.Context, req *v10.AddContactReq) (res *v10.Result, err error)

func (*UserContactServer) GetContact

func (s *UserContactServer) GetContact(ctx context.Context, req *v10.GetContactReq) (res *v10.Result, err error)

func (*UserContactServer) ListContacts

func (s *UserContactServer) ListContacts(ctx context.Context, req *v10.ListContactsReq) (res *v10.Result, err error)

func (*UserContactServer) RemoveContact

func (s *UserContactServer) RemoveContact(ctx context.Context, req *v10.RemoveContactReq) (res *v10.Result, err error)

func (*UserContactServer) UpdateContact

func (s *UserContactServer) UpdateContact(ctx context.Context, req *v10.UpdateContactReq) (res *v10.Result, err error)

type UserServerV11

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

func (*UserServerV11) AddUser

func (s *UserServerV11) AddUser(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)

func (*UserServerV11) GetUser

func (s *UserServerV11) GetUser(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)

func (*UserServerV11) ListUsers

func (s *UserServerV11) ListUsers(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)

func (*UserServerV11) RemoveUser

func (s *UserServerV11) RemoveUser(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)

func (*UserServerV11) UpdateUser

func (s *UserServerV11) UpdateUser(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)

Jump to

Keyboard shortcuts

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