├── .github └── workflows │ └── push_image.yaml ├── .gitignore ├── Dockerfile ├── LICENSE ├── Misc └── initializeJobs.go ├── README.md ├── aws ├── Lambdas │ └── TriggerS3Upload │ │ └── main.go └── conf.go ├── build ├── EC2Worker │ ├── Linux arm64 │ │ └── main │ └── Linux x86_64 │ │ └── main └── TriggerS3Upload │ ├── bootstrap │ ├── bootstrap-2 │ └── deployment.zip ├── cmd ├── ec2Worker │ └── main.go └── getSignedUrl │ └── main.go ├── consts └── consts.go ├── controllers ├── authController │ ├── login.go │ └── signup.go ├── ecsController │ └── runTasks.go ├── jobsController │ └── jobsCount.go └── s3Controller │ └── putImagePreSignedUrl.go ├── db ├── mongoConnect.go └── redisConnect.go ├── de_provision_resources.sh ├── go.mod ├── go.sum ├── helpers ├── checkIfDocExists.go ├── ecsHelper │ └── listRunningTasks.go ├── getSessionID.go ├── getUniqueKey.go └── hashPassword.go ├── middleware └── authMiddleware.go ├── models └── appModels.go ├── provision_resources.sh ├── pulumi ├── setup-ec2 │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── setup-ecr │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── setup-ecs-cluster │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── setup-ecs-task-definition │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── setup-lambda │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── setup-s3-permanent │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go └── setup-s3-temp │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── go.mod │ ├── go.sum │ └── main.go ├── routes ├── authRoutes.go └── s3Routes.go └── transcode.sh /.github/workflows/push_image.yaml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image to AWS ECR 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build-and-push: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v3 15 | 16 | - name: Configure AWS credentials 17 | uses: aws-actions/configure-aws-credentials@v2 18 | with: 19 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 20 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 21 | aws-region: ap-south-1 22 | 23 | - name: Login to Amazon ECR 24 | id: login-ecr 25 | uses: aws-actions/amazon-ecr-login@v2 26 | 27 | - name: Set up Docker Buildx 28 | uses: docker/setup-buildx-action@v3 29 | 30 | - name: Build and push Docker image to ECR 31 | uses: docker/build-push-action@v5 32 | with: 33 | context: . 34 | push: true 35 | tags: 111654129626.dkr.ecr.ap-south-1.amazonaws.com/video-transcoder:latest 36 | platform: linux/amd64 # <-- ADD THIS LINE 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.env 2 | env_vars.sh 3 | bootstrap 4 | *.zip -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | # Set environment variables 4 | ENV AWS_ACCESS_KEY_ID= 5 | ENV AWS_SECRET_ACCESS_KEY= 6 | ENV AWS_DEFAULT_REGION= 7 | ENV SOURCE_IMAGE=default 8 | ENV DESTINATION_1080=default 9 | ENV DESTINATION_720=default 10 | ENV DESTINATION_360=default 11 | 12 | # Update and install necessary packages 13 | RUN apt-get update && apt-get install -y \ 14 | ffmpeg \ 15 | unzip \ 16 | curl 17 | 18 | # Install AWS CLI 19 | RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ 20 | && unzip awscliv2.zip \ 21 | && ./aws/install 22 | 23 | # Copy the transcoding script into the container 24 | COPY transcode.sh /usr/local/bin/transcode_and_upload.sh 25 | 26 | # Make the script executable 27 | RUN chmod +x /usr/local/bin/transcode_and_upload.sh 28 | 29 | # Set the script as the entry point 30 | ENTRYPOINT ["/usr/local/bin/transcode_and_upload.sh"] 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 HARSH VARDHAN SINGH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Misc/initializeJobs.go: -------------------------------------------------------------------------------- 1 | package misc 2 | 3 | import ( 4 | "context" 5 | "log" 6 | "time" 7 | 8 | "github.com/harsh082ip/Video-transcoder_Go/db" 9 | ) 10 | 11 | func InitializeJobs() { 12 | rdb := db.RedisConnect() 13 | ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) 14 | defer cancel() 15 | 16 | key := "Jobs" 17 | 18 | // Set the key to "0" if it does not already exist 19 | set, err := rdb.SetNX(ctx, key, "0", 0).Result() 20 | if err != nil { 21 | log.Fatal("Initializing jobs error", err.Error()) 22 | } 23 | 24 | if set { 25 | log.Println("Key did not exist, JOBS initialized to 0") 26 | } else { 27 | log.Println("JOSB already exists, no action taken") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Video Transcoding Service 2 | 3 | A scalable video transcoding service built using Golang, Gin, AWS, Pulumi, MongoDB, and Redis. This service handles video uploads, transcodes them into multiple formats, and stores them securely on AWS S3. It showcases a robust architecture for high-demand video processing applications. 4 | 5 | ## Table of Contents 6 | 7 | - [Features](#features) 8 | - [Architecture](#architecture) 9 | - [Tech Stack](#tech-stack) 10 | - [Setup](#setup) 11 | - [Usage](#usage) 12 | - [API Endpoints](#api-endpoints) 13 | - [Environment Variables](#environment-variables) 14 | - [Scaling and Performance](#scaling-and-performance) 15 | - [Contributing](#contributing) 16 | - [License](#license) 17 | 18 | ## Features 19 | 20 | - **User Authentication**: Signup and login functionalities with session-based authentication. 21 | - **Secure Video Upload**: Uses AWS S3 pre-signed URLs for secure video uploads. 22 | - **Event-Driven Processing**: AWS Lambda triggers upon video upload to process metadata. 23 | - **Task Queue Management**: Redis is used to manage a queue for video processing tasks. 24 | - **Concurrent Transcoding**: An EC2 worker retrieves tasks from Redis and spins up ECS containers to transcode videos into multiple formats (360p, 720p, 1080p). 25 | - **Scalable Storage**: Transcoded videos are stored in a secure S3 bucket. 26 | - **Highly Scalable**: The architecture supports dynamic scaling and modular management. 27 | 28 | ## Architecture 29 | 30 | ### Project Architecture Diagram 31 | 32 | ![image](https://github.com/user-attachments/assets/8be6429b-025b-42c6-ac37-5d7e202efc7b) 33 | 34 | 35 | 36 | 1. **User Uploads Video**: Users upload videos to an AWS S3 bucket (temporary storage) using a pre-signed URL. 37 | 2. **AWS Lambda Trigger**: A Lambda function triggers upon video upload and pushes metadata to a Redis-based queue. 38 | 3. **Queue Processing**: An EC2 instance running a worker retrieves data from the queue. 39 | 4. **Concurrent Transcoding**: The worker spins up ECS containers to transcode up to 5 videos concurrently into three formats (360p, 720p, 1080p). 40 | 5. **Permanent Storage**: The transcoded videos are stored in a permanent S3 bucket. 41 | 6. **Secure Access**: The service includes authentication and authorization mechanisms to ensure secure access. 42 | 43 | ## Tech Stack 44 | 45 | - **Golang**: Backend development using the Gin framework. 46 | - **AWS S3**: For temporary and permanent storage of video files. 47 | - **AWS Lambda**: For event-driven processing. 48 | - **AWS EC2 and ECS**: For worker instances and container orchestration. 49 | - **Pulumi**: Infrastructure as Code (IaC) for managing cloud resources. 50 | - **Redis**: For managing the task queue. 51 | - **MongoDB**: For metadata storage and management. 52 | 53 | ## Setup 54 | 55 | ### Prerequisites 56 | 57 | - [Golang](https://golang.org/doc/install) 58 | - [Docker](https://docs.docker.com/get-docker/) 59 | - [Pulumi](https://www.pulumi.com/docs/get-started/install/) (for Infrastructure as Code) 60 | - AWS account with access to S3, Lambda, EC2, and ECS 61 | - [MongoDB](https://www.mongodb.com/try/download/community) 62 | 63 | ### Installation 64 | 65 | 1. **Clone the repository:** 66 | ```bash 67 | git clone https://github.com/harsh082ip/Video-transcoder_Go.git 68 | cd Video-transcoder_Go 69 | ``` 70 | 71 | 2. **Set up environment variables:** 72 | Create a `.env` file in the project root directory and add the following: 73 | ```env 74 | AWS_ACCESS_KEY_ID=your_access_key 75 | AWS_SECRET_ACCESS_KEY=your_secret_key 76 | REDIS_URL=redis://localhost:6379 77 | MONGODB_URI=mongodb://localhost:27017 78 | AWS_DEFAULT_REGION=your_region 79 | SOURCE_IMAGE=your_source_image_path 80 | DESTINATION_1080=your_destination_path_for_1080p 81 | DESTINATION_720=your_destination_path_for_720p 82 | DESTINATION_360=your_destination_path_for_360p 83 | ``` 84 | 85 | 3. **Deploy the infrastructure using Pulumi:** 86 | ```bash 87 | pulumi login 88 | pulumi stack init dev 89 | pulumi config set aws:region 90 | pulumi up 91 | ``` 92 | 93 | ## Usage 94 | 95 | 1. **Run the server:** 96 | ```bash 97 | go run cmd/getSignedUrl/main.go 98 | ``` 99 | 100 | 2. **Authenticate Users:** 101 | - **Signup**: `/auth/signup` 102 | - **Login**: `/auth/login` 103 | 104 | 3. **Upload Videos:** 105 | - **Get Pre-Signed URL**: `/videos/getpresignedurl` 106 | _(Pass session ID in the middleware for authorization.)_ 107 | 108 | ## API Endpoints 109 | 110 | - **POST** `/auth/signup`: Registers a new user. 111 | - **POST** `/auth/login`: Logs in an existing user. 112 | - **POST** `/videos/getpresignedurl`: Retrieves a pre-signed URL for uploading a video to S3. 113 | _(Requires a valid session ID in the middleware.)_ 114 | 115 | ## Environment Variables 116 | 117 | The following environment variables must be set for ECS containers: 118 | 119 | - `AWS_ACCESS_KEY_ID`: AWS access key ID. 120 | - `AWS_SECRET_ACCESS_KEY`: AWS secret access key. 121 | - `AWS_DEFAULT_REGION`: AWS region. 122 | - `SOURCE_IMAGE`: Path of the source video image. 123 | - `DESTINATION_1080`: Path to store the transcoded video in 1080p format. 124 | - `DESTINATION_720`: Path to store the transcoded video in 720p format. 125 | - `DESTINATION_360`: Path to store the transcoded video in 360p format. 126 | 127 | ## Scaling and Performance 128 | 129 | - **Horizontal Scaling**: Utilizes ECS and Lambda for horizontal scaling to handle increasing video processing demands. 130 | - **Cost-Efficiency**: Leverages AWS Lambda and on-demand ECS containers to optimize resource usage and reduce costs. 131 | - **Fault Tolerance**: Designed to be fault-tolerant with retry mechanisms and proper error handling. 132 | 133 | ## Contributing 134 | 135 | Contributions are welcome! Please fork the repository and create a pull request with your changes. 136 | 137 | 1. Fork the repository 138 | 2. Create your feature branch: `git checkout -b feature/YourFeature` 139 | 3. Commit your changes: `git commit -m 'Add some feature'` 140 | 4. Push to the branch: `git push origin feature/YourFeature` 141 | 5. Open a pull request 142 | 143 | ## License 144 | 145 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 146 | -------------------------------------------------------------------------------- /aws/Lambdas/TriggerS3Upload/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | "time" 9 | 10 | "github.com/aws/aws-lambda-go/events" 11 | "github.com/aws/aws-lambda-go/lambda" 12 | jobscontroller "github.com/harsh082ip/Video-transcoder_Go/controllers/jobsController" 13 | "github.com/harsh082ip/Video-transcoder_Go/db" 14 | "github.com/harsh082ip/Video-transcoder_Go/models" 15 | ) 16 | 17 | func handleRequest(ctx context.Context, s3Event events.S3Event) { 18 | 19 | rdb := db.RedisConnect() 20 | var videojobs models.VideosJobs 21 | redis_key := "VideoJobs" 22 | ctx1, cancel := context.WithTimeout(context.Background(), 30*time.Second) 23 | defer cancel() 24 | log.Println("Lambda Started") 25 | 26 | for _, record := range s3Event.Records { 27 | s3 := record.S3 28 | bucket := s3.Bucket.Name 29 | key := s3.Object.Key 30 | 31 | // Generate the S3 object URL 32 | // escapedKey := url.PathEscape(key) 33 | objectURL := fmt.Sprintf("https://s3.ap-south-1.amazonaws.com/%s/%s", bucket, key) 34 | 35 | videojobs.Key = key 36 | videojobs.ObjectUrl = objectURL 37 | 38 | jsonData, err := json.Marshal(videojobs) 39 | if err != nil { 40 | log.Fatal("Error in Marshalling the videojobs body", err.Error()) 41 | } 42 | 43 | err = rdb.LPush(ctx1, redis_key, jsonData).Err() 44 | if err != nil { 45 | log.Fatal("Error in pushing VideoJobs to queue") 46 | } 47 | 48 | // Increase job count 49 | err = jobscontroller.IncreaseJobsCount(ctx1) 50 | if err != nil { 51 | log.Fatal(err.Error()) 52 | } 53 | 54 | log.Println("Jobs pushed to queue, \nurl := ", videojobs.ObjectUrl) 55 | } 56 | } 57 | 58 | func main() { 59 | lambda.Start(handleRequest) 60 | } 61 | -------------------------------------------------------------------------------- /aws/conf.go: -------------------------------------------------------------------------------- 1 | package aws_conf 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aws/aws-sdk-go-v2/aws" 9 | "github.com/aws/aws-sdk-go-v2/config" 10 | "github.com/aws/aws-sdk-go-v2/credentials" 11 | "github.com/aws/aws-sdk-go-v2/service/ecs" 12 | "github.com/aws/aws-sdk-go-v2/service/s3" 13 | ) 14 | 15 | // GetAwsConf loads the AWS configuration 16 | // It returns an aws.Config object and an error if any occurred 17 | 18 | func GetAwsConf() (aws.Config, error) { 19 | // Hardcoded credentials (not recommended for prod) 20 | accessKey := os.Getenv("AWS_ACCESS_KEY") 21 | secretKey := os.Getenv("AWS_SECRET_KEY") 22 | 23 | // Load the AWS configuration with custom credentials and region 24 | cfg, err := config.LoadDefaultConfig(context.TODO(), 25 | config.WithRegion("ap-south-1"), 26 | config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(accessKey, secretKey, "")), 27 | ) 28 | 29 | if err != nil { 30 | return aws.Config{}, fmt.Errorf("unable to load SDK config: %v", err) 31 | } 32 | 33 | return cfg, nil 34 | } 35 | 36 | // GetS3Client creates an S3 client using the loaded AWS configuration 37 | // It returns a pointer to an s3.Client object and an error if any occurred 38 | func GetS3Client() (*s3.Client, error) { 39 | // Get the AWS configuration 40 | cfg, err := GetAwsConf() 41 | if err != nil { 42 | // Return an empty S3 client and a formatted error message 43 | return nil, fmt.Errorf("error in getting S3 client: %v", err.Error()) 44 | } 45 | // Create an S3 client from the configuration 46 | s3Client := s3.NewFromConfig(cfg) 47 | // Return the S3 client and no error 48 | return s3Client, nil 49 | } 50 | 51 | // ecs client 52 | func GetECSClient() (*ecs.Client, error) { 53 | // Get the AWS configuration 54 | cfg, err := GetAwsConf() 55 | if err != nil { 56 | // Return an empty ecs client and a formatted error message 57 | return nil, fmt.Errorf("error in getting ecs client: %v", err.Error()) 58 | } 59 | // Create an ecs client from the configuration 60 | ecsClient := ecs.NewFromConfig(cfg) 61 | // Return the ecs client and no error 62 | return ecsClient, nil 63 | } 64 | -------------------------------------------------------------------------------- /build/EC2Worker/Linux arm64/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harsh082ip/Video-transcoder_Go/c5c575ff701fb397f5a506adc3e13569bfcc0b0d/build/EC2Worker/Linux arm64/main -------------------------------------------------------------------------------- /build/EC2Worker/Linux x86_64/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harsh082ip/Video-transcoder_Go/c5c575ff701fb397f5a506adc3e13569bfcc0b0d/build/EC2Worker/Linux x86_64/main -------------------------------------------------------------------------------- /build/TriggerS3Upload/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harsh082ip/Video-transcoder_Go/c5c575ff701fb397f5a506adc3e13569bfcc0b0d/build/TriggerS3Upload/bootstrap -------------------------------------------------------------------------------- /build/TriggerS3Upload/bootstrap-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harsh082ip/Video-transcoder_Go/c5c575ff701fb397f5a506adc3e13569bfcc0b0d/build/TriggerS3Upload/bootstrap-2 -------------------------------------------------------------------------------- /build/TriggerS3Upload/deployment.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harsh082ip/Video-transcoder_Go/c5c575ff701fb397f5a506adc3e13569bfcc0b0d/build/TriggerS3Upload/deployment.zip -------------------------------------------------------------------------------- /cmd/ec2Worker/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "log" 7 | "os" 8 | "time" 9 | 10 | ecscontroller "github.com/harsh082ip/Video-transcoder_Go/controllers/ecsController" 11 | jobscontroller "github.com/harsh082ip/Video-transcoder_Go/controllers/jobsController" 12 | "github.com/harsh082ip/Video-transcoder_Go/db" 13 | ecshelper "github.com/harsh082ip/Video-transcoder_Go/helpers/ecsHelper" 14 | "github.com/harsh082ip/Video-transcoder_Go/models" 15 | "github.com/redis/go-redis/v9" 16 | ) 17 | 18 | func main() { 19 | 20 | // ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) 21 | // defer cancel() 22 | var videojobs models.VideosJobs 23 | rdb := db.RedisConnect() 24 | AWS_ACCESS_KEY_ID := os.Getenv("AWS_ACCESS_KEY_ID") 25 | AWS_SECRET_ACCESS_KEY := os.Getenv("AWS_SECRET_ACCESS_KEY") 26 | DESTINATION_BUCKET_NAME := os.Getenv("DESTINATION_BUCKET_NAME") 27 | 28 | if AWS_ACCESS_KEY_ID == "" || AWS_SECRET_ACCESS_KEY == "" || DESTINATION_BUCKET_NAME == "" { 29 | log.Fatal("Some required env are needed to proceed", AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, DESTINATION_BUCKET_NAME) 30 | } 31 | 32 | // START PROCESS 33 | for { 34 | 35 | res, err := rdb.RPop(context.TODO(), "VideoJobs").Result() 36 | if err == redis.Nil { 37 | // No jobs found, check again 38 | log.Println("Checking Jobs again") 39 | time.Sleep(time.Second * 2) 40 | continue 41 | } 42 | if err != nil { 43 | log.Fatal("error in poping the jobs from the queue, ", err.Error()) 44 | } 45 | err = json.Unmarshal([]byte(res), &videojobs) 46 | if err != nil { 47 | log.Fatal("error in unmarshalling jobs body", err.Error()) 48 | } 49 | for { 50 | runningTasks, err := ecshelper.ListRunningTask() 51 | if err != nil { 52 | log.Fatal("error in listing running tasks, ", err.Error()) 53 | } 54 | if runningTasks >= 5 { 55 | time.Sleep(time.Second * 2) 56 | log.Println("Checking tasks again") 57 | continue 58 | } 59 | DESTINATION_1080 := "s3://" + DESTINATION_BUCKET_NAME + "/" + videojobs.Key + "1080.mp4" 60 | DESTINATION_720 := "s3://" + DESTINATION_BUCKET_NAME + "/" + videojobs.Key + "720.mp4" 61 | DESTINATION_360 := "s3://" + DESTINATION_BUCKET_NAME + "/" + videojobs.Key + "360.mp4" 62 | log.Println(DESTINATION_1080) 63 | log.Println(DESTINATION_720) 64 | log.Println(DESTINATION_360) 65 | 66 | resp, err := ecscontroller.RunECSTask(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, videojobs.ObjectUrl, DESTINATION_1080, DESTINATION_720, DESTINATION_360) 67 | if err != nil || !resp { 68 | log.Fatal("error in running tasks, ", err.Error()) 69 | } 70 | 71 | err = jobscontroller.DecreaseJobsCount(context.TODO()) 72 | if err != nil { 73 | log.Fatal("Error in Decreasing Job Count") 74 | } 75 | break 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /cmd/getSignedUrl/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | 7 | "github.com/gin-gonic/gin" 8 | misc "github.com/harsh082ip/Video-transcoder_Go/Misc" 9 | "github.com/harsh082ip/Video-transcoder_Go/consts" 10 | "github.com/harsh082ip/Video-transcoder_Go/routes" 11 | ) 12 | 13 | func main() { 14 | 15 | router := gin.Default() 16 | 17 | routes.AuthRoutes(router) 18 | routes.S3Routes(router) 19 | 20 | // Initialize Jobs 21 | go misc.InitializeJobs() 22 | 23 | if err := http.ListenAndServe(consts.WEBPORT, router); err != nil { 24 | log.Fatal("Error starting the server on", consts.WEBPORT, err.Error()) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /consts/consts.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | import "time" 4 | 5 | const ( 6 | WEBPORT = ":8006" 7 | LetterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 8 | SessionTTL = 600 * time.Second 9 | SessionIDlength = 16 10 | ) 11 | -------------------------------------------------------------------------------- /controllers/authController/login.go: -------------------------------------------------------------------------------- 1 | package authcontroller 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "log" 7 | "net/http" 8 | "time" 9 | 10 | "github.com/gin-gonic/gin" 11 | "github.com/harsh082ip/Video-transcoder_Go/consts" 12 | "github.com/harsh082ip/Video-transcoder_Go/db" 13 | "github.com/harsh082ip/Video-transcoder_Go/helpers" 14 | "github.com/harsh082ip/Video-transcoder_Go/models" 15 | 16 | // "github.com/harsh082ip/URL-Shortener_Go/consts" 17 | // "github.com/harsh082ip/URL-Shortener_Go/db" 18 | // "github.com/harsh082ip/URL-Shortener_Go/helpers" 19 | // "github.com/harsh082ip/URL-Shortener_Go/models" 20 | "go.mongodb.org/mongo-driver/bson" 21 | "go.mongodb.org/mongo-driver/mongo" 22 | "go.mongodb.org/mongo-driver/mongo/options" 23 | ) 24 | 25 | func Login(c *gin.Context) { 26 | 27 | var jsonData models.LoginUser 28 | // var apikey models.ApiKey 29 | // Bind and validate JSON 30 | var sessionInfo models.SessionInfo 31 | if err := c.ShouldBindJSON(&jsonData); err != nil { 32 | // Return a bad request response if there's an error in binding/validation 33 | c.JSON(http.StatusBadRequest, gin.H{ 34 | "status": "Error in request body", 35 | "error": err.Error(), 36 | }) 37 | return 38 | } 39 | 40 | hashPass := jsonData.Password 41 | collName := "Users" 42 | coll := db.OpenCollection(db.DBinstance(), collName) 43 | rdb := db.RedisConnect() 44 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) 45 | defer cancel() 46 | 47 | err := coll.FindOne(ctx, bson.M{"email": jsonData.Email}).Decode(&jsonData) 48 | if err != nil { 49 | // Handle document not found error 50 | if err == mongo.ErrNoDocuments { 51 | c.JSON(http.StatusBadRequest, gin.H{ 52 | "status": "Error in Document", 53 | "error": "No User found with the given details", 54 | }) 55 | return 56 | } 57 | // Handle internal server error while searching for the user 58 | c.JSON(http.StatusInternalServerError, gin.H{ 59 | "status": "Internal Server Error", 60 | "error": "Error is searching for user", 61 | }) 62 | return 63 | } 64 | 65 | err = helpers.ComparePassword(jsonData.Password, hashPass) 66 | if err != nil { 67 | // Return unauthorized access response if passwords do not match 68 | c.JSON(http.StatusUnauthorized, gin.H{ 69 | "status": "Unauthorized Access", 70 | "error": "Password Mismatch", 71 | }) 72 | return 73 | } 74 | 75 | sessionInfo.SessionID, err = helpers.CreateSeessionID(consts.SessionIDlength, ctx) 76 | if err != nil { 77 | c.JSON(http.StatusInternalServerError, gin.H{ 78 | "status": "SessionID generation error", 79 | "error": err.Error(), 80 | }) 81 | return 82 | } 83 | 84 | sessionInfo.Email = jsonData.Email 85 | 86 | // ----------------- SET to REDIS ---------------------------- 87 | key := "session:" + sessionInfo.Email 88 | jsonSession, err := json.Marshal(sessionInfo) 89 | if err != nil { 90 | c.JSON(http.StatusInternalServerError, gin.H{ 91 | "status": "Error in Marshalling struct", 92 | "error": err.Error(), 93 | }) 94 | return 95 | } 96 | 97 | // first delete if older session exists 98 | rdb.Del(ctx, key) 99 | _, err = rdb.Set(ctx, key, jsonSession, consts.SessionTTL).Result() 100 | if err != nil { 101 | c.JSON(http.StatusInternalServerError, gin.H{ 102 | "status": "Error in Setting SessionID to DB", 103 | "error": err.Error(), 104 | }) 105 | return 106 | } 107 | 108 | collName = "SessionInfo" 109 | coll = db.OpenCollection(db.DBinstance(), collName) 110 | emailFilter := bson.M{"email": sessionInfo.Email} 111 | 112 | // Check if a document with the email already exists 113 | count, err := coll.CountDocuments(ctx, emailFilter) 114 | if err != nil { 115 | c.JSON(http.StatusInternalServerError, gin.H{ 116 | "status": "error in checking existing session", 117 | "error": err.Error(), 118 | }) 119 | return 120 | } 121 | // log.Println("here1...") 122 | 123 | if count == 0 { 124 | sessionInfo.CreatedAt = time.Now() 125 | sessionInfo.UpdatedAt = sessionInfo.CreatedAt 126 | // If no document with the email exists, insert a new document 127 | // log.Println("here2...") 128 | _, err := coll.InsertOne(ctx, sessionInfo) 129 | if err != nil { 130 | c.JSON(http.StatusInternalServerError, gin.H{ 131 | "status": "error in inserting new session", 132 | "error": err.Error(), 133 | }) 134 | rdb.Del(ctx, key) 135 | return 136 | } 137 | } else { 138 | // update the time 139 | // sessionInfo.UpdatedAt = time.Now() 140 | // log.Println("here3...") 141 | // If a document with the email exists, update the existing document 142 | update := bson.M{"$set": bson.M{"sessionid": sessionInfo.SessionID, "updatedat": time.Now()}} 143 | // log.Println("here3...") 144 | opts := options.Update().SetUpsert(false) // SetUpsert(false) for update only 145 | // log.Println("here3...") 146 | res, err := coll.UpdateOne(ctx, emailFilter, update, opts) 147 | // log.Println("here3...") 148 | log.Println(res.MatchedCount) 149 | if err != nil { 150 | c.JSON(http.StatusInternalServerError, gin.H{ 151 | "status": "error in updating existing session", 152 | "error": err.Error(), 153 | }) 154 | rdb.Del(ctx, key) 155 | log.Println("here4....") 156 | return 157 | } 158 | } 159 | 160 | c.JSON(http.StatusOK, gin.H{ 161 | "status": "User login Successful", 162 | "sessionInfo": sessionInfo, 163 | "count": count, 164 | // "UpsertedCount": res.UpsertedCount, 165 | // "ModifiedCount": res.ModifiedCount, 166 | }) 167 | } 168 | -------------------------------------------------------------------------------- /controllers/authController/signup.go: -------------------------------------------------------------------------------- 1 | package authcontroller 2 | 3 | import ( 4 | "context" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/gin-gonic/gin" 9 | "github.com/harsh082ip/Video-transcoder_Go/db" 10 | "github.com/harsh082ip/Video-transcoder_Go/helpers" 11 | "github.com/harsh082ip/Video-transcoder_Go/models" 12 | "go.mongodb.org/mongo-driver/bson/primitive" 13 | "gopkg.in/mgo.v2/bson" 14 | ) 15 | 16 | func SignUp(c *gin.Context) { 17 | 18 | var jsonData models.User 19 | 20 | // Bind and validate JSON 21 | if err := c.ShouldBindJSON(&jsonData); err != nil { 22 | // Return a bad request response if there's an error in binding/validation 23 | c.JSON(http.StatusBadRequest, gin.H{ 24 | "status": "Error in request body", 25 | "error": err.Error(), 26 | }) 27 | return 28 | } 29 | 30 | collName := "Users" 31 | coll := db.OpenCollection(db.DBinstance(), collName) 32 | 33 | emailFilter := bson.M{"email": jsonData.Email} 34 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) 35 | defer cancel() 36 | count, err := coll.CountDocuments(ctx, emailFilter) 37 | if err != nil { 38 | c.JSON(http.StatusInternalServerError, gin.H{ 39 | "status": "Error While Checking for Doc", 40 | "error": err.Error(), 41 | "count": count, 42 | }) 43 | return 44 | } 45 | 46 | if count > 0 { 47 | c.JSON(http.StatusInternalServerError, gin.H{ 48 | "status": "Doc Duplication not allowed", 49 | "error": "this email already exists", 50 | }) 51 | return 52 | } 53 | 54 | jsonData.Password, err = helpers.HashPassword(jsonData.Password) 55 | if err != nil { 56 | c.JSON(http.StatusInternalServerError, gin.H{ 57 | "status": "Error in generating hash for password", 58 | "error": err.Error(), 59 | }) 60 | return 61 | } 62 | 63 | jsonData.ID = primitive.NewObjectID() 64 | 65 | // finally add the user to db 66 | _, err = coll.InsertOne(ctx, jsonData) 67 | if err != nil { 68 | c.JSON(http.StatusInternalServerError, gin.H{ 69 | "status": "Error is attempting to SignUp", 70 | "error": err.Error(), 71 | }) 72 | return 73 | } 74 | 75 | c.JSON(http.StatusOK, gin.H{ 76 | "status": "User SignUp Successful", 77 | }) 78 | } 79 | -------------------------------------------------------------------------------- /controllers/ecsController/runTasks.go: -------------------------------------------------------------------------------- 1 | package ecscontroller 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | 7 | "github.com/aws/aws-sdk-go-v2/aws" 8 | "github.com/aws/aws-sdk-go-v2/service/ecs" 9 | ecsTypes "github.com/aws/aws-sdk-go-v2/service/ecs/types" 10 | aws_conf "github.com/harsh082ip/Video-transcoder_Go/aws" 11 | ) 12 | 13 | func RunECSTask(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, SOURCE_IMAGE, DESTINATION_1080, DESTINATION_720, DESTINATION_360 string) (bool, error) { 14 | 15 | ecsClient, err := aws_conf.GetECSClient() 16 | if err != nil { 17 | return false, fmt.Errorf("error in getting a ecs client, %v", err.Error()) 18 | } 19 | 20 | // Define environment variables 21 | environment := []ecsTypes.KeyValuePair{ 22 | { 23 | Name: aws.String("AWS_ACCESS_KEY_ID"), 24 | Value: aws.String(AWS_ACCESS_KEY_ID), 25 | }, 26 | { 27 | Name: aws.String("AWS_SECRET_ACCESS_KEY"), 28 | Value: aws.String(AWS_SECRET_ACCESS_KEY), 29 | }, 30 | { 31 | Name: aws.String("AWS_DEFAULT_REGION"), 32 | Value: aws.String("ap-south-1"), 33 | }, 34 | { 35 | Name: aws.String("SOURCE_IMAGE"), 36 | Value: aws.String(SOURCE_IMAGE), 37 | }, 38 | { 39 | Name: aws.String("DESTINATION_1080"), 40 | Value: aws.String(DESTINATION_1080), 41 | }, 42 | { 43 | Name: aws.String("DESTINATION_720"), 44 | Value: aws.String(DESTINATION_720), 45 | }, 46 | { 47 | Name: aws.String("DESTINATION_360"), 48 | Value: aws.String(DESTINATION_360), 49 | }, 50 | } 51 | 52 | // Define container overrides 53 | containerOverride := ecsTypes.ContainerOverride{ 54 | Name: aws.String("ffmpeg-container"), 55 | Environment: environment, 56 | } 57 | 58 | // Define task overrides 59 | taskOverride := ecsTypes.TaskOverride{ 60 | ContainerOverrides: []ecsTypes.ContainerOverride{containerOverride}, 61 | } 62 | 63 | // Run task 64 | runTaskInput := &ecs.RunTaskInput{ 65 | Cluster: aws.String("go-Cluster"), // Replace with your cluster name 66 | TaskDefinition: aws.String("go-task-v1"), // Replace with your task definition 67 | LaunchType: ecsTypes.LaunchTypeFargate, // Or ecsTypes.LaunchTypeEc2 if using EC2 launch type 68 | NetworkConfiguration: &ecsTypes.NetworkConfiguration{ // Required for FARGATE 69 | AwsvpcConfiguration: &ecsTypes.AwsVpcConfiguration{ 70 | Subnets: []string{"subnet-0dd67375bfa2bc37d", "subnet-0bd233120f2dc36b0", "subnet-01234dc71b3c22354"}, // Replace with your subnet 71 | SecurityGroups: []string{"sg-03ff3853d671a1697"}, // Replace with your security group 72 | AssignPublicIp: ecsTypes.AssignPublicIpEnabled, 73 | }, 74 | }, 75 | Overrides: &taskOverride, 76 | } 77 | 78 | result, err := ecsClient.RunTask(context.TODO(), runTaskInput) 79 | if err != nil { 80 | return false, fmt.Errorf("failed to run task, %v", err) 81 | } 82 | 83 | // Print result 84 | for _, task := range result.Tasks { 85 | fmt.Printf("Started task: %s\n", *task.TaskArn) 86 | return true, nil 87 | } 88 | 89 | return false, fmt.Errorf("unexpected Error in Starting a task") 90 | } 91 | -------------------------------------------------------------------------------- /controllers/jobsController/jobsCount.go: -------------------------------------------------------------------------------- 1 | package jobscontroller 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "strconv" 7 | 8 | "github.com/harsh082ip/Video-transcoder_Go/db" 9 | ) 10 | 11 | func IncreaseJobsCount(ctx context.Context) error { 12 | 13 | rdb := db.RedisConnect() 14 | 15 | // Increase job count 16 | count, err := rdb.Get(ctx, "Jobs").Result() 17 | if err != nil { 18 | return fmt.Errorf("error in Getting Jobs Count from redis, %v", err.Error()) 19 | } 20 | 21 | // Convert the value to an integer 22 | val, err := strconv.Atoi(count) 23 | if err != nil { 24 | return fmt.Errorf("failed to Jobs value to integer: %v", err.Error()) 25 | } 26 | 27 | // increse it by 1 28 | val++ 29 | err = rdb.Set(ctx, "Jobs", val, 0).Err() 30 | if err != nil { 31 | return fmt.Errorf("failed in Incresing Jobs Count, %v", err.Error()) 32 | } 33 | 34 | return nil 35 | } 36 | 37 | func DecreaseJobsCount(ctx context.Context) error { 38 | 39 | rdb := db.RedisConnect() 40 | 41 | // Decrease job count 42 | count, err := rdb.Get(ctx, "Jobs").Result() 43 | if err != nil { 44 | return fmt.Errorf("error in Getting Jobs Count from redis, %v", err.Error()) 45 | } 46 | 47 | // Convert the value to an integer 48 | val, err := strconv.Atoi(count) 49 | if err != nil { 50 | return fmt.Errorf("failed to Jobs value to integer: %v", err.Error()) 51 | } 52 | 53 | // decrease it by 1 54 | val-- 55 | err = rdb.Set(ctx, "Jobs", val, 0).Err() 56 | if err != nil { 57 | return fmt.Errorf("failed in Incresing Jobs Count, %v", err.Error()) 58 | } 59 | 60 | return nil 61 | } 62 | -------------------------------------------------------------------------------- /controllers/s3Controller/putImagePreSignedUrl.go: -------------------------------------------------------------------------------- 1 | package s3controller 2 | 3 | import ( 4 | "context" 5 | "net/http" 6 | "os" 7 | "time" 8 | 9 | "github.com/aws/aws-sdk-go-v2/aws" 10 | "github.com/aws/aws-sdk-go-v2/service/s3" 11 | "github.com/gin-gonic/gin" 12 | 13 | aws_conf "github.com/harsh082ip/Video-transcoder_Go/aws" 14 | "github.com/harsh082ip/Video-transcoder_Go/helpers" 15 | "github.com/harsh082ip/Video-transcoder_Go/models" 16 | ) 17 | 18 | func PreSignedUrlToPutImage(c *gin.Context) { 19 | 20 | var fileinfo models.FileInfo 21 | if err := c.ShouldBindJSON(&fileinfo); err != nil { 22 | // Return a bad request response if there's an error in binding/validation 23 | c.JSON(http.StatusBadRequest, gin.H{ 24 | "status": "Error in request body, filename and email is required to proceed", 25 | "error": err.Error(), 26 | }) 27 | return 28 | } 29 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) 30 | defer cancel() 31 | 32 | collName := "Users" 33 | res, _ := helpers.CheckIfDocExists("email", fileinfo.Email, collName, ctx) 34 | if !res { 35 | c.JSON(http.StatusBadRequest, gin.H{ 36 | "status": "No user exists with the given email", 37 | "error": "Please sent a correct email to proceed", 38 | }) 39 | return 40 | } 41 | 42 | s3Client, err := aws_conf.GetS3Client() 43 | if err != nil { 44 | c.JSON(http.StatusInternalServerError, gin.H{ 45 | "status": "cannot initialize a s3 client", 46 | "error": err.Error(), 47 | }) 48 | return 49 | } 50 | // ctx, cancel := 51 | 52 | uniqueKey, err := helpers.GetUniqueKey(16) 53 | if err != nil { 54 | c.JSON(http.StatusInternalServerError, gin.H{ 55 | "status": "Error in creating unique key", 56 | "error": err.Error(), 57 | }) 58 | return 59 | } 60 | 61 | key := "videos/" + fileinfo.Email + "/" + uniqueKey + fileinfo.Filename 62 | input := &s3.PutObjectInput{ 63 | Bucket: aws.String(os.Getenv("AWS_BUCKET")), 64 | Key: aws.String(key), 65 | ContentType: aws.String("video/mp4"), 66 | } 67 | 68 | presignedClient := s3.NewPresignClient(s3Client) 69 | 70 | presignedURL, err := presignedClient.PresignPutObject(context.TODO(), input, s3.WithPresignExpires(15*time.Minute)) 71 | if err != nil { 72 | c.JSON(http.StatusInternalServerError, gin.H{ 73 | "status": "Error in creating a pre-signed url :/", 74 | "error": err.Error(), 75 | }) 76 | } 77 | 78 | c.JSON(http.StatusOK, gin.H{ 79 | "msg": "Pre-Signed Url Creation Success", 80 | "URL": presignedURL, 81 | "expires in": "15 Minutes", 82 | }) 83 | } 84 | -------------------------------------------------------------------------------- /db/mongoConnect.go: -------------------------------------------------------------------------------- 1 | package db 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "log" 7 | "os" 8 | "time" 9 | 10 | "github.com/joho/godotenv" 11 | "go.mongodb.org/mongo-driver/mongo" 12 | "go.mongodb.org/mongo-driver/mongo/options" 13 | ) 14 | 15 | func DBinstance() *mongo.Client { 16 | // Log the current working directory 17 | cwd, err := os.Getwd() 18 | if err != nil { 19 | log.Println("Error getting current working directory:", err) 20 | } 21 | log.Println("Current working directory:", cwd) 22 | 23 | // Load the .env file from the root directory 24 | err = godotenv.Load("../../.env") 25 | if err != nil { 26 | log.Println("Error loading .env file") 27 | } 28 | 29 | // Log the value of MONGODB_URI 30 | MONGODB_URI := os.Getenv("MONGODB_URI") 31 | log.Println("MONGODB_URI:", MONGODB_URI) 32 | 33 | if MONGODB_URI == "" { 34 | log.Fatal("MONGODB_URI is not set") 35 | } 36 | 37 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) 38 | defer cancel() 39 | 40 | client, err := mongo.Connect(ctx, options.Client().ApplyURI(MONGODB_URI)) 41 | if err != nil { 42 | log.Fatal("Error connecting to MongoDB:", err) 43 | } 44 | 45 | fmt.Println("Client", client) 46 | return client 47 | } 48 | 49 | var Client *mongo.Client = DBinstance() 50 | 51 | func OpenCollection(client *mongo.Client, collectionName string) *mongo.Collection { 52 | return client.Database("Video-Transcoder").Collection(collectionName) 53 | } 54 | -------------------------------------------------------------------------------- /db/redisConnect.go: -------------------------------------------------------------------------------- 1 | package db 2 | 3 | import ( 4 | "log" 5 | "os" 6 | 7 | "github.com/joho/godotenv" 8 | "github.com/redis/go-redis/v9" 9 | ) 10 | 11 | func RedisConnect() *redis.Client { 12 | err := godotenv.Load("../../.env") 13 | if err != nil { 14 | log.Println("Error loading .env file") 15 | } 16 | 17 | REDIS_HOST := os.Getenv("REDIS_HOST") 18 | 19 | addr, err := redis.ParseURL(REDIS_HOST) 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | rdb := redis.NewClient(addr) 25 | 26 | return rdb 27 | } 28 | -------------------------------------------------------------------------------- /de_provision_resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Function to confirm if the user wants to change an environment variable 4 | confirm_change() { 5 | read -p "Do you want to change $1? (yes/no): " CHANGE 6 | if [[ $CHANGE == "yes" ]]; then 7 | return 0 8 | else 9 | return 1 10 | fi 11 | } 12 | 13 | # Function to prompt for AWS credentials and display current environment variables 14 | get_aws_credentials() { 15 | echo "AWS Credentials Setup" 16 | read -p "Enter your AWS Access Key ID: " AWS_ACCESS_KEY_ID 17 | read -sp "Enter your AWS Secret Access Key: " AWS_SECRET_ACCESS_KEY 18 | echo # Newline after entering the secret key 19 | 20 | echo "Current environment variables:" 21 | echo "AWS_REGION=${AWS_REGION:-not set}" 22 | echo "TEMP_BUCKET_NAME=${TEMP_BUCKET_NAME:-not set}" 23 | echo "PERMANENT_BUCKET_NAME=${PERMANENT_BUCKET_NAME:-not set}" 24 | echo "ECR_REPOSITORY_NAME=${ECR_REPOSITORY_NAME:-not set}" 25 | echo "IMAGE_URI=${IMAGE_URI:-not set}" 26 | echo "KEY_PAIR_NAME=${KEY_PAIR_NAME:-not set}" 27 | 28 | # Check if the user wants to change any variables 29 | if confirm_change "AWS_REGION"; then 30 | read -p "Enter the AWS Region: " AWS_REGION 31 | fi 32 | 33 | if confirm_change "TEMP_BUCKET_NAME"; then 34 | read -p "Enter the temporary S3 bucket name: " TEMP_BUCKET_NAME 35 | fi 36 | 37 | if confirm_change "PERMANENT_BUCKET_NAME"; then 38 | read -p "Enter the permanent S3 bucket name: " PERMANENT_BUCKET_NAME 39 | fi 40 | 41 | if confirm_change "ECR_REPOSITORY_NAME"; then 42 | read -p "Enter the ECR repository name: " ECR_REPOSITORY_NAME 43 | fi 44 | 45 | if confirm_change "IMAGE_URI"; then 46 | read -p "Enter the Docker image URI: " IMAGE_URI 47 | fi 48 | 49 | if confirm_change "KEY_PAIR_NAME"; then 50 | read -p "Enter the key pair name: " KEY_PAIR_NAME 51 | fi 52 | 53 | # Save the environment variables to a file 54 | echo "Saving environment variables to env_vars.sh..." 55 | { 56 | echo "export AWS_REGION=${AWS_REGION:-us-east-1}" 57 | echo "export TEMP_BUCKET_NAME=${TEMP_BUCKET_NAME:-my-temp-bucket}" 58 | echo "export PERMANENT_BUCKET_NAME=${PERMANENT_BUCKET_NAME:-my-permanent-bucket}" 59 | echo "export ECR_REPOSITORY_NAME=${ECR_REPOSITORY_NAME:-my-ecr-repo}" 60 | echo "export IMAGE_URI=${IMAGE_URI:-your-image-uri}" 61 | } > env_vars.sh 62 | } 63 | 64 | # Call the function to get AWS credentials 65 | get_aws_credentials 66 | 67 | # Confirm with the user before proceeding to deprovision resources 68 | read -p "Are you sure you want to deprovision the resources? (yes/no): " CONFIRM 69 | if [[ $CONFIRM != "yes" ]]; then 70 | echo "Operation aborted." 71 | exit 1 72 | fi 73 | 74 | # Set the base directory for resource setup 75 | BASE_DIR="$(pwd)" # Get the current working directory 76 | 77 | # Navigate to each directory and deprovision resources 78 | for dir in setup-s3-temp setup-s3-permanent setup-lambda setup-ecr setup-ecs-task-definition setup-ecs-cluster setup-ec2; do 79 | cd "$BASE_DIR/pulumi/$dir" # Use the path relative to the BASE_DIR 80 | pulumi down --yes 81 | cd "$BASE_DIR" # Go back to the base directory 82 | done 83 | 84 | # Success message 85 | echo "All resources have been successfully deprovisioned." 86 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/harsh082ip/Video-transcoder_Go 2 | 3 | go 1.22.4 4 | 5 | require ( 6 | github.com/aws/aws-lambda-go v1.47.0 7 | github.com/aws/aws-sdk-go-v2 v1.29.0 8 | github.com/aws/aws-sdk-go-v2/config v1.27.18 9 | github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 10 | github.com/gin-gonic/gin v1.10.0 11 | github.com/joho/godotenv v1.5.1 12 | github.com/redis/go-redis/v9 v9.5.3 13 | go.mongodb.org/mongo-driver v1.15.1 14 | golang.org/x/crypto v0.24.0 15 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 16 | ) 17 | 18 | require ( 19 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect 20 | github.com/aws/aws-sdk-go-v2/credentials v1.17.18 // indirect 21 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 // indirect 22 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.11 // indirect 23 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.11 // indirect 24 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect 25 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 // indirect 26 | github.com/aws/aws-sdk-go-v2/service/ecs v1.43.0 // indirect 27 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect 28 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 // indirect 29 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect 30 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect 31 | github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 // indirect 32 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 // indirect 33 | github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 // indirect 34 | github.com/aws/smithy-go v1.20.2 // indirect 35 | github.com/bytedance/sonic v1.11.6 // indirect 36 | github.com/bytedance/sonic/loader v0.1.1 // indirect 37 | github.com/cespare/xxhash/v2 v2.2.0 // indirect 38 | github.com/cloudwego/base64x v0.1.4 // indirect 39 | github.com/cloudwego/iasm v0.2.0 // indirect 40 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect 41 | github.com/gabriel-vasile/mimetype v1.4.3 // indirect 42 | github.com/gin-contrib/sse v0.1.0 // indirect 43 | github.com/go-playground/locales v0.14.1 // indirect 44 | github.com/go-playground/universal-translator v0.18.1 // indirect 45 | github.com/go-playground/validator/v10 v10.20.0 // indirect 46 | github.com/goccy/go-json v0.10.2 // indirect 47 | github.com/golang/snappy v0.0.1 // indirect 48 | github.com/jmespath/go-jmespath v0.4.0 // indirect 49 | github.com/json-iterator/go v1.1.12 // indirect 50 | github.com/klauspost/compress v1.13.6 // indirect 51 | github.com/klauspost/cpuid/v2 v2.2.7 // indirect 52 | github.com/leodido/go-urn v1.4.0 // indirect 53 | github.com/mattn/go-isatty v0.0.20 // indirect 54 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 55 | github.com/modern-go/reflect2 v1.0.2 // indirect 56 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect 57 | github.com/pelletier/go-toml/v2 v2.2.2 // indirect 58 | github.com/twitchyliquid64/golang-asm v0.15.1 // indirect 59 | github.com/ugorji/go/codec v1.2.12 // indirect 60 | github.com/xdg-go/pbkdf2 v1.0.0 // indirect 61 | github.com/xdg-go/scram v1.1.2 // indirect 62 | github.com/xdg-go/stringprep v1.0.4 // indirect 63 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect 64 | golang.org/x/arch v0.8.0 // indirect 65 | golang.org/x/net v0.25.0 // indirect 66 | golang.org/x/sync v0.7.0 // indirect 67 | golang.org/x/sys v0.21.0 // indirect 68 | golang.org/x/text v0.16.0 // indirect 69 | google.golang.org/protobuf v1.34.1 // indirect 70 | gopkg.in/yaml.v2 v2.4.0 // indirect 71 | gopkg.in/yaml.v3 v3.0.1 // indirect 72 | ) 73 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1sXVI= 2 | github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A= 3 | github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8= 4 | github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 5 | github.com/aws/aws-sdk-go-v2 v1.28.0 h1:ne6ftNhY0lUvlazMUQF15FF6NH80wKmPRFG7g2q6TCw= 6 | github.com/aws/aws-sdk-go-v2 v1.28.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 7 | github.com/aws/aws-sdk-go-v2 v1.29.0 h1:uMlEecEwgp2gs6CsM6ugquNHr6mg0LHylPBR8u5Ojac= 8 | github.com/aws/aws-sdk-go-v2 v1.29.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= 9 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= 10 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= 11 | github.com/aws/aws-sdk-go-v2/config v1.27.18 h1:wFvAnwOKKe7QAyIxziwSKjmer9JBMH1vzIL6W+fYuKk= 12 | github.com/aws/aws-sdk-go-v2/config v1.27.18/go.mod h1:0xz6cgdX55+kmppvPm2IaKzIXOheGJhAufacPJaXZ7c= 13 | github.com/aws/aws-sdk-go-v2/credentials v1.17.18 h1:D/ALDWqK4JdY3OFgA2thcPO1c9aYTT5STS/CvnkqY1c= 14 | github.com/aws/aws-sdk-go-v2/credentials v1.17.18/go.mod h1:JuitCWq+F5QGUrmMPsk945rop6bB57jdscu+Glozdnc= 15 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 h1:dDgptDO9dxeFkXy+tEgVkzSClHZje/6JkPW5aZyEvrQ= 16 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5/go.mod h1:gjvE2KBUgUQhcv89jqxrIxH9GaKs1JbZzWejj/DaHGA= 17 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw= 18 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y= 19 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10 h1:LZIUb8sQG2cb89QaVFtMSnER10gyKkqU1k3hP3g9das= 20 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10/go.mod h1:BRIqay//vnIOCZjoXWSLffL2uzbtxEmnSlfbvVh7Z/4= 21 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.11 h1:ltkhl3I9ddcRR3Dsy+7bOFFq546O8OYsfNEXVIyuOSE= 22 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.11/go.mod h1:H4D8JoCFNJwnT7U5U8iwgG24n71Fx2I/ZP/18eYFr9g= 23 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0= 24 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw= 25 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10 h1:HY7CXLA0GiQUo3WYxOP7WYkLcwvRX4cLPf5joUcrQGk= 26 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10/go.mod h1:kfRBSxRa+I+VyON7el3wLZdrO91oxUxEwdAaWgFqN90= 27 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.11 h1:+BgX2AY7yV4ggSwa80z/yZIJX+e0jnNxjMLVyfpSXM0= 28 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.11/go.mod h1:DlBATBSDCz30BCdRFldmyLsAzJwi2pdQ+YSdJTHhTUI= 29 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= 30 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= 31 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 h1:vHyZxoLVOgrI8GqX7OMHLXp4YYoxeEsrjweXKpye+ds= 32 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9/go.mod h1:z9VXZsWA2BvZNH1dT0ToUYwMu/CR9Skkj/TBX+mceZw= 33 | github.com/aws/aws-sdk-go-v2/service/ecs v1.42.1 h1:KZetBzrQZlpu1U1kIheGfzxua2wh9KuhgQgFO52bWK4= 34 | github.com/aws/aws-sdk-go-v2/service/ecs v1.42.1/go.mod h1:u3ULg7pG2JIqIq42FZwNBBEFUX7a1En5LMNjl47xI6Q= 35 | github.com/aws/aws-sdk-go-v2/service/ecs v1.43.0 h1:efgv9/bmag2npefcjkoLA7LIN2CfoUh2l3Zory7mhkk= 36 | github.com/aws/aws-sdk-go-v2/service/ecs v1.43.0/go.mod h1:30V0YAIaqPu/zgtVeuLmUht809PnYNOK8PUov7YE0fA= 37 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= 38 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= 39 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 h1:4vt9Sspk59EZyHCAEMaktHKiq0C09noRTQorXD/qV+s= 40 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11/go.mod h1:5jHR79Tv+Ccq6rwYh+W7Nptmw++WiFafMfR42XhwNl8= 41 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo= 42 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8= 43 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfRSvXfCr2SQwfnqsoJT9nPQ9kj0lkxM= 44 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM= 45 | github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0= 46 | github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM= 47 | github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw= 48 | github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w= 49 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ= 50 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5/go.mod h1:5ZXesEuy/QcO0WUnt+4sDkxhdXRHTu2yG0uCSH8B6os= 51 | github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 h1:M/1u4HBpwLuMtjlxuI2y6HoVLzF5e2mfxHCg7ZVMYmk= 52 | github.com/aws/aws-sdk-go-v2/service/sts v1.28.12/go.mod h1:kcfd+eTdEi/40FIbLq4Hif3XMXnl5b/+t/KTfLt9xIk= 53 | github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= 54 | github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= 55 | github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= 56 | github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= 57 | github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= 58 | github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= 59 | github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= 60 | github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= 61 | github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= 62 | github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= 63 | github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= 64 | github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 65 | github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= 66 | github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= 67 | github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= 68 | github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= 69 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 70 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 71 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 72 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= 73 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= 74 | github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= 75 | github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= 76 | github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= 77 | github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= 78 | github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= 79 | github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= 80 | github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= 81 | github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= 82 | github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= 83 | github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= 84 | github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= 85 | github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= 86 | github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= 87 | github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= 88 | github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= 89 | github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 90 | github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= 91 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 92 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 93 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 94 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 95 | github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= 96 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 97 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 98 | github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= 99 | github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= 100 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 101 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 102 | github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= 103 | github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= 104 | github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= 105 | github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= 106 | github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= 107 | github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= 108 | github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= 109 | github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= 110 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= 111 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 112 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 113 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 114 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 115 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 116 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 117 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= 118 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= 119 | github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= 120 | github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= 121 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 122 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 123 | github.com/redis/go-redis/v9 v9.5.3 h1:fOAp1/uJG+ZtcITgZOfYFmTKPE7n4Vclj1wZFgRciUU= 124 | github.com/redis/go-redis/v9 v9.5.3/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= 125 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 126 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 127 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 128 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 129 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 130 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 131 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 132 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 133 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 134 | github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 135 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 136 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 137 | github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= 138 | github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= 139 | github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= 140 | github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= 141 | github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= 142 | github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= 143 | github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= 144 | github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= 145 | github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= 146 | github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= 147 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= 148 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= 149 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 150 | go.mongodb.org/mongo-driver v1.15.1 h1:l+RvoUOoMXFmADTLfYDm7On9dRm7p4T80/lEQM+r7HU= 151 | go.mongodb.org/mongo-driver v1.15.1/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= 152 | golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= 153 | golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= 154 | golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= 155 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 156 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 157 | golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= 158 | golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= 159 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 160 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 161 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 162 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 163 | golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= 164 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 165 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 166 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 167 | golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= 168 | golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 169 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 170 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 171 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 172 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 173 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 174 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 175 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 176 | golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= 177 | golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 178 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 179 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 180 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 181 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 182 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 183 | golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 184 | golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= 185 | golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 186 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 187 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 188 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 189 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 190 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= 191 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 192 | google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= 193 | google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 194 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 195 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 196 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= 197 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 198 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 199 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 200 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 201 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 202 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 203 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 204 | nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= 205 | rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= 206 | -------------------------------------------------------------------------------- /helpers/checkIfDocExists.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "context" 5 | "log" 6 | 7 | "github.com/harsh082ip/Video-transcoder_Go/db" 8 | "gopkg.in/mgo.v2/bson" 9 | ) 10 | 11 | func CheckIfDocExists(key, val, collName string, ctx context.Context) (bool, error) { 12 | 13 | coll := db.OpenCollection(db.DBinstance(), collName) 14 | filter := bson.M{key: val} 15 | res, err := coll.CountDocuments(ctx, filter) 16 | if err != nil { 17 | return false, err 18 | } 19 | log.Println(res) 20 | if res > 0 { 21 | return true, nil 22 | } 23 | return false, nil 24 | } 25 | -------------------------------------------------------------------------------- /helpers/ecsHelper/listRunningTasks.go: -------------------------------------------------------------------------------- 1 | package ecshelper 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | 7 | "github.com/aws/aws-sdk-go-v2/aws" 8 | "github.com/aws/aws-sdk-go-v2/service/ecs" 9 | aws_conf "github.com/harsh082ip/Video-transcoder_Go/aws" 10 | ) 11 | 12 | func ListRunningTask() (int, error) { 13 | 14 | ecsClient, err := aws_conf.GetECSClient() 15 | if err != nil { 16 | return 0, err 17 | } 18 | 19 | // List all tasks in the ECS cluster 20 | listTasksResp, err := ecsClient.ListTasks(context.TODO(), &ecs.ListTasksInput{ 21 | Cluster: aws.String("go-Cluster"), 22 | }) 23 | if err != nil { 24 | return 0, fmt.Errorf("error in listing task, %v", err.Error()) 25 | } 26 | 27 | // Check if there are tasks to describe 28 | if len(listTasksResp.TaskArns) == 0 { 29 | return 0, nil 30 | } 31 | 32 | // Describe ECS tasks 33 | describeTasksResp, err := ecsClient.DescribeTasks(context.TODO(), &ecs.DescribeTasksInput{ 34 | Cluster: aws.String("go-Cluster"), 35 | Tasks: listTasksResp.TaskArns, 36 | }) 37 | if err != nil { 38 | return 0, fmt.Errorf("error in describing tasks, %v", err.Error()) 39 | } 40 | 41 | // Count RUNNING tasks 42 | runningTaskCount := 0 43 | for _, task := range describeTasksResp.Tasks { 44 | if *aws.String(*task.LastStatus) == "RUNNING" { 45 | runningTaskCount++ 46 | } 47 | } 48 | 49 | return runningTaskCount, nil 50 | } 51 | -------------------------------------------------------------------------------- /helpers/getSessionID.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "context" 5 | "crypto/rand" 6 | "fmt" 7 | "math/big" 8 | 9 | "github.com/harsh082ip/Video-transcoder_Go/consts" 10 | "github.com/harsh082ip/Video-transcoder_Go/db" 11 | ) 12 | 13 | func CreateSeessionID(length int, ctx context.Context) (string, error) { 14 | var sessionID string 15 | l := length 16 | for { 17 | result := make([]byte, length) 18 | for i := range result { 19 | num, err := rand.Int(rand.Reader, big.NewInt(int64(len(consts.LetterBytes)))) 20 | if err != nil { 21 | return "", err 22 | } 23 | result[i] = consts.LetterBytes[num.Int64()] 24 | } 25 | sessionID = string(result) 26 | 27 | // check if this session id alredy exists 28 | rdb := db.RedisConnect() 29 | key := "session:" + sessionID 30 | res, err := rdb.Exists(ctx, key).Result() 31 | if err != nil { 32 | return "", fmt.Errorf("error creating a SessionID %v", err.Error()) 33 | } 34 | 35 | if res > 0 { 36 | length = l 37 | continue 38 | } else { 39 | break 40 | } 41 | } 42 | return sessionID, nil 43 | } 44 | -------------------------------------------------------------------------------- /helpers/getUniqueKey.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "crypto/rand" 5 | "math/big" 6 | 7 | "github.com/harsh082ip/Video-transcoder_Go/consts" 8 | ) 9 | 10 | func GetUniqueKey(length int) (string, error) { 11 | var sessionID string 12 | 13 | result := make([]byte, length) 14 | for i := range result { 15 | num, err := rand.Int(rand.Reader, big.NewInt(int64(len(consts.LetterBytes)))) 16 | if err != nil { 17 | return "", err 18 | } 19 | result[i] = consts.LetterBytes[num.Int64()] 20 | } 21 | sessionID = string(result) 22 | 23 | return sessionID, nil 24 | } 25 | -------------------------------------------------------------------------------- /helpers/hashPassword.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import "golang.org/x/crypto/bcrypt" 4 | 5 | // The cost factor (in this case, 14) is a measure of how 6 | // computationally expensive the hashing should be. Higher cost 7 | // factors result in slower hash generation but also make it more 8 | // difficult for attackers to perform brute-force or rainbow table attacks. 9 | 10 | func HashPassword(password string) (string, error) { 11 | 12 | bytes, err := bcrypt.GenerateFromPassword([]byte(password), 14) 13 | return string(bytes), err 14 | } 15 | 16 | func ComparePassword(hashedPassword, password string) error { 17 | 18 | return bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password)) 19 | } 20 | -------------------------------------------------------------------------------- /middleware/authMiddleware.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "context" 5 | "log" 6 | "net/http" 7 | "time" 8 | 9 | "github.com/gin-gonic/gin" 10 | "github.com/harsh082ip/Video-transcoder_Go/db" 11 | "github.com/harsh082ip/Video-transcoder_Go/models" 12 | "go.mongodb.org/mongo-driver/mongo" 13 | "gopkg.in/mgo.v2/bson" 14 | ) 15 | 16 | func AuthMiddleware() gin.HandlerFunc { 17 | return func(c *gin.Context) { 18 | sessionID := c.Query("sessionID") 19 | log.Println(sessionID) 20 | if sessionID == "" { 21 | c.JSON(http.StatusBadRequest, gin.H{ 22 | "status": "Session ID is required", 23 | "error": "Missing sessionID query parameter", 24 | }) 25 | c.Abort() 26 | return 27 | } 28 | 29 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) 30 | defer cancel() 31 | 32 | collName := "SessionInfo" 33 | coll := db.OpenCollection(db.DBinstance(), collName) 34 | var sessionInfo models.SessionInfo 35 | err := coll.FindOne(ctx, bson.M{"sessionid": sessionID}).Decode(&sessionInfo) 36 | if err != nil { 37 | if err == mongo.ErrNoDocuments { 38 | c.JSON(http.StatusUnauthorized, gin.H{ 39 | "status": "No user found for the sessionID", 40 | "error": err.Error(), 41 | }) 42 | c.Abort() 43 | return 44 | } 45 | c.JSON(http.StatusInternalServerError, gin.H{ 46 | "status": "Error in finding user for the session ID", 47 | "error": err.Error(), 48 | }) 49 | c.Abort() 50 | return 51 | } 52 | 53 | rdb := db.RedisConnect() 54 | key := "session:" + sessionInfo.Email 55 | res, err := rdb.Exists(ctx, key).Result() 56 | if err != nil { 57 | c.JSON(http.StatusInternalServerError, gin.H{ 58 | "status": "Error in checking for authorization status", 59 | "error": err.Error(), 60 | }) 61 | c.Abort() 62 | return 63 | } 64 | 65 | if res > 0 { 66 | c.Next() 67 | return 68 | } 69 | 70 | c.JSON(http.StatusUnauthorized, gin.H{ 71 | "status": "Unauthorized Access", 72 | "error": "Session expired or doesn't exists", 73 | }) 74 | c.Abort() 75 | // return 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /models/appModels.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "time" 5 | 6 | "go.mongodb.org/mongo-driver/bson/primitive" 7 | ) 8 | 9 | type User struct { 10 | ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` 11 | Name string `json:"name" binding:"required"` 12 | Email string `json:"email" binding:"required,email"` 13 | Password string `json:"password" binding:"required,min=6"` 14 | } 15 | 16 | type LoginUser struct { 17 | Email string `json:"email" binding:"required,email"` 18 | Password string `json:"password" binding:"required,min=6"` 19 | } 20 | 21 | type SessionInfo struct { 22 | Email string `json:"email" binding:"required,email"` 23 | SessionID string `json:"sessionid" binding:"required"` 24 | CreatedAt time.Time `json:"createdAt"` 25 | UpdatedAt time.Time `json:"updatedNow"` 26 | } 27 | 28 | type FileInfo struct { 29 | ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` 30 | Email string `json:"email" binding:"required"` 31 | Filename string `json:"filename" binding:"required"` 32 | S3Address string `json:"s3address"` 33 | } 34 | 35 | type VideosJobs struct { 36 | Key string `json:"key"` 37 | ObjectUrl string `json:"object_url"` 38 | } 39 | -------------------------------------------------------------------------------- /provision_resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Let's set up your resources" 4 | sleep 1 5 | rm -rf env_vars.sh 6 | 7 | # Read AWS credentials 8 | read -p "Enter your AWS Access Key ID: " AWS_ACCESS_KEY_ID 9 | read -sp "Enter your AWS Secret Access Key: " AWS_SECRET_ACCESS_KEY 10 | echo # For newline after entering secret key 11 | 12 | echo "Warning: You need to give proper permission to this IAM user." 13 | 14 | # Export AWS credentials as environment variables 15 | export AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" 16 | export AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" 17 | 18 | # Ask for the AWS region 19 | read -p "In which AWS region do you want to setup resources? (e.g., us-east-1): " AWS_REGION 20 | 21 | # Change directories and update region in Pulumi configurations 22 | cd pulumi 23 | 24 | for dir in setup-s3-temp setup-s3-permanent setup-lambda setup-ecr setup-ecs-task-definition setup-ecs-cluster setup-ec2; do 25 | cd $dir 26 | pulumi config set aws:region "$AWS_REGION" 27 | cd .. 28 | done 29 | 30 | # Get temporary and permanent bucket names 31 | read -p "Enter the name for the temporary S3 bucket: " TEMP_BUCKET_NAME 32 | read -p "Enter the name for the permanent S3 bucket: " PERMANENT_BUCKET_NAME 33 | 34 | # Export bucket names as environment variables 35 | export TEMP_BUCKET_NAME="$TEMP_BUCKET_NAME" 36 | export PERMANENT_BUCKET_NAME="$PERMANENT_BUCKET_NAME" 37 | 38 | # Deploy Pulumi stacks for S3 and Lambda 39 | cd setup-s3-temp 40 | pulumi refresh --yes # Sync the state before deploying 41 | pulumi up --yes 42 | cd .. 43 | 44 | cd setup-s3-permanent 45 | pulumi refresh --yes # Sync the state before deploying 46 | pulumi up --yes 47 | cd .. 48 | 49 | cd setup-lambda 50 | pulumi refresh --yes # Sync the state before deploying 51 | pulumi up --yes 52 | cd .. 53 | 54 | # Ask for the key pair name for EC2 instance 55 | read -p "Enter the name of the EC2 key pair: " KEY_PAIR_NAME 56 | export KEY_PAIR_NAME="$KEY_PAIR_NAME" 57 | 58 | cd setup-ec2 59 | pulumi refresh --yes # Sync the state before deploying 60 | pulumi up --yes 61 | cd .. 62 | 63 | # Ask for and validate ECR repository name 64 | while true; do 65 | read -p "Enter a valid name for the ECR repository (lowercase, use - or _ if needed): " ECR_REPOSITORY_NAME 66 | 67 | if [[ $ECR_REPOSITORY_NAME =~ ^[a-z0-9]+([._-][a-z0-9]+)*$ ]]; then 68 | break 69 | else 70 | echo "Invalid repository name. Please ensure it is lowercase and follows AWS ECR naming rules." 71 | fi 72 | done 73 | 74 | # Export the repository name as an environment variable 75 | export ECR_REPOSITORY_NAME="$ECR_REPOSITORY_NAME" 76 | 77 | # Deploy Pulumi stack for ECR 78 | cd setup-ecr 79 | pulumi refresh --yes # Sync the state before deploying 80 | pulumi up --yes 81 | cd .. 82 | 83 | # Wait for 2 seconds 84 | sleep 2 85 | echo "You need to push a Docker image to this ECR repository in order to move further." 86 | 87 | # Check if the user has pushed the Docker image 88 | while true; do 89 | read -p "Have you pushed the Docker image to the ECR repository? (yes/no): " PUSHED_IMAGE 90 | 91 | if [[ $PUSHED_IMAGE == "yes" ]]; then 92 | break 93 | elif [[ $PUSHED_IMAGE == "no" ]]; then 94 | echo "Please push the Docker image and try again." 95 | exit 1 96 | else 97 | echo "Invalid response. Please enter 'yes' or 'no'." 98 | fi 99 | done 100 | 101 | # Get the image URI from the user 102 | read -p "Enter the Docker image URI (you can find it in the ECR dashboard): " IMAGE_URI 103 | 104 | # Export the image URI as an environment variable 105 | export IMAGE_URI="$IMAGE_URI" 106 | 107 | # Deploy Pulumi stacks for ECS task definition and cluster 108 | cd setup-ecs-task-definition 109 | pulumi refresh --yes # Sync the state before deploying 110 | pulumi up --yes 111 | cd .. 112 | 113 | cd setup-ecs-cluster 114 | pulumi refresh --yes # Sync the state before deploying 115 | pulumi up --yes 116 | cd ../.. 117 | 118 | # Save the environment variables to a file 119 | echo "Saving environment variables to env_vars.sh..." 120 | 121 | { 122 | echo "export AWS_ACCESS_KEY_ID=\"$AWS_ACCESS_KEY_ID\"" 123 | echo "export AWS_SECRET_ACCESS_KEY=\"$AWS_SECRET_ACCESS_KEY\"" 124 | echo "export AWS_REGION=\"${AWS_REGION:-us-east-1}\"" 125 | echo "export TEMP_BUCKET_NAME=\"${TEMP_BUCKET_NAME:-my-temp-bucket}\"" 126 | echo "export PERMANENT_BUCKET_NAME=\"${PERMANENT_BUCKET_NAME:-my-permanent-bucket}\"" 127 | echo "export ECR_REPOSITORY_NAME=\"${ECR_REPOSITORY_NAME:-my-ecr-repo}\"" 128 | echo "export IMAGE_URI=\"${IMAGE_URI:-your-image-uri}\"" 129 | echo "export KEY_PAIR_NAME=\"${KEY_PAIR_NAME:-your-}\"" 130 | } > env_vars.sh || { echo "Failed to write to env_vars.sh"; } 131 | 132 | # Source the env_vars.shs 133 | source env_vars.sh 134 | 135 | # Success message 136 | echo "All your resources are setup successfully." 137 | -------------------------------------------------------------------------------- /pulumi/setup-ec2/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: eu-west-1 3 | -------------------------------------------------------------------------------- /pulumi/setup-ec2/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-ec2 2 | runtime: go 3 | description: Setup EC2 server for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-ec2/go.mod: -------------------------------------------------------------------------------- 1 | module setup-ec2 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-ec2/go.sum: -------------------------------------------------------------------------------- 1 | dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= 2 | dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= 3 | github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= 4 | github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= 5 | github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= 6 | github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= 7 | github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= 8 | github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= 9 | github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= 10 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= 11 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= 12 | github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= 13 | github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 14 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= 15 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= 16 | github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= 17 | github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= 18 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= 19 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 20 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= 21 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 22 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= 23 | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= 24 | github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= 25 | github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= 26 | github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= 27 | github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= 28 | github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= 29 | github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= 30 | github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= 31 | github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= 32 | github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= 33 | github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= 34 | github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= 35 | github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= 36 | github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= 37 | github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= 38 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= 39 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= 40 | github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 41 | github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= 42 | github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= 43 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 44 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 45 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 46 | github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= 47 | github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= 48 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= 49 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= 50 | github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= 51 | github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= 52 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 53 | github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= 54 | github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 55 | github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= 56 | github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= 57 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= 58 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= 59 | github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= 60 | github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= 61 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= 62 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= 63 | github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= 64 | github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= 65 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 66 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 67 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 68 | github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= 69 | github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= 70 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= 71 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 72 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 73 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 74 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 75 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 76 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 77 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 78 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= 79 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= 80 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 81 | github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= 82 | github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 83 | github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= 84 | github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= 85 | github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= 86 | github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= 87 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 88 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 89 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= 90 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= 91 | github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= 92 | github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 93 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 94 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 95 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 96 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 97 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 98 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 99 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 100 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 101 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 102 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 103 | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 104 | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 105 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 106 | github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= 107 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 108 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 109 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 110 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= 111 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 112 | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= 113 | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= 114 | github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 115 | github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= 116 | github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= 117 | github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 118 | github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= 119 | github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= 120 | github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= 121 | github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= 122 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= 123 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= 124 | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= 125 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 126 | github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= 127 | github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= 128 | github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= 129 | github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= 130 | github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= 131 | github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= 132 | github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= 133 | github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= 134 | github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 135 | github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= 136 | github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= 137 | github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU= 138 | github.com/pgavlin/fx v0.1.6/go.mod h1:KWZJ6fqBBSh8GxHYqwYCf3rYE7Gp2p0N8tJp8xv9u9M= 139 | github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= 140 | github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= 141 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 142 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 143 | github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= 144 | github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= 145 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 146 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 147 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= 148 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= 149 | github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= 150 | github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= 151 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 h1:U0Z6dagxFsOhV9J16aAjIfEZJf7NU+L9l9aGABQyrNs= 152 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1/go.mod h1:OQXIshEv/eVOYyBPMHADSaLG+qDJKQqP8p9lBy7tkOA= 153 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 h1:ImIsukZ2ZIYQG94uWdSZl9dJjJTosQSTsOQTauTNX7U= 154 | github.com/pulumi/pulumi/sdk/v3 v3.117.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= 155 | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 156 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 157 | github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= 158 | github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 159 | github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= 160 | github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 161 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 162 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= 163 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= 164 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= 165 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= 166 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= 167 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= 168 | github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 169 | github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= 170 | github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= 171 | github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= 172 | github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= 173 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 174 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 175 | github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= 176 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 177 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 178 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 179 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 180 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 181 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 182 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 183 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 184 | github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= 185 | github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= 186 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= 187 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= 188 | github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= 189 | github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= 190 | github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= 191 | github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= 192 | github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= 193 | github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= 194 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 195 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 196 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 197 | github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= 198 | github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= 199 | go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= 200 | go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 201 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 202 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 203 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 204 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 205 | golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 206 | golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= 207 | golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= 208 | golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= 209 | golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= 210 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= 211 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 212 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 213 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 214 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 215 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 216 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 217 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 218 | golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= 219 | golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 220 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 221 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 222 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 223 | golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 224 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 225 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 226 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 227 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 228 | golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= 229 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 230 | golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 231 | golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= 232 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 233 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 234 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 235 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 236 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 237 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 238 | golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 239 | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 240 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 241 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 242 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 243 | golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 244 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 245 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 246 | golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 247 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 248 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 249 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 250 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 251 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 252 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 253 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 254 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 255 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 256 | golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 257 | golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 258 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 259 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 260 | golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= 261 | golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 262 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 263 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 264 | golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= 265 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 266 | golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= 267 | golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= 268 | golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 269 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 270 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 271 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 272 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 273 | golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 274 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 275 | golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 276 | golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= 277 | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 278 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 279 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 280 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 281 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 282 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 283 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 284 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 285 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 286 | golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= 287 | golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= 288 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 289 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 290 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 291 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 292 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= 293 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 294 | google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= 295 | google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 296 | google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= 297 | google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 298 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 299 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 300 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 301 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 302 | gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= 303 | gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 304 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 305 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 306 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 307 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 308 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 309 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 310 | lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= 311 | lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= 312 | pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= 313 | pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= 314 | -------------------------------------------------------------------------------- /pulumi/setup-ec2/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | 8 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 9 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 10 | ) 11 | 12 | func main() { 13 | pulumi.Run(func(ctx *pulumi.Context) error { 14 | // Get environment variables 15 | keyPairName := os.Getenv("KEY_PAIR_NAME") 16 | if keyPairName == "" { 17 | log.Fatal("KEY_PAIR_NAME cannot be empty") 18 | os.Exit(1) 19 | } 20 | 21 | // Fetch the latest Ubuntu 24.04 LTS AMI ID 22 | ami, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{ 23 | Filters: []ec2.GetAmiFilter{ 24 | { 25 | Name: "name", 26 | Values: []string{"ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"}, 27 | }, 28 | { 29 | Name: "state", 30 | Values: []string{"available"}, 31 | }, 32 | }, 33 | Owners: []string{"099720109477"}, // Canonical's AWS ID 34 | MostRecent: pulumi.BoolRef(true), 35 | }) 36 | if err != nil { 37 | log.Fatalf("Error fetching AMI: %v", err) 38 | } 39 | 40 | // Lookup the existing key pair 41 | keyPair, err := ec2.LookupKeyPair(ctx, &ec2.LookupKeyPairArgs{ 42 | KeyName: &keyPairName, 43 | }, nil) 44 | if err != nil { 45 | return fmt.Errorf("failed to find key pair: %w", err) 46 | } 47 | 48 | // Create a security group to allow SSH traffic 49 | secGroup, err := ec2.NewSecurityGroup(ctx, "videoTranscoderWorkerSecGroup", &ec2.SecurityGroupArgs{ 50 | Ingress: ec2.SecurityGroupIngressArray{ 51 | &ec2.SecurityGroupIngressArgs{ 52 | Protocol: pulumi.String("tcp"), 53 | FromPort: pulumi.Int(22), 54 | ToPort: pulumi.Int(22), 55 | CidrBlocks: pulumi.StringArray{pulumi.String("0.0.0.0/0")}, 56 | }, 57 | }, 58 | Egress: ec2.SecurityGroupEgressArray{ 59 | &ec2.SecurityGroupEgressArgs{ 60 | Protocol: pulumi.String("-1"), // Allow all traffic 61 | FromPort: pulumi.Int(0), 62 | ToPort: pulumi.Int(0), 63 | CidrBlocks: pulumi.StringArray{pulumi.String("0.0.0.0/0")}, 64 | }, 65 | }, 66 | }) 67 | if err != nil { 68 | return err 69 | } 70 | 71 | // Define user data script 72 | userData := `#!/bin/bash 73 | sudo apt update -y && sudo apt upgrade -y 74 | sudo apt install git -y 75 | git clone https://github.com/harsh082ip/Video-transcoder_Go` 76 | 77 | // Create the EC2 instance 78 | instance, err := ec2.NewInstance(ctx, "videoTranscoderWorker", &ec2.InstanceArgs{ 79 | InstanceType: pulumi.String("t2.micro"), 80 | Ami: pulumi.String(ami.Id), // Use ami.Id directly 81 | KeyName: pulumi.String(*keyPair.KeyName), 82 | SecurityGroups: pulumi.StringArray{secGroup.Name}, 83 | UserData: pulumi.String(userData), 84 | RootBlockDevice: &ec2.InstanceRootBlockDeviceArgs{ 85 | VolumeSize: pulumi.Int(8), 86 | VolumeType: pulumi.String("gp3"), 87 | }, 88 | Tags: pulumi.StringMap{ 89 | "Name": pulumi.String("video-transcoder-worker"), 90 | }, 91 | }) 92 | if err != nil { 93 | return err 94 | } 95 | 96 | // Export useful instance details 97 | ctx.Export("instancePublicIP", instance.PublicIp) 98 | ctx.Export("instancePublicDns", instance.PublicDns) 99 | 100 | return nil 101 | }) 102 | } 103 | -------------------------------------------------------------------------------- /pulumi/setup-ecr/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-ecr/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-ecr 2 | runtime: go 3 | description: Setup ECR for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-ecr/go.mod: -------------------------------------------------------------------------------- 1 | module setup-ecr 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-ecr/go.sum: -------------------------------------------------------------------------------- 1 | dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= 2 | dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= 3 | github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= 4 | github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= 5 | github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= 6 | github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= 7 | github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= 8 | github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= 9 | github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= 10 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= 11 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= 12 | github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= 13 | github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 14 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= 15 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= 16 | github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= 17 | github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= 18 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= 19 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 20 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= 21 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 22 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= 23 | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= 24 | github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= 25 | github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= 26 | github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= 27 | github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= 28 | github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= 29 | github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= 30 | github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= 31 | github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= 32 | github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= 33 | github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= 34 | github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= 35 | github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= 36 | github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= 37 | github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= 38 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= 39 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= 40 | github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 41 | github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= 42 | github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= 43 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 44 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 45 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 46 | github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= 47 | github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= 48 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= 49 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= 50 | github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= 51 | github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= 52 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 53 | github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= 54 | github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 55 | github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= 56 | github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= 57 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= 58 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= 59 | github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= 60 | github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= 61 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= 62 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= 63 | github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= 64 | github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= 65 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 66 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 67 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 68 | github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= 69 | github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= 70 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= 71 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 72 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 73 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 74 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 75 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 76 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 77 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 78 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= 79 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= 80 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 81 | github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= 82 | github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 83 | github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= 84 | github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= 85 | github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= 86 | github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= 87 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 88 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 89 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= 90 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= 91 | github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= 92 | github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 93 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 94 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 95 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 96 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 97 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 98 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 99 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 100 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 101 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 102 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 103 | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 104 | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 105 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 106 | github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= 107 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 108 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 109 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 110 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= 111 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 112 | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= 113 | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= 114 | github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 115 | github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= 116 | github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= 117 | github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 118 | github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= 119 | github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= 120 | github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= 121 | github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= 122 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= 123 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= 124 | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= 125 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 126 | github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= 127 | github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= 128 | github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= 129 | github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= 130 | github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= 131 | github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= 132 | github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= 133 | github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= 134 | github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 135 | github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= 136 | github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= 137 | github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU= 138 | github.com/pgavlin/fx v0.1.6/go.mod h1:KWZJ6fqBBSh8GxHYqwYCf3rYE7Gp2p0N8tJp8xv9u9M= 139 | github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= 140 | github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= 141 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 142 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 143 | github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= 144 | github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= 145 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 146 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 147 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= 148 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= 149 | github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= 150 | github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= 151 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 h1:U0Z6dagxFsOhV9J16aAjIfEZJf7NU+L9l9aGABQyrNs= 152 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1/go.mod h1:OQXIshEv/eVOYyBPMHADSaLG+qDJKQqP8p9lBy7tkOA= 153 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 h1:ImIsukZ2ZIYQG94uWdSZl9dJjJTosQSTsOQTauTNX7U= 154 | github.com/pulumi/pulumi/sdk/v3 v3.117.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= 155 | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 156 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 157 | github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= 158 | github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 159 | github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= 160 | github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 161 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 162 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= 163 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= 164 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= 165 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= 166 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= 167 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= 168 | github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 169 | github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= 170 | github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= 171 | github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= 172 | github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= 173 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 174 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 175 | github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= 176 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 177 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 178 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 179 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 180 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 181 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 182 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 183 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 184 | github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= 185 | github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= 186 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= 187 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= 188 | github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= 189 | github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= 190 | github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= 191 | github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= 192 | github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= 193 | github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= 194 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 195 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 196 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 197 | github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= 198 | github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= 199 | go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= 200 | go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 201 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 202 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 203 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 204 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 205 | golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 206 | golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= 207 | golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= 208 | golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= 209 | golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= 210 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= 211 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 212 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 213 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 214 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 215 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 216 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 217 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 218 | golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= 219 | golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 220 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 221 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 222 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 223 | golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 224 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 225 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 226 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 227 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 228 | golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= 229 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 230 | golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 231 | golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= 232 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 233 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 234 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 235 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 236 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 237 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 238 | golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 239 | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 240 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 241 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 242 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 243 | golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 244 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 245 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 246 | golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 247 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 248 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 249 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 250 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 251 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 252 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 253 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 254 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 255 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 256 | golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 257 | golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 258 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 259 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 260 | golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= 261 | golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 262 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 263 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 264 | golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= 265 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 266 | golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= 267 | golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= 268 | golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 269 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 270 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 271 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 272 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 273 | golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 274 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 275 | golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 276 | golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= 277 | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 278 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 279 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 280 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 281 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 282 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 283 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 284 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 285 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 286 | golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= 287 | golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= 288 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 289 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 290 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 291 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 292 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= 293 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 294 | google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= 295 | google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 296 | google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= 297 | google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 298 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 299 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 300 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 301 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 302 | gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= 303 | gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 304 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 305 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 306 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 307 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 308 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 309 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 310 | lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= 311 | lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= 312 | pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= 313 | pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= 314 | -------------------------------------------------------------------------------- /pulumi/setup-ecr/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "os" 6 | 7 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" 8 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 9 | ) 10 | 11 | func main() { 12 | 13 | ecrRepositoryName := os.Getenv("ECR_REPOSITORY_NAME") 14 | if ecrRepositoryName == "" { 15 | log.Println("ECR_REPOSITORY_NAME cannot be empty") 16 | os.Exit(1) 17 | } 18 | 19 | pulumi.Run(func(ctx *pulumi.Context) error { 20 | _, err := ecr.NewRepository(ctx, ecrRepositoryName+"Repo", &ecr.RepositoryArgs{ 21 | Name: pulumi.String(ecrRepositoryName), 22 | ImageTagMutability: pulumi.String("MUTABLE"), 23 | EncryptionConfigurations: ecr.RepositoryEncryptionConfigurationArray{ 24 | &ecr.RepositoryEncryptionConfigurationArgs{ 25 | EncryptionType: pulumi.String("AES256"), 26 | }, 27 | }, 28 | }) 29 | if err != nil { 30 | return err 31 | } 32 | return nil 33 | }) 34 | } 35 | 36 | // error: deleting urn:pulumi:dev::setup-s3-temp::aws:s3/bucket:Bucket::test.harsh54323: 1 error occurred: 37 | // * error deleting S3 Bucket (test.harsh54323): BucketNotEmpty: The bucket you tried to delete is not empty 38 | // status code: 409, request id: CC9GQF7VYV0T3SE3, host id: U90fFbvxN/i0UIXBlewHvNTAdi54oNPTJdjw9YQFc/R6l4u8ufzqKva0IDqXMgp324Cx6VGtzxOEXbeEaT2L7Swy4+rmVryO 39 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-cluster/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-cluster/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-ecs-cluster 2 | runtime: go 3 | description: Setup ECS Cluster for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-cluster/go.mod: -------------------------------------------------------------------------------- 1 | module setup-ecs-cluster 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-cluster/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" 5 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 6 | ) 7 | 8 | func main() { 9 | pulumi.Run(func(ctx *pulumi.Context) error { 10 | // Create an ECS cluster 11 | cluster, err := ecs.NewCluster(ctx, "goCluster", &ecs.ClusterArgs{ 12 | Name: pulumi.String("go-Cluster"), 13 | }) 14 | if err != nil { 15 | return err 16 | } 17 | 18 | // Export the cluster ARN 19 | ctx.Export("clusterArn", cluster.Arn) 20 | 21 | return nil 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-task-definition/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-task-definition/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-ecs-task-definition 2 | runtime: go 3 | description: Setup ECS task definition for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-task-definition/go.mod: -------------------------------------------------------------------------------- 1 | module setup-ecs-task-definition 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-ecs-task-definition/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | 8 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" 9 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 10 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 11 | ) 12 | 13 | func main() { 14 | pulumi.Run(func(ctx *pulumi.Context) error { 15 | // Retrieve the image URI from environment variables 16 | imageURI := os.Getenv("IMAGE_URI") 17 | if imageURI == "" { 18 | log.Println("IMAGE_URI cannot be empty") 19 | os.Exit(1) 20 | } 21 | 22 | // Lookup ECS Task Execution Role 23 | executionRole, err := iam.LookupRole(ctx, &iam.LookupRoleArgs{ 24 | Name: "ecsTaskExecutionRole", 25 | }, nil) 26 | if err != nil { 27 | return fmt.Errorf("failed to get execution role: %w", err) 28 | } 29 | 30 | // Lookup ECS Task Role (can be same or different from execution role) 31 | taskRole, err := iam.LookupRole(ctx, &iam.LookupRoleArgs{ 32 | Name: "ecsTaskExecutionRole", 33 | }, nil) 34 | if err != nil { 35 | return fmt.Errorf("failed to get task role: %w", err) 36 | } 37 | 38 | // Define container configurations 39 | containerDef := fmt.Sprintf(`[ 40 | { 41 | "name": "ffmpeg-container", 42 | "image": "%s", 43 | "cpu": 1024, 44 | "memory": 3072, 45 | "memoryReservation": 1024, 46 | "essential": true, 47 | "portMappings": [ 48 | { 49 | "containerPort": 80, 50 | "hostPort": 80, 51 | "protocol": "tcp", 52 | "appProtocol": "http" 53 | } 54 | ], 55 | "logConfiguration": { 56 | "logDriver": "awslogs", 57 | "options": { 58 | "awslogs-group": "/ecs/go-task-v1", 59 | "awslogs-create-group": "true", 60 | "awslogs-region": "ap-south-1", 61 | "awslogs-stream-prefix": "ecs" 62 | } 63 | } 64 | } 65 | ]`, imageURI) 66 | 67 | // Create ECS Task Definition 68 | taskDefinition, err := ecs.NewTaskDefinition(ctx, "ecsTaskDefinition", &ecs.TaskDefinitionArgs{ 69 | Family: pulumi.String("go-task-v1"), 70 | Cpu: pulumi.String("1024"), // 1 vCPU 71 | Memory: pulumi.String("3072"), // 3 GB 72 | NetworkMode: pulumi.String("awsvpc"), 73 | RequiresCompatibilities: pulumi.StringArray{pulumi.String("FARGATE")}, 74 | RuntimePlatform: &ecs.TaskDefinitionRuntimePlatformArgs{ 75 | CpuArchitecture: pulumi.String("X86_64"), 76 | OperatingSystemFamily: pulumi.String("LINUX"), 77 | }, 78 | TaskRoleArn: pulumi.String(taskRole.Arn), 79 | ExecutionRoleArn: pulumi.String(executionRole.Arn), 80 | ContainerDefinitions: pulumi.String(containerDef), 81 | EphemeralStorage: &ecs.TaskDefinitionEphemeralStorageArgs{ 82 | SizeInGib: pulumi.Int(21), // Configurable ephemeral storage 83 | }, 84 | }) 85 | if err != nil { 86 | return fmt.Errorf("error creating ECS task definition: %w", err) 87 | } 88 | 89 | // Export the ARN of the task definition 90 | ctx.Export("taskDefinitionArn", taskDefinition.Arn) 91 | return nil 92 | }) 93 | } 94 | -------------------------------------------------------------------------------- /pulumi/setup-lambda/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-lambda/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-lamda 2 | runtime: go 3 | description: lambda function that triggers on s3 upload 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-lambda/go.mod: -------------------------------------------------------------------------------- 1 | module setup-lamda 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-lambda/go.sum: -------------------------------------------------------------------------------- 1 | dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= 2 | dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= 3 | github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= 4 | github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= 5 | github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= 6 | github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= 7 | github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= 8 | github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= 9 | github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= 10 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= 11 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= 12 | github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= 13 | github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 14 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= 15 | github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= 16 | github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= 17 | github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= 18 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= 19 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 20 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= 21 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 22 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= 23 | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= 24 | github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= 25 | github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= 26 | github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= 27 | github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= 28 | github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= 29 | github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= 30 | github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= 31 | github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= 32 | github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= 33 | github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= 34 | github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= 35 | github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= 36 | github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= 37 | github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= 38 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= 39 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= 40 | github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 41 | github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= 42 | github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= 43 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 44 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 45 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 46 | github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= 47 | github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= 48 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= 49 | github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= 50 | github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= 51 | github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= 52 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 53 | github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= 54 | github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 55 | github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= 56 | github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= 57 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= 58 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= 59 | github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= 60 | github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= 61 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= 62 | github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= 63 | github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= 64 | github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= 65 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 66 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 67 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 68 | github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= 69 | github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= 70 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= 71 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 72 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 73 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 74 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 75 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 76 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 77 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 78 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= 79 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= 80 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 81 | github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= 82 | github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 83 | github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= 84 | github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= 85 | github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= 86 | github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= 87 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 88 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 89 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= 90 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= 91 | github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= 92 | github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 93 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 94 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 95 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 96 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 97 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 98 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 99 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 100 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 101 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 102 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 103 | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 104 | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 105 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 106 | github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= 107 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 108 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 109 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 110 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= 111 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 112 | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= 113 | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= 114 | github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 115 | github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= 116 | github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= 117 | github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 118 | github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= 119 | github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= 120 | github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= 121 | github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= 122 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= 123 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= 124 | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= 125 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 126 | github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= 127 | github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= 128 | github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= 129 | github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= 130 | github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= 131 | github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= 132 | github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= 133 | github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= 134 | github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 135 | github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= 136 | github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= 137 | github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU= 138 | github.com/pgavlin/fx v0.1.6/go.mod h1:KWZJ6fqBBSh8GxHYqwYCf3rYE7Gp2p0N8tJp8xv9u9M= 139 | github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= 140 | github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= 141 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 142 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 143 | github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= 144 | github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= 145 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 146 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 147 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= 148 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= 149 | github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= 150 | github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= 151 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 h1:U0Z6dagxFsOhV9J16aAjIfEZJf7NU+L9l9aGABQyrNs= 152 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1/go.mod h1:OQXIshEv/eVOYyBPMHADSaLG+qDJKQqP8p9lBy7tkOA= 153 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 h1:ImIsukZ2ZIYQG94uWdSZl9dJjJTosQSTsOQTauTNX7U= 154 | github.com/pulumi/pulumi/sdk/v3 v3.117.0/go.mod h1:kNea72+FQk82OjZ3yEP4dl6nbAl2ngE8PDBc0iFAaHg= 155 | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 156 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 157 | github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= 158 | github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 159 | github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= 160 | github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 161 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 162 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= 163 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= 164 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= 165 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= 166 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= 167 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= 168 | github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 169 | github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= 170 | github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= 171 | github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= 172 | github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= 173 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 174 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 175 | github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= 176 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 177 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 178 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 179 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 180 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 181 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 182 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 183 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 184 | github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= 185 | github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= 186 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= 187 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= 188 | github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= 189 | github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= 190 | github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= 191 | github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= 192 | github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= 193 | github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= 194 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 195 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 196 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 197 | github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= 198 | github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= 199 | go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= 200 | go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 201 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 202 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 203 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 204 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 205 | golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 206 | golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= 207 | golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= 208 | golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= 209 | golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= 210 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= 211 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= 212 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 213 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 214 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 215 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 216 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 217 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 218 | golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= 219 | golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 220 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 221 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 222 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 223 | golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 224 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 225 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 226 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 227 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 228 | golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= 229 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 230 | golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 231 | golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= 232 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 233 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 234 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 235 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 236 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 237 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 238 | golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 239 | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 240 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 241 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 242 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 243 | golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 244 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 245 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 246 | golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 247 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 248 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 249 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 250 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 251 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 252 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 253 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 254 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 255 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 256 | golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 257 | golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 258 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 259 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 260 | golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= 261 | golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 262 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 263 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 264 | golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= 265 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 266 | golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= 267 | golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= 268 | golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 269 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 270 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 271 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 272 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 273 | golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 274 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 275 | golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 276 | golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= 277 | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 278 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 279 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 280 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 281 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 282 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 283 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 284 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 285 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 286 | golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= 287 | golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= 288 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 289 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 290 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 291 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 292 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= 293 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 294 | google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= 295 | google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 296 | google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= 297 | google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 298 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 299 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 300 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 301 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 302 | gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= 303 | gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 304 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 305 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 306 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 307 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 308 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 309 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 310 | lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= 311 | lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= 312 | pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= 313 | pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= 314 | -------------------------------------------------------------------------------- /pulumi/setup-lambda/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "os" 6 | 7 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 8 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda" 9 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 10 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 11 | ) 12 | 13 | func main() { 14 | pulumi.Run(func(ctx *pulumi.Context) error { 15 | 16 | // Define the temperory bucket 17 | tempBucketName := os.Getenv("TEMP_BUCKET_NAME") 18 | if tempBucketName == "" { 19 | log.Println("TEMP_BUCKET_NAME cannot be empty") 20 | os.Exit(1) 21 | } 22 | 23 | // Get the existing s3 bucket details 24 | bucket, err := s3.LookupBucket(ctx, &s3.LookupBucketArgs{ 25 | Bucket: tempBucketName, 26 | }, nil) 27 | if err != nil { 28 | return err 29 | } 30 | 31 | // Create an IAM role for the lambda function 32 | role, err := iam.NewRole(ctx, "lambdaRole", &iam.RoleArgs{ 33 | AssumeRolePolicy: pulumi.String(` 34 | { 35 | "Version": "2012-10-17", 36 | "Statement": [{ 37 | "Effect": "Allow", 38 | "Principal": { 39 | "Service": "lambda.amazonaws.com" 40 | }, 41 | "Action": "sts:AssumeRole" 42 | }] 43 | }`), 44 | }) 45 | if err != nil { 46 | return err 47 | } 48 | 49 | // Attach AWSLambdaBasicExecutionRole policy to the role 50 | _, err = iam.NewRolePolicyAttachment(ctx, "lambdaRoleAttachment", &iam.RolePolicyAttachmentArgs{ 51 | Role: role.Name, 52 | PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"), 53 | }) 54 | if err != nil { 55 | return err 56 | } 57 | 58 | // Create the Lambda function 59 | function, err := lambda.NewFunction(ctx, "goTestLambda", &lambda.FunctionArgs{ 60 | Code: pulumi.NewFileArchive("../../build/TriggerS3Upload/deployment.zip"), 61 | Runtime: pulumi.String("provided.al2"), // Amazon Linux 2023 uses provided.al2 runtime 62 | Architectures: pulumi.StringArray{ 63 | pulumi.String("arm64"), 64 | }, 65 | Handler: pulumi.String("hello.handler"), 66 | Role: role.Arn, 67 | Name: pulumi.String("go-test"), 68 | }) 69 | if err != nil { 70 | return err 71 | } 72 | 73 | // Grant invoke permissions for S3 to invoke the Lambda function 74 | _, err = lambda.NewPermission(ctx, "s3ToLambdaPermission", &lambda.PermissionArgs{ 75 | Action: pulumi.String("lambda:InvokeFunction"), 76 | Function: function.Name, 77 | Principal: pulumi.String("s3.amazonaws.com"), 78 | SourceArn: pulumi.String(bucket.Arn), 79 | }) 80 | if err != nil { 81 | return err 82 | } 83 | 84 | // Configure bucket notification to trigger Lambda function on object create events 85 | _, err = s3.NewBucketNotification(ctx, "bucketNotification", &s3.BucketNotificationArgs{ 86 | Bucket: pulumi.String(tempBucketName), 87 | LambdaFunctions: s3.BucketNotificationLambdaFunctionArray{ 88 | &s3.BucketNotificationLambdaFunctionArgs{ 89 | Events: pulumi.StringArray{ 90 | pulumi.String("s3:ObjectCreated:*"), 91 | }, 92 | LambdaFunctionArn: function.Arn, 93 | }, 94 | }, 95 | }) 96 | if err != nil { 97 | return err 98 | } 99 | 100 | // Export the function URL (assuming no qualifier is used): 101 | ctx.Export("functionArn", pulumi.Sprintf("%s", function.Arn)) 102 | 103 | return nil 104 | }) 105 | } 106 | -------------------------------------------------------------------------------- /pulumi/setup-s3-permanent/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-s3-permanent/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-s3-permanent 2 | runtime: go 3 | description: Setup permanent s3 bucket for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-s3-permanent/go.mod: -------------------------------------------------------------------------------- 1 | module setup-s3-permanent 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-s3-permanent/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | 8 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 9 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 10 | ) 11 | 12 | func main() { 13 | pulumi.Run(func(ctx *pulumi.Context) error { 14 | 15 | bucketName := os.Getenv("PERMANENT_BUCKET_NAME") 16 | if bucketName == "" { 17 | log.Println("PERMANENT_BUCKET_NAME cannot be empty") 18 | os.Exit(1) 19 | } 20 | log.Println("bucketname:", bucketName) 21 | 22 | // Create an S3 bucket with the specified name 23 | bucket, err := s3.NewBucket(ctx, bucketName, &s3.BucketArgs{ 24 | Acl: pulumi.String("private"), 25 | ServerSideEncryptionConfiguration: &s3.BucketServerSideEncryptionConfigurationArgs{ 26 | Rule: &s3.BucketServerSideEncryptionConfigurationRuleArgs{ 27 | ApplyServerSideEncryptionByDefault: &s3.BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{ 28 | SseAlgorithm: pulumi.String("AES256"), // Amazon S3 managed keys (SSE-S3) 29 | }, 30 | BucketKeyEnabled: pulumi.Bool(true), 31 | }, 32 | }, 33 | Bucket: pulumi.String(bucketName), 34 | }) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | // Disable block all public access 40 | publicAccessBlock, err := s3.NewBucketPublicAccessBlock(ctx, bucketName+"PublicAccessBlock", &s3.BucketPublicAccessBlockArgs{ 41 | Bucket: bucket.ID(), 42 | BlockPublicAcls: pulumi.Bool(false), 43 | IgnorePublicAcls: pulumi.Bool(false), 44 | BlockPublicPolicy: pulumi.Bool(false), 45 | RestrictPublicBuckets: pulumi.Bool(false), 46 | }) 47 | if err != nil { 48 | return err 49 | } 50 | 51 | // Use bucket.ID().ApplyT to dynamically access the bucket name 52 | bucket.ID().ApplyT(func(bucketID string) (string, error) { 53 | fmt.Println("bucketID: ", bucketID) 54 | // Attach the bucket policy 55 | bucketPolicy := fmt.Sprintf(`{ 56 | "Version": "2012-10-17", 57 | "Statement": [ 58 | { 59 | "Sid": "Stmt14055921390d0", 60 | "Effect": "Allow", 61 | "Principal": "*", 62 | "Action": "s3:*", 63 | "Resource": [ 64 | "arn:aws:s3:::%s", 65 | "arn:aws:s3:::%s/*" 66 | ] 67 | } 68 | ] 69 | }`, bucketID, bucketID) 70 | 71 | _, err = s3.NewBucketPolicy(ctx, bucketName+"Policy", &s3.BucketPolicyArgs{ 72 | Bucket: pulumi.String(bucketID), // Use the bucketID string 73 | Policy: pulumi.String(bucketPolicy), 74 | }, pulumi.DependsOn([]pulumi.Resource{publicAccessBlock})) 75 | if err != nil { 76 | return "", err 77 | } 78 | return bucketID, nil 79 | }) 80 | 81 | ctx.Export("bucketName", bucket.Bucket) 82 | return nil 83 | }) 84 | } 85 | -------------------------------------------------------------------------------- /pulumi/setup-s3-temp/Pulumi.dev.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: "eu-west-1" 3 | -------------------------------------------------------------------------------- /pulumi/setup-s3-temp/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: setup-s3-temp 2 | runtime: go 3 | description: Setup temporary s3 bucket for this project 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: aws-go 8 | -------------------------------------------------------------------------------- /pulumi/setup-s3-temp/go.mod: -------------------------------------------------------------------------------- 1 | module setup-s3-temp 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.4 6 | 7 | require ( 8 | github.com/pulumi/pulumi-aws/sdk/v6 v6.37.1 9 | github.com/pulumi/pulumi/sdk/v3 v3.117.0 10 | ) 11 | 12 | require ( 13 | dario.cat/mergo v1.0.0 // indirect 14 | github.com/Microsoft/go-winio v0.6.1 // indirect 15 | github.com/ProtonMail/go-crypto v1.0.0 // indirect 16 | github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect 17 | github.com/agext/levenshtein v1.2.3 // indirect 18 | github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect 19 | github.com/atotto/clipboard v0.1.4 // indirect 20 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 21 | github.com/blang/semver v3.5.1+incompatible // indirect 22 | github.com/charmbracelet/bubbles v0.16.1 // indirect 23 | github.com/charmbracelet/bubbletea v0.24.2 // indirect 24 | github.com/charmbracelet/lipgloss v0.7.1 // indirect 25 | github.com/cheggaaa/pb v1.0.29 // indirect 26 | github.com/cloudflare/circl v1.3.7 // indirect 27 | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect 28 | github.com/cyphar/filepath-securejoin v0.2.4 // indirect 29 | github.com/djherbis/times v1.5.0 // indirect 30 | github.com/emirpasic/gods v1.18.1 // indirect 31 | github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect 32 | github.com/go-git/go-billy/v5 v5.5.0 // indirect 33 | github.com/go-git/go-git/v5 v5.12.0 // indirect 34 | github.com/gogo/protobuf v1.3.2 // indirect 35 | github.com/golang/glog v1.2.0 // indirect 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 37 | github.com/google/uuid v1.6.0 // indirect 38 | github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect 39 | github.com/hashicorp/errwrap v1.1.0 // indirect 40 | github.com/hashicorp/go-multierror v1.1.1 // indirect 41 | github.com/hashicorp/hcl/v2 v2.17.0 // indirect 42 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 43 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect 44 | github.com/kevinburke/ssh_config v1.2.0 // indirect 45 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 46 | github.com/mattn/go-isatty v0.0.19 // indirect 47 | github.com/mattn/go-localereader v0.0.1 // indirect 48 | github.com/mattn/go-runewidth v0.0.15 // indirect 49 | github.com/mitchellh/go-ps v1.0.0 // indirect 50 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 51 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 52 | github.com/muesli/cancelreader v0.2.2 // indirect 53 | github.com/muesli/reflow v0.3.0 // indirect 54 | github.com/muesli/termenv v0.15.2 // indirect 55 | github.com/opentracing/basictracer-go v1.1.0 // indirect 56 | github.com/opentracing/opentracing-go v1.2.0 // indirect 57 | github.com/pgavlin/fx v0.1.6 // indirect 58 | github.com/pjbgf/sha1cd v0.3.0 // indirect 59 | github.com/pkg/errors v0.9.1 // indirect 60 | github.com/pkg/term v1.1.0 // indirect 61 | github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect 62 | github.com/pulumi/esc v0.6.2 // indirect 63 | github.com/rivo/uniseg v0.4.4 // indirect 64 | github.com/rogpeppe/go-internal v1.11.0 // indirect 65 | github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect 66 | github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect 67 | github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect 68 | github.com/skeema/knownhosts v1.2.2 // indirect 69 | github.com/spf13/cobra v1.7.0 // indirect 70 | github.com/spf13/pflag v1.0.5 // indirect 71 | github.com/texttheater/golang-levenshtein v1.0.1 // indirect 72 | github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect 73 | github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect 74 | github.com/uber/jaeger-lib v2.4.1+incompatible // indirect 75 | github.com/xanzy/ssh-agent v0.3.3 // indirect 76 | github.com/zclconf/go-cty v1.13.2 // indirect 77 | go.uber.org/atomic v1.9.0 // indirect 78 | golang.org/x/crypto v0.23.0 // indirect 79 | golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect 80 | golang.org/x/mod v0.14.0 // indirect 81 | golang.org/x/net v0.25.0 // indirect 82 | golang.org/x/sync v0.6.0 // indirect 83 | golang.org/x/sys v0.20.0 // indirect 84 | golang.org/x/term v0.20.0 // indirect 85 | golang.org/x/text v0.15.0 // indirect 86 | golang.org/x/tools v0.15.0 // indirect 87 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect 88 | google.golang.org/grpc v1.63.2 // indirect 89 | google.golang.org/protobuf v1.34.0 // indirect 90 | gopkg.in/warnings.v0 v0.1.2 // indirect 91 | gopkg.in/yaml.v3 v3.0.1 // indirect 92 | lukechampine.com/frand v1.4.2 // indirect 93 | ) 94 | -------------------------------------------------------------------------------- /pulumi/setup-s3-temp/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | 8 | "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 9 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 10 | ) 11 | 12 | func main() { 13 | pulumi.Run(func(ctx *pulumi.Context) error { 14 | 15 | bucketName := os.Getenv("TEMP_BUCKET_NAME") 16 | if bucketName == "" { 17 | log.Println("TEMP_BUCKET_NAME cannot be empty") 18 | os.Exit(1) 19 | } 20 | log.Println("bucketname:", bucketName) 21 | 22 | // Create an S3 bucket with the specified name 23 | bucket, err := s3.NewBucket(ctx, bucketName, &s3.BucketArgs{ 24 | Acl: pulumi.String("private"), 25 | ServerSideEncryptionConfiguration: &s3.BucketServerSideEncryptionConfigurationArgs{ 26 | Rule: &s3.BucketServerSideEncryptionConfigurationRuleArgs{ 27 | ApplyServerSideEncryptionByDefault: &s3.BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{ 28 | SseAlgorithm: pulumi.String("AES256"), // Amazon S3 managed keys (SSE-S3) 29 | }, 30 | BucketKeyEnabled: pulumi.Bool(true), 31 | }, 32 | }, 33 | Bucket: pulumi.String(bucketName), 34 | }) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | // Disable block all public access 40 | publicAccessBlock, err := s3.NewBucketPublicAccessBlock(ctx, bucketName+"PublicAccessBlock", &s3.BucketPublicAccessBlockArgs{ 41 | Bucket: bucket.ID(), 42 | BlockPublicAcls: pulumi.Bool(false), 43 | IgnorePublicAcls: pulumi.Bool(false), 44 | BlockPublicPolicy: pulumi.Bool(false), 45 | RestrictPublicBuckets: pulumi.Bool(false), 46 | }) 47 | if err != nil { 48 | return err 49 | } 50 | 51 | // Use bucket.ID().ApplyT to dynamically access the bucket name 52 | bucket.ID().ApplyT(func(bucketID string) (string, error) { 53 | fmt.Println("bucketID: ", bucketID) 54 | 55 | // Define the bucket policy 56 | bucketPolicy := fmt.Sprintf(`{ 57 | "Version": "2012-10-17", 58 | "Statement": [ 59 | { 60 | "Sid": "Stmt14055921390d0", 61 | "Effect": "Allow", 62 | "Principal": "*", 63 | "Action": "s3:*", 64 | "Resource": [ 65 | "arn:aws:s3:::%s", 66 | "arn:aws:s3:::%s/*" 67 | ] 68 | } 69 | ] 70 | }`, bucketID, bucketID) 71 | 72 | /* 73 | I added a dependency between the BucketPolicy and the BucketPublicAccessBlock. 74 | This ensures that the public access block is fully disabled before attempting 75 | to apply the bucket policy. This is important because public policies are 76 | blocked if the BlockPublicPolicy setting is enabled. 77 | */ 78 | 79 | // Attach the bucket policy with a dependency on the public access block setting 80 | _, err = s3.NewBucketPolicy(ctx, bucketName+"Policy", &s3.BucketPolicyArgs{ 81 | Bucket: pulumi.String(bucketID), // Use the bucketID string 82 | Policy: pulumi.String(bucketPolicy), 83 | }, pulumi.DependsOn([]pulumi.Resource{publicAccessBlock})) 84 | if err != nil { 85 | return "", err 86 | } 87 | return bucketID, nil 88 | }) 89 | 90 | // Export the bucket name 91 | ctx.Export("bucketName", bucket.Bucket) 92 | return nil 93 | }) 94 | } 95 | -------------------------------------------------------------------------------- /routes/authRoutes.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | authcontroller "github.com/harsh082ip/Video-transcoder_Go/controllers/authController" 6 | ) 7 | 8 | func AuthRoutes(incomingRoutes *gin.Engine) { 9 | incomingRoutes.POST("/auth/signup", authcontroller.SignUp) 10 | incomingRoutes.POST("/auth/login", authcontroller.Login) 11 | } 12 | -------------------------------------------------------------------------------- /routes/s3Routes.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | s3controller "github.com/harsh082ip/Video-transcoder_Go/controllers/s3Controller" 6 | "github.com/harsh082ip/Video-transcoder_Go/middleware" 7 | ) 8 | 9 | func S3Routes(incomingRoutes *gin.Engine) { 10 | incomingRoutes.POST("/videos/getpresignedurl", middleware.AuthMiddleware(), s3controller.PreSignedUrlToPutImage) 11 | } 12 | -------------------------------------------------------------------------------- /transcode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Function to convert HTTP URL to S3 URI 4 | function http_to_s3_uri { 5 | local http_url=$1 6 | # Extract the bucket name and key from the HTTP URL 7 | local bucket_name=$(echo "$http_url" | sed -e 's#https://s3\.[^.]*\.amazonaws\.com/##' | cut -d'/' -f1) 8 | local key=$(echo "$http_url" | sed -e 's#https://s3\.[^.]*\.amazonaws\.com/##' | cut -d'/' -f2-) 9 | echo "s3://${bucket_name}/${key}" 10 | } 11 | 12 | # Check if required environment variables are set 13 | if [ "$SOURCE_IMAGE" = "default" ] || [ "$DESTINATION_1080" = "default" ] || [ "$DESTINATION_720" = "default" ] || [ "$DESTINATION_360" = "default" ]; then 14 | echo "SOURCE_IMAGE, DESTINATION_1080, DESTINATION_720, and DESTINATION_360 environment variables must be set." 15 | exit 1 16 | fi 17 | 18 | # Transcode and upload functions 19 | function transcode_and_upload { 20 | local resolution=$1 21 | local destination_var="DESTINATION_$resolution" 22 | local destination=${!destination_var} 23 | 24 | # Determine scale dimensions based on aspect ratio 25 | scale_filter="scale='if(gt(iw,ih),-2,$resolution)':'if(gt(iw,ih),$resolution,-2)'" 26 | 27 | ffmpeg -i "$SOURCE_IMAGE" -vf "$scale_filter" -c:v libx264 -c:a aac -f mp4 -movflags frag_keyframe+empty_moov - | aws s3 cp - "$destination" 28 | } 29 | 30 | # Transcode to different resolutions and upload 31 | transcode_and_upload 1080 32 | transcode_and_upload 720 33 | transcode_and_upload 360 34 | 35 | # Convert HTTP URL to S3 URI and delete the source file from S3 36 | s3_uri=$(http_to_s3_uri "$SOURCE_IMAGE") 37 | echo "Attempting to delete: $s3_uri" # Debug statement 38 | 39 | # Manually decoding the key for verification 40 | decoded_key=$(echo "$s3_uri" | sed -e 's/%40/@/g') 41 | echo "Decoded Key: $decoded_key" 42 | 43 | # Try deleting using the decoded key 44 | delete_output=$(aws s3 rm "$decoded_key" 2>&1) 45 | echo "Delete Output: $delete_output" 46 | 47 | # Check if the deletion was successful 48 | delete_status=$? 49 | if [ $delete_status -eq 0 ]; then 50 | echo "Source file successfully deleted." 51 | else 52 | echo "Failed to delete source file. Reason: $delete_output" 53 | exit 1 54 | fi 55 | --------------------------------------------------------------------------------