initial
This commit is contained in:
32
internal/consts.go
Normal file
32
internal/consts.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
`os`
|
||||
)
|
||||
|
||||
const (
|
||||
DefAddr string = "https://clandestine.r00t2.io/"
|
||||
VaultTokEnv string = "VAULT_TOKEN"
|
||||
CollNm string = "OTP"
|
||||
TgtMnt string = "totp_bts.work"
|
||||
// These attrs need to be added to new SecretService TOTP secrets
|
||||
// ~/.local/share/gnome-shell/extensions/totp@dkosmari.github.com/schemas/org.gnome.shell.extensions.totp.gschema.xml
|
||||
SsSchemaName string = "xdg:schema"
|
||||
SsSchemaVal string = "org.gnome.shell.extensions.totp" // also the gosecret.ItemType
|
||||
)
|
||||
|
||||
var (
|
||||
TermFd int = int(os.Stdin.Fd())
|
||||
)
|
||||
|
||||
var (
|
||||
/*
|
||||
These map from one form to the other using introspection.
|
||||
ext: The GNOME Shell extension, ~/.local/share/gnome-shell/extensions/totp@dkosmari.github.com/secretUtils.js (makeSchema())
|
||||
Also found at https://github.com/dkosmari/gnome-shell-extension-totp/blob/master/secretUtils.js#L33-L45
|
||||
vault: A https://pkg.go.dev/github.com/hashicorp/vault-client-go@/schema#TotpCreateKeyRequest
|
||||
(reading a key returns a map[string]interface{} for ...some reason)
|
||||
url: A https://pkg.go.dev/github.com/creachadair/otp/otpauth#URL
|
||||
*/
|
||||
// TODO?
|
||||
)
|
||||
Reference in New Issue
Block a user