21 lines
342 B
Go
21 lines
342 B
Go
package services
|
|
|
|
import (
|
|
"context"
|
|
|
|
laravel "go.laravel.com"
|
|
"go.laravel.com/config"
|
|
)
|
|
|
|
type Services struct {
|
|
Jeannie *JeannieClient
|
|
}
|
|
|
|
func New(env *config.Env, app *laravel.App) Services {
|
|
return Services{Jeannie: NewJeannieClientFromEnv()}
|
|
}
|
|
|
|
func From(ctx context.Context) *Services {
|
|
return laravel.ServicesOf[*Services](ctx)
|
|
}
|