Help us shape the future of Go! Take the 2026 Go Developer Survey

admin

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShemsAdd

func ShemsAdd(gdb *gorm.DB, name string) error

ShemsAdd generates a random 32-byte hex API key, stores its bcrypt hash, and prints the raw key once to stdout.

func ShemsAddOrUpdate

func ShemsAddOrUpdate(gdb *gorm.DB, name, key string) error

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

func ShemsRemove(gdb *gorm.DB, name string) error

ShemsRemove hard-deletes the shem with the given name.

func UsersAdd

func UsersAdd(gdb *gorm.DB, username string) error

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

func UsersAddOrUpdate(gdb *gorm.DB, username, password string) error

UsersAddOrUpdate creates a user with the given username and password, or updates the password hash if the user already exists.

func UsersRemove

func UsersRemove(gdb *gorm.DB, username string) error

UsersRemove hard-deletes the user with the given username.

Types

This section is empty.

Jump to

Keyboard shortcuts

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