Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(name string, expiresAt *time.Time) (plaintext string, key *models.APIKey, err error)
GenerateKey creates a cryptographically random API key with a readable prefix. Returns the plaintext key (shown once) and a models.APIKey ready to persist. expiresAt is optional; pass nil for a non-expiring key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.