func NewJWTProvider(jwt string) *PureJWT {
	return &PureJWT{
		jwt: jwt,
	}
}
NewJWTProvider create a pureJWT method
package notifier
import (
	"context"
	"encoding/json"
	"fmt"
	"time"
	"github.com/Azure/azure-amqp-common-go/v3/auth"
	eventhub "github.com/Azure/azure-event-hubs-go/v3"
	"github.com/fluxcd/pkg/runtime/events"
)
type AzureEventHub struct {
	Hub *eventhub.Hub
}
func NewAzureEventHub(endpointURL, token, eventHubNamespace string) (*AzureEventHub, error) {
	var hub *eventhub.Hub
	var err error
	if token != "" {
		hub, err = newJWTHub(endpointURL, token, eventHubNamespace)
		if err != nil {
			return nil, fmt.Errorf("failed to create a eventhub using JWT %v", err)
		}
	} else {
		hub, err = newSASHub(endpointURL)
		if err != nil {
			return nil, fmt.Errorf("failed to create a eventhub using SAS %v", err)
		}
	}
	return &AzureEventHub{
		Hub: hub,
	}, nil
}
func (e *AzureEventHub) Post(event events.Event) error {
	if isCommitStatus(event.Metadata, "update") {
		return nil
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()
	eventBytes, err := json.Marshal(event)
	if err != nil {
		return fmt.Errorf("Unable to marshall event: %w", err)
	}
	err = e.Hub.Send(ctx, eventhub.NewEvent(eventBytes))
	if err != nil {
		return fmt.Errorf("Failed to send msg: %w", err)
	}
	err = e.Hub.Close(ctx)
	if err != nil {
		return fmt.Errorf("Unable to close connection: %w", err)
	}
	return nil
}
type PureJWT struct {
	jwt string
}