Refactor du projet réduire le nombre de packages et sous-dossiers #200

Merged
vlbeaudoin merged 15 commits from vlbeaudoin/rework/single-package into main 2024-08-22 13:42:33 -04:00 AGit
Showing only changes of commit 469f7c0458 - Show all commits

View file

@ -1,4 +1,4 @@
package media
package main
import (
"context"
@ -8,7 +8,6 @@ import (
"mime/multipart"
"net/http"
"git.agecem.com/agecem/agecem-org/config"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/spf13/viper"
@ -37,7 +36,7 @@ func NewMediaClient(endpoint, accessKeyId, secretAccessKey string, useSSL bool)
}
func NewMediaClientFromViper() (*MediaClient, error) {
var cfg config.Config
var cfg Config
if err := viper.Unmarshal(&cfg); err != nil {
return nil, err
}
@ -55,7 +54,7 @@ type MediaClient struct {
}
func (m *MediaClient) Seed() ([]string, error) {
var cfg config.Config
var cfg Config
if err := viper.Unmarshal(&cfg); err != nil {
return nil, err
}