Documentation ¶
Index ¶
- Constants
- Variables
- func FatalCheck(err error)
- func InitWebAuthn(rpOrigin string) error
- func NewWebauthnUser(name string, displayName string) *webauthnUser
- func RouterHook(router *httprouter.Router, method string, path string, ...)
- func RouterInit(router *httprouter.Router)
- func Run(ctx context.Context, fs *embed.FS)
- func SendEmailToUser(title, email, content string) error
- func Str(data any) string
- func UserAfterWebAuthnLogin()
- func UserAuthVerify(w http.ResponseWriter, r *http.Request)
- func UserBindWallet(oldWallet, newWallet string) error
- func UserLoadWeb2Data(userID, webPublic, params string) (any, error)
- func UserSessionCheck(w http.ResponseWriter, r *http.Request) bool
- func UserStoreWeb2Data(userID, recoverID, encryptWeb2Data string) error
- func UserVerify(w http.ResponseWriter, r *http.Request) bool
- func WauthnBeginLogin(username, webAuthnKey string) (interface{}, error, string)
- func WauthnBeginRegister(username string) (interface{}, error, string)
- func WauthnClean(username string)
- func WauthnFinishLogin(username string, bufReader io.Reader) (interface{}, error, string)
- func WauthnFinishRegister(username, webAuthnKey string, bufReader io.Reader) (*webauthnUser, error, string)
- func WebAuthnBeginLogin(w http.ResponseWriter, r *http.Request)
- func WebAuthnBeginRegister(w http.ResponseWriter, r *http.Request)
- func WebAuthnFinishLogin(w http.ResponseWriter, r *http.Request)
- func WebAuthnFinishRegister(w http.ResponseWriter, r *http.Request)
- type Meta
- type User
- type Worker
Constants ¶
View Source
const ( C_Store_Sys = "sys" C_date_time = "2006-01-02 15:04:05" C_Url_host = "https://selfrscrypto.refitor.com" )
global const
View Source
const (
C_Store_User = "user"
)
Variables ¶
View Source
var ( UserSaveToStore func(key string, val any) error UserGetFromStore func(key string, ptrObject any) error )
View Source
var ( WebauthnSaveToStore func(key, encryptKey string, val any) error WebauthnGetFromStore func(key, decryptKey string, ptrObject any) error )
View Source
var (
DBPath = flag.String("dbpath", "./selfweb3.db", "--dbPath=./selfweb3.db")
)
flag
Functions ¶
func FatalCheck ¶
func FatalCheck(err error)
func InitWebAuthn ¶
func NewWebauthnUser ¶
NewUser creates and returns a new User
func RouterHook ¶
func RouterHook(router *httprouter.Router, method string, path string, handleFunc http.HandlerFunc, hookFuncs ...func(w http.ResponseWriter, r *http.Request) bool)
func RouterInit ¶
func RouterInit(router *httprouter.Router)
func SendEmailToUser ¶
func UserAfterWebAuthnLogin ¶
func UserAfterWebAuthnLogin()
func UserAuthVerify ¶
func UserAuthVerify(w http.ResponseWriter, r *http.Request)
func UserBindWallet ¶
func UserLoadWeb2Data ¶
func UserSessionCheck ¶
func UserSessionCheck(w http.ResponseWriter, r *http.Request) bool
func UserStoreWeb2Data ¶
func UserVerify ¶
func UserVerify(w http.ResponseWriter, r *http.Request) bool
func WauthnBeginLogin ¶
func WauthnBeginRegister ¶
webauthn handler
func WauthnClean ¶
func WauthnClean(username string)
func WauthnFinishLogin ¶
func WauthnFinishRegister ¶
func WebAuthnBeginLogin ¶
func WebAuthnBeginLogin(w http.ResponseWriter, r *http.Request)
func WebAuthnBeginRegister ¶
func WebAuthnBeginRegister(w http.ResponseWriter, r *http.Request)
====== webauthn ======
func WebAuthnFinishLogin ¶
func WebAuthnFinishLogin(w http.ResponseWriter, r *http.Request)
func WebAuthnFinishRegister ¶
func WebAuthnFinishRegister(w http.ResponseWriter, r *http.Request)
Types ¶
Click to show internal directories.
Click to hide internal directories.