commands

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(ctx context.Context, p *CreateUserParams) error

func Migrate

func Migrate(p *MigrateParams) error

Types

type CreateUserParams

type CreateUserParams struct {
	DSN             string
	Login           string
	Password        string // optional — resolved from env/stdin when empty
	Name            string
	Role            string
	Migrate         bool
	MigrationsTable string
	Stdin           io.Reader // used for password prompt/pipe; defaults to os.Stdin
}

CreateUserParams holds parameters for the create-user command. Password is optional at construction time: if empty it is resolved from the GOADMIN_PASSWORD environment variable or read interactively from Stdin.

func (*CreateUserParams) Validate

func (p *CreateUserParams) Validate() error

type MigrateParams

type MigrateParams struct {
	DSN             string
	MigrationsTable string
	Direction       string // "up" or "down"
}

func (*MigrateParams) Validate

func (p *MigrateParams) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL