-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
48 lines (37 loc) · 975 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* queueservice
*
* Video queue service
*
* API version: 0.0.1
* Contact: sbirudavolu@umass.edu
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package main
import (
"log"
"net/http"
openapi "github.com/Galactus-Player/queueservice/go"
)
type Config struct {
DbName string
DbPassword string
}
func main() {
log.Printf("Server started")
// config := Config{}
// err := gonfig.GetConf("./config.json", &config)
// if err != nil {
// log.Fatal(err)
// }
db, err := openapi.DbConnect("dockertest", "secret")
if err != nil {
log.Fatal(err)
}
DefaultApiService := openapi.NewDefaultApiService(db)
DefaultApiController := openapi.NewDefaultApiController(DefaultApiService)
QueueApiService := openapi.NewQueueApiService(db)
QueueApiController := openapi.NewQueueApiController(QueueApiService)
router := openapi.NewRouter(DefaultApiController, QueueApiController)
log.Fatal(http.ListenAndServe(":9090", router))
}