MCPcopy
hub / github.com/tinode/chat / parseTopicAccess

Function parseTopicAccess

server/utils.go:269–282  ·  view source on GitHub ↗

Parse topic access parameters

(acs *MsgDefaultAcsMode, defAuth, defAnon types.AccessMode)

Source from the content-addressed store, hash-verified

267
268// Parse topic access parameters
269func parseTopicAccess(acs *MsgDefaultAcsMode, defAuth, defAnon types.AccessMode) (authMode, anonMode types.AccessMode,
270 err error) {
271
272 authMode, anonMode = defAuth, defAnon
273
274 if acs.Auth != "" {
275 err = authMode.UnmarshalText([]byte(acs.Auth))
276 }
277 if acs.Anon != "" {
278 err = anonMode.UnmarshalText([]byte(acs.Anon))
279 }
280
281 return
282}
283
284// Parse one component of a semantic version string.
285func parseVersionPart(vers string) int {

Callers 2

initTopicNewGrpFunction · 0.85
replySetDescMethod · 0.85

Calls 1

UnmarshalTextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…