─── UserInbound CRUD ─────────────────────────────────────────────────────────
(acc UserInbound)
| 171 | // ─── UserInbound CRUD ───────────────────────────────────────────────────────── |
| 172 | |
| 173 | func (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 | |
| 183 | func (s *MemoryStore) GetUserInbound(id string) (UserInbound, error) { |
| 184 | s.mu.RLock() |
no outgoing calls