app/calendar/service.go

29 lines
856 B
Go
Raw Normal View History

2021-12-21 11:44:27 +00:00
package calendar
2021-12-21 16:00:23 +00:00
import (
"kumoly.io/kumoly/app/store"
"kumoly.io/kumoly/app/util"
)
2021-12-21 11:44:27 +00:00
type Service struct{}
func (srv Service) GetName() string { return "calendar.Service" }
2021-12-21 16:00:23 +00:00
func (srv Service) GetDependencies() []string { return []string{"server.Service"} }
2021-12-21 11:44:27 +00:00
func (srv Service) IsService() bool { return false }
func (srv Service) Main() error { return nil }
func (srv Service) Del() {}
func (srv Service) Health() error { return nil }
2021-12-21 16:00:23 +00:00
func (srv Service) Init() error {
l = util.Klog.With().Str("mod", "auth").Logger()
l.Debug().Msg("Migrating database for calendar.Service ...")
if err := store.Migrate(&Calendar{}, &EventGroup{}, &Event{}); err != nil {
l.Error().Err(err).Msg("Migrating database")
return err
}
return nil
}
func (srv Service) Load() error { return nil }