MCPcopy Index your code
hub / github.com/dearcode/candy / getOnlineSession

Method getOnlineSession

gate/server.go:137–149  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

135}
136
137func (g *Gate) getOnlineSession(ctx context.Context) (*session, error) {
138 log.Debug("Gate getOnlineSession")
139 s, err := g.getSession(ctx)
140 if err != nil {
141 return nil, errors.Trace(err)
142 }
143
144 if !s.isOnline() {
145 return nil, ErrInvalidState
146 }
147
148 return s, nil
149}
150
151// Register user, passwd.
152func (g *Gate) Register(ctx context.Context, req *meta.GateRegisterRequest) (*meta.GateRegisterResponse, error) {

Callers 10

GetUserInfoMethod · 0.95
FriendMethod · 0.95
LoadFriendListMethod · 0.95
FindUserMethod · 0.95
CreateGroupMethod · 0.95
LoadGroupListMethod · 0.95
UploadFileMethod · 0.95
CheckFileMethod · 0.95
DownloadFileMethod · 0.95
LoadMessageMethod · 0.95

Calls 2

getSessionMethod · 0.95
isOnlineMethod · 0.80

Tested by

no test coverage detected