Documentation
¶
Overview ¶
Package auth stores multi-account JavDB credentials under ~/.javdb-cli/auth.json.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("account not found")
ErrNotFound is returned when an account lookup fails.
Functions ¶
Types ¶
type Account ¶
type Account struct {
UserID int64 `json:"user_id"`
Username string `json:"username"`
Password string `json:"password"`
Token string `json:"token"`
}
Account is one saved login (password stored by design).
type FileStore ¶
type FileStore struct {
Path string
// contains filtered or unexported fields
}
FileStore is a path-backed store with a mutex for CLI use.
type Store ¶
type Store struct {
DefaultUserID int64 `json:"default_user_id"`
Accounts []Account `json:"accounts"`
}
Store is the on-disk multi-account file.
func (*Store) UpdateToken ¶
UpdateToken replaces the token for an account.
Click to show internal directories.
Click to hide internal directories.