You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: event_bridge_scheduler.go
    path of file: ./repos/dotenx/ao-api/services/triggersService
    
    the code of the file until where you have to start completion: package triggerService

import (
	"encoding/json"
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/credentials"
	"github.com/aws/aws-sdk-go/aws/session"
	awsScheduler "github.com/aws/aws-sdk-go/service/scheduler"
	"github.com/dotenx/dotenx/ao-api/config"
	"github.com/dotenx/dotenx/ao-api/models"
	"github.com/dotenx/dotenx/ao-api/pkg/utils"
	"github.com/sirupsen/logrus"
)

func (manager *TriggerManager) CreateEventBridgeScheduler(trigger models.EventTrigger) (err error) {
	// Create a new AWS session
	awsRegion := config.Configs.Secrets.AwsRegion
	accessKeyId := config.Configs.Secrets.AwsAccessKeyId
	secretAccessKey := config.Configs.Secrets.AwsSecretAccessKey
	sess := session.Must(session.NewSessionWithOptions(session.Options{
		Config: aws.Config{
			Region:      &awsRegion,
			Credentials: credentials.NewStaticCredentials(accessKeyId, secretAccessKey, string("")),
		},
	}))

	payloadMap := map[string]interface{}{
		"pipeline_endpoint": trigger.Endpoint,
		"account_id":        trigger.AccountId,
		"auth_token":        config.Configs.Secrets.EventSchedulerToken,
	}
	payloadBytes, _ := json.Marshal(payloadMap)
	payloadStr := string(payloadBytes)
	// Create a new EventBridge client
	client := awsScheduler.New(se
    
func (manager *TriggerManager) CreateEventBridgeScheduler(trigger models.EventTrigger) (err error) {
	// Create a new AWS session
	awsRegion := config.Configs.Secrets.AwsRegion
	accessKeyId := config.Configs.Secrets.AwsAccessKeyId
	secretAccessKey := config.Configs.Secrets.AwsSecretAccessKey
	sess := session.Must(session.NewSessionWithOptions(session.Options{
		Config: aws.Config{
			Region:      &awsRegion,
			Credentials: credentials.NewStaticCredentials(accessKeyId, secretAccessKey, string("")),
		},
	}))

	payloadMap := map[string]interface{}{
		"pipeline_endpoint": trigger.Endpoint,
		"account_id":        trigger.AccountId,
		"auth_token":        config.Configs.Secrets.EventSchedulerToken,
	}
	payloadBytes, _ := json.Marshal(payloadMap)
	payloadStr := string(payloadBytes)
	// Create a new EventBridge client
	client := awsScheduler.New(sess)
	schedulerName := fmt.Sprintf("dtx_%s_%s", trigger.Endpoint, trigger.Name)

	_, err = client.CreateSchedule(&awsScheduler.CreateScheduleInput{
		Name:               aws.String(schedulerName),
		State:              aws.String(awsScheduler.ScheduleStateDisabled),
		ScheduleExpression: aws.String(trigger.Credentials["frequency"].(string)),
		FlexibleTimeWindow: &awsScheduler.FlexibleTimeWindow{
			Mode: aws.String(awsScheduler.FlexibleTimeWindowModeOff),
		},
		Target: &awsScheduler.Target{
			Arn:     aws.String(config.Configs.Secrets.ScheduledTriggersTargetArn),
			RoleArn: aws.String(config.Configs.Secrets.EventSchedulerRoleArn),
			Input:   aws.String(payloadStr),
		},
	})
	return
}