FEAT: Media Convert + s3 Integration
This commit is contained in:
+13
-1
@@ -10,6 +10,7 @@ import (
|
||||
"thamanyah/cms/v2/internal/services"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/mediaconvert"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
)
|
||||
|
||||
@@ -19,11 +20,22 @@ func main() {
|
||||
panic(fmt.Errorf("failed To Load S3 Config: %s", err))
|
||||
}
|
||||
|
||||
services.S3Client = &services.S3Concrete{
|
||||
concreteS3Client := &services.S3Concrete{
|
||||
S3Client: s3.NewFromConfig(config),
|
||||
Bucket: "",
|
||||
}
|
||||
|
||||
concreteS3Client.AssertSuccessfulConnection(context.Background())
|
||||
|
||||
services.S3Client = concreteS3Client
|
||||
|
||||
services.MediaConvertClient = &services.MediaConvertConcrete{
|
||||
MediaConvertClient: mediaconvert.NewFromConfig(config),
|
||||
Role: "",
|
||||
InputBucket: "",
|
||||
OutputBucket: "",
|
||||
}
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
|
||||
Reference in New Issue
Block a user