Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pior/mixpanelproxy
Mixpanel Proxy library in Go
https://github.com/pior/mixpanelproxy
Last synced: 2 days ago
JSON representation
Mixpanel Proxy library in Go
- Host: GitHub
- URL: https://github.com/pior/mixpanelproxy
- Owner: pior
- Created: 2015-02-14T22:45:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-22T22:49:34.000Z (almost 10 years ago)
- Last Synced: 2024-12-04T18:42:39.324Z (about 2 months ago)
- Language: Go
- Size: 164 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MixpanelProxy
Mixpanel Proxy library in Go (as a http.Handler)
## Features
- Extract the Token and the DistinctId
- Support Events and People endpoints
- Passthrough for other endpoints
- Custom Director to implement the proxy logic
- Fully functional dummy (successful) response## TODO
- Test coverage
## Usage
```go
package mainimport (
"github.com/cenkalti/log"
"github.com/pior/mixpanelproxy"
"net/http"
)func main() {
director := func(m *mixpanelproxy.MixpanelRequest) (err error) {
log.Infof("Received: %s", m)
return nil
}url := "http://api.mixpanel.com"
http.Handle("/", mixpanelproxy.NewProxy(&url, director))
log.Fatal(http.ListenAndServe(":8080", nil))
}```
## Logging
MixpanelProxy use [github.com/cenkalti/log](https://github.com/cenkalti/log) for logging