service

package
v0.0.0-...-e7f8777 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group interface {
	Create(app string, req *rpcc.CreateGroupReq) (*rpcc.CreateGroupResp, error)
	Members(app string, req *rpcc.GroupMembersReq) (*rpcc.GroupMembersResp, error)
	Join(app string, req *rpcc.JoinGroupReq) error
	Quit(app string, req *rpcc.QuitGroupReq) error
	Detail(app string, req *rpcc.GetGroupReq) (*rpcc.GetGroupResp, error)
}

func NewGroupService

func NewGroupService(url string, lg *zap.Logger) Group

func NewGroupServiceWithSRV

func NewGroupServiceWithSRV(scheme string, srv *resty.SRVRecord, lg *zap.Logger) Group

type GroupHttp

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

func (*GroupHttp) Create

func (g *GroupHttp) Create(app string, req *rpcc.CreateGroupReq) (*rpcc.CreateGroupResp, error)

Create implements Group

func (*GroupHttp) Detail

func (g *GroupHttp) Detail(app string, req *rpcc.GetGroupReq) (*rpcc.GetGroupResp, error)

Detail implements Group

func (*GroupHttp) Join

func (g *GroupHttp) Join(app string, req *rpcc.JoinGroupReq) error

Join implements Group

func (*GroupHttp) Members

func (g *GroupHttp) Members(app string, req *rpcc.GroupMembersReq) (*rpcc.GroupMembersResp, error)

Members implements Group

func (*GroupHttp) Quit

func (g *GroupHttp) Quit(app string, req *rpcc.QuitGroupReq) error

Quit implements Group

func (*GroupHttp) Req

func (g *GroupHttp) Req() *resty.Request

type Message

type Message interface {
	InsertUser(app string, req *rpcc.InsertMessageReq) (*rpcc.InsertMessageResp, error)
	InsertGroup(app string, req *rpcc.InsertMessageReq) (*rpcc.InsertMessageResp, error)
	SetAck(app string, req *rpcc.AckMessageReq) error
	GetMessageIndex(app string, req *rpcc.GetOfflineMessageIndexReq) (*rpcc.GetOfflineMessageIndexResp, error)
	GetMessageContent(app string, req *rpcc.GetOfflineMessageContentReq) (*rpcc.GetOfflineMessageContentResp, error)
}

func NewMessageService

func NewMessageService(url string, lg *zap.Logger) Message

func NewMessageServiceWithSRV

func NewMessageServiceWithSRV(scheme string, srv *resty.SRVRecord, lg *zap.Logger) Message

type MessageHttp

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

func (*MessageHttp) GetMessageContent

GetMessageContent implements Message

func (*MessageHttp) GetMessageIndex

GetMessageIndex implements Message

func (*MessageHttp) InsertGroup

func (m *MessageHttp) InsertGroup(app string, req *rpcc.InsertMessageReq) (*rpcc.InsertMessageResp, error)

InsertGroup implements Message

func (*MessageHttp) InsertUser

func (m *MessageHttp) InsertUser(app string, req *rpcc.InsertMessageReq) (*rpcc.InsertMessageResp, error)

InsertUser implements Message

func (MessageHttp) Req

func (m MessageHttp) Req() *resty.Request

func (*MessageHttp) SetAck

func (m *MessageHttp) SetAck(app string, req *rpcc.AckMessageReq) error

SetAck implements Message

Jump to

Keyboard shortcuts

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