MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / UpsertUserInbound

Method UpsertUserInbound

internal/users/memory.go:173–181  ·  view source on GitHub ↗

─── UserInbound CRUD ─────────────────────────────────────────────────────────

(acc UserInbound)

Source from the content-addressed store, hash-verified

171// ─── UserInbound CRUD ─────────────────────────────────────────────────────────
172
173func (s *MemoryStore) UpsertUserInbound(acc UserInbound) (UserInbound, error) {
174 s.mu.Lock()
175 defer s.mu.Unlock()
176 if acc.CreatedAt.IsZero() {
177 acc.CreatedAt = time.Now().UTC()
178 }
179 s.inbounds[acc.ID] = acc
180 return acc, nil
181}
182
183func (s *MemoryStore) GetUserInbound(id string) (UserInbound, error) {
184 s.mu.RLock()

Calls

no outgoing calls