AsEnvelope returns the wire shape for serialization.
()
| 177 | |
| 178 | // AsEnvelope returns the wire shape for serialization. |
| 179 | func (e Event) AsEnvelope() Envelope { |
| 180 | return Envelope{ |
| 181 | Type: e.Type, |
| 182 | ID: e.ID, |
| 183 | CreatedAt: e.CreatedAt, |
| 184 | Data: e.Data, |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | func generateEventID() string { |
| 189 | b := make([]byte, 16) |
no outgoing calls