aboutsummaryrefslogtreecommitdiff
path: root/config_test.go
AgeCommit message (Collapse)Author
2024-03-26all: replace module "share" with "pakakeh.go"Shulhan
The "share" module has been moved to moved from github, to sourcehut.
2024-01-28all: make the path to private key staticShulhan
Instead of prompting user, make the private key static, located at "$XDG_CONFIG_DIR/gotp/gotp.key". Implements: https://todo.sr.ht/~shulhan/gotp/1
2023-10-06all: unfold private key path before readingShulhan
By unfolding, user can set the path to private key using "~" that points to their home. This make the key can works across home directory, in case user have multiple homes (Linux and macOS have different home path and maybe user name, but both can use "~" as substitution for $HOME)
2023-05-15all: group the key for testing into testdata/keysShulhan
2023-05-15all: load the private key in loadConfigShulhan
This changes require the loadPrivateKey method detached from Cli and become function.
2023-05-15all: add function loadConfigShulhan
The loadConfig load the configuration from raw bytes. This replace part of newConfig with loadConfig to minimize duplicate. The idea of loadConfig is to simplify testing later.
2022-08-07all: clean up codeShulhan
Changes, * Replace variable declaration ":=" using explicit one * Use raw string literal whenever possible * Realign struct Config from 56 to 40 bytes (-16 bytes) * Realign struct Issuer from 88 to 72 bytes (-16 bytes)
2022-03-14all: re-licensing gotp under GPL-3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-10-27gotp: command line interface for Time-based One Time Password (TOTP)Shulhan
The gotp currently has the following features, * add: add new TOTP issuer with their label and secret * gen: generate password * import: import TOTP from other provider, currently support Aegis * list: print all registered TOTP configuration by labels * remove: delete a TOTP configuration from file by label * rename: changes the TOTP configuration by its label