Files
mayfly-go/server/internal/sys/application/application.go

26 lines
421 B
Go
Raw Normal View History

2022-09-09 18:26:08 +08:00
package application
import (
2024-01-21 22:52:20 +08:00
"mayfly-go/pkg/ioc"
)
2022-09-09 18:26:08 +08:00
func InitIoc() {
2026-02-01 13:35:23 +08:00
ioc.Register(new(accountAppImpl))
ioc.Register(new(roleAppImpl))
ioc.Register(new(configAppImpl))
ioc.Register(new(resourceAppImpl))
ioc.Register(new(syslogAppImpl))
2024-01-21 22:52:20 +08:00
}
2022-09-09 18:26:08 +08:00
func GetAccountApp() Account {
2026-01-05 20:07:17 +08:00
return ioc.Get[Account]()
2022-09-09 18:26:08 +08:00
}
func GetConfigApp() Config {
2026-01-05 20:07:17 +08:00
return ioc.Get[Config]()
2022-09-09 18:26:08 +08:00
}
func GetSyslogApp() Syslog {
2026-01-05 20:07:17 +08:00
return ioc.Get[Syslog]()
2022-09-09 18:26:08 +08:00
}