HEAVY: finish music service migration, tidy up services, more tests
This commit is contained in:
parent
9e311df462
commit
90a671982c
47 changed files with 2698 additions and 902 deletions
13
main.go
13
main.go
|
|
@ -24,12 +24,16 @@ import (
|
|||
"arimelody-web/cursor"
|
||||
"arimelody-web/model"
|
||||
"arimelody-web/model/app"
|
||||
"arimelody-web/view"
|
||||
|
||||
accountRepo "arimelody-web/repository/account"
|
||||
logRepo "arimelody-web/repository/log"
|
||||
musicRepo "arimelody-web/repository/music"
|
||||
|
||||
repo "arimelody-web/repository/postgres"
|
||||
accountService "arimelody-web/service/account"
|
||||
logService "arimelody-web/service/log"
|
||||
"arimelody-web/view"
|
||||
musicService "arimelody-web/service/music"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/lib/pq"
|
||||
|
|
@ -47,6 +51,7 @@ var publicFS embed.FS
|
|||
|
||||
func main() {
|
||||
// TODO: switch to a new logger. this one kinda sucks
|
||||
// i'll be so forreal i might write my own
|
||||
logger := log.New(os.Stderr, "main", model.DEFAULT_LOG_FLAGS)
|
||||
|
||||
logger.Print("made with <3 by ari melody\n\n")
|
||||
|
|
@ -103,6 +108,12 @@ func main() {
|
|||
log.New(os.Stderr, "account-repo", model.DEFAULT_LOG_FLAGS),
|
||||
)
|
||||
|
||||
musicRepo := musicRepo.NewMusicRepositoryPostgres(psqlDB)
|
||||
app.MusicService = musicService.NewMusicService(
|
||||
musicRepo,
|
||||
log.New(os.Stderr, "music-repo", model.DEFAULT_LOG_FLAGS),
|
||||
)
|
||||
|
||||
// handle command arguments
|
||||
if len(os.Args) > 1 {
|
||||
arg := os.Args[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue