Files
phishingclub/backend/app/utils.go
2025-08-21 16:14:09 +02:00

24 lines
608 B
Go

package app
import (
"github.com/phishingclub/phishingclub/api"
"github.com/phishingclub/phishingclub/cli"
"github.com/phishingclub/phishingclub/password"
)
// Utilities is a collection of utils
type Utilities struct {
CLIOutputter cli.Outputter
PasswordHasher *password.Argon2Hasher
JSONResponseHandler api.JSONResponseHandler
}
// NewUtils creates a collection of utils
func NewUtils() *Utilities {
return &Utilities{
CLIOutputter: cli.NewCLIOutputter(),
PasswordHasher: password.NewHasherWithDefaultValues(),
JSONResponseHandler: api.NewJSONResponseHandler(),
}
}