Documentation
¶
Index ¶
- func ShemsAdd(gdb *gorm.DB, name string) error
- func ShemsAddOrUpdate(gdb *gorm.DB, name, key string) error
- func ShemsRemove(gdb *gorm.DB, name string) error
- func UsersAdd(gdb *gorm.DB, username string) error
- func UsersAddOrUpdate(gdb *gorm.DB, username, password string) error
- func UsersRemove(gdb *gorm.DB, username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShemsAdd ¶
ShemsAdd generates a random 32-byte hex API key, stores its bcrypt hash, and prints the raw key once to stdout.
func ShemsAddOrUpdate ¶
ShemsAddOrUpdate creates a shem with the given name and API key, or updates its key hash if the shem already exists. Used for env-var-based auto-setup.
func ShemsRemove ¶
ShemsRemove hard-deletes the shem with the given name.
func UsersAdd ¶
UsersAdd prompts for a password (or reads GOLEM_ADMIN_PASSWORD), bcrypt-hashes it, and inserts a new User. The env var allows non-interactive use in Docker.
func UsersAddOrUpdate ¶
UsersAddOrUpdate creates a user with the given username and password, or updates the password hash if the user already exists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.