amplitude / analytics-go

Go Amplitude Analytics SDK
MIT License
12 stars 7 forks source link

feat: AMP-56378-timeline #6

Closed Mercy811 closed 2 years ago

Mercy811 commented 2 years ago

Summary

Checklist

Mercy811 commented 2 years ago

Applied https://github.com/amplitude/Amplitude-Go/commit/1ef72e780994144384aa3434f26cbaf681b81927. And for my understanding what it does:

  1. Created EnrichmentPlugin and DestinationPlugin interfaces instead of struct
  2. EnrichmentPlugin inlcudes BEFORE and ENRICHMENT plugins, and use MiddlewarePriority to distinguish them
  3. In timeline, separate Plugins into middlewarePlugins and destinationPlugins

Changes in https://github.com/amplitude/Amplitude-Go/pull/6/commits/28364c5b50e1c6c74b9fbec6dad93ae5a22a02d8 for API consistency: