func NewWebhookHandler(optlyCache optimizely.Cache, projectMap map[int64]config.WebhookProject) *OptlyWebhookHandler {
	return &OptlyWebhookHandler{
		optlyCache: optlyCache,
		ProjectMap: projectMap,
	}
}
NewWebhookHandler returns a new instance of OptlyWebhookHandler
package handlers
import (
	"crypto/hmac"
	"crypto/sha1"
	"crypto/subtle"
	"encoding/hex"
	"encoding/json"
	"github.com/optimizely/agent/config"
	"io/ioutil"
	"net/http"
	"strconv"
	"github.com/go-chi/render"
	"github.com/rs/zerolog/log"
	"github.com/optimizely/agent/pkg/optimizely"
)
const signatureHeader = "X-Hub-Signature"
const signaturePrefix = "sha1="
type DatafileUpdateData struct {
	Revision    int32  `json:"revision"`
	OriginURL   string `json:"origin_url"`
	CDNUrl      string `json:"cdn_url"`
	Environment string `json:"environment"`
}
type OptlyMessage struct {
	ProjectID int64              `json:"project_id"`
	Timestamp int64              `json:"timestamp"`
	Event     string             `json:"event"`
	Data      DatafileUpdateData `json:"data"`
}
type OptlyWebhookHandler struct {
	optlyCache optimizely.Cache
	ProjectMap map[int64]config.WebhookProject
}