2019-05-20 04:12:40 +00:00
|
|
|
package client
|
|
|
|
|
2019-05-24 02:58:46 +00:00
|
|
|
import (
|
|
|
|
"github.com/sqshq/sampler/metadata"
|
|
|
|
"net/http"
|
|
|
|
)
|
2019-05-20 04:12:40 +00:00
|
|
|
|
2019-05-24 02:58:46 +00:00
|
|
|
const (
|
|
|
|
backendUrl = "http://localhost:8080/api/v1"
|
|
|
|
registrationPath = "/registration"
|
|
|
|
reportInstallationPath = "/report/installation"
|
|
|
|
reportCrashPath = "repost/crash"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BackendClient struct {
|
|
|
|
client http.Client
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewBackendClient() *BackendClient {
|
|
|
|
return &BackendClient{
|
|
|
|
client: http.Client{},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *BackendClient) ReportInstallation(statistics *metadata.Statistics) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *BackendClient) ReportCrash() {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *BackendClient) Register(key string) {
|
|
|
|
// TODO
|
2019-05-20 04:12:40 +00:00
|
|
|
}
|