s3-share/internal/s3Share.go
2022-05-09 14:52:18 +02:00

35 lines
697 B
Go

package s3share
import (
"git.kapelle.org/niklas/s3share/internal/client"
"git.kapelle.org/niklas/s3share/internal/db"
"git.kapelle.org/niklas/s3share/internal/s3"
"git.kapelle.org/niklas/s3share/internal/web"
)
func Start() {
db, err := db.NewSqlLiteDB("foo.db")
if err != nil {
panic(err)
}
s3Client, err := s3.NewMinio("localhost:9000", "testo", "testo", "hunter22", false)
if err != nil {
panic(err)
}
client := client.NewClient(db, s3Client)
// share, err := client.CreateShare(context.Background(), "/go.mod")
// if err != nil {
// panic(err)
// }
// logrus.Info(share.Slug)
err = web.StartWebserver("localhost:8080", *client)
if err != nil {
panic(err)
}
}