Documentation
¶
Overview ¶
Package clihelp is a small helper used by the cmd/perms, cmd/roles, and cmd/abilities seeding CLIs to dial Postgres, build an *authkit.Auth, and share argument-parsing scaffolding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DSNFlag ¶
DSNFlag returns a flag.FlagSet pre-populated with --dsn. Callers add their own flags and call Parse on it.
func Dial ¶
Dial opens a database connection using either the supplied DSN or the AUTHKIT_DATABASE_URL env var, then constructs an *authkit.Auth ready to run seed operations. Migrations and schema verification both run as part of New.
The CLIs never sign JWTs or hash passwords, but Auth.New requires a JWT secret and a hasher — we supply a dummy secret and the default Argon2id hasher so the constructor passes.
Types ¶
This section is empty.