MCPcopy Index your code
hub / github.com/tinode/chat / TopicsForUser

Method TopicsForUser

server/db/adapter.go:111–111  ·  view source on GitHub ↗

TopicsForUser loads subscriptions for a given user. Reads public value. When the 'opts.IfModifiedSince' query is not nil the subscriptions with UpdatedAt > opts.IfModifiedSince are returned, where UpdatedAt can be either a subscription, a topic, or a user update timestamp. This is need in order to s

(uid t.Uid, keepDeleted bool, opts *t.QueryOpt)

Source from the content-addressed store, hash-verified

109 // 2. Client asks for N updated subscriptions since X. The server returns N with updates between X and Y.
110 // 3. Client goes to step 1 with X := Y.
111 TopicsForUser(uid t.Uid, keepDeleted bool, opts *t.QueryOpt) ([]t.Subscription, error)
112 // UsersForTopic loads users' subscriptions for a given topic. Public is loaded.
113 UsersForTopic(topic string, keepDeleted bool, opts *t.QueryOpt) ([]t.Subscription, error)
114 // OwnTopics loads a slice of topic names where the user is the owner.

Callers 6

GetTopicsMethod · 0.65
GetTopicsAnyMethod · 0.65
TestTopicsForUserFunction · 0.65
TestTopicsForUserFunction · 0.65
TestTopicsForUserFunction · 0.65
TestTopicsForUserFunction · 0.65

Implementers 4

adapterserver/db/mongodb/adapter.go
adapterserver/db/postgres/adapter.go
adapterserver/db/rethinkdb/adapter.go
adapterserver/db/mysql/adapter.go

Calls

no outgoing calls

Tested by 4

TestTopicsForUserFunction · 0.52
TestTopicsForUserFunction · 0.52
TestTopicsForUserFunction · 0.52
TestTopicsForUserFunction · 0.52