Documentation ¶
Index ¶
- Constants
- func ListenandServe(router *mux.Router)
- type AddAccountArgs
- type AddAccountReply
- type DeleteUserArgs
- type DeleteUserReply
- type GetKeystoreArgs
- type GetKeystoreReply
- type GetSeedArgs
- type GetSeedReply
- type GetUserDetailsReply
- type GetUsernamesReply
- type MedRecLocal
- func (client *MedRecLocal) AddAccount(r *http.Request, args *AddAccountArgs, reply *AddAccountReply) error
- func (client *MedRecLocal) DeleteUser(r *http.Request, args *DeleteUserArgs, reply *DeleteUserReply) error
- func (client *MedRecLocal) GetKeystore(r *http.Request, args *GetKeystoreArgs, reply *GetKeystoreReply) error
- func (client *MedRecLocal) GetSeed(r *http.Request, args *GetSeedArgs, reply *GetSeedReply) error
- func (client *MedRecLocal) GetUserDetails(r *http.Request, args *UserDetailsArgs, reply *GetUserDetailsReply) error
- func (client *MedRecLocal) GetUsernames(r *http.Request, args *common.NoArgs, reply *GetUsernamesReply) error
- func (client *MedRecLocal) NewUser(r *http.Request, args *NewUserArgs, reply *NewUserReply) error
- func (client *MedRecLocal) SaveKeystore(r *http.Request, args *SaveKeystoreArgs, reply *SaveKeystoreReply) error
- func (client *MedRecLocal) SetWalletPassword(r *http.Request, args *SetWalletPasswordArgs, reply *SetWalletPasswordReply) error
- type NewUserArgs
- type NewUserReply
- type SaveKeystoreArgs
- type SaveKeystoreReply
- type SetWalletPasswordArgs
- type SetWalletPasswordReply
- type UserDetailsArgs
Constants ¶
View Source
const ( ScryptSaltBytes = 8 ScryptN = 32768 ScryptR = 8 ScryptP = 1 ScryptKeyLen = 32 AesKeyLen = 32 PrivateKeyLen = 64 )
Scrypt values as recommended here: https://godoc.org/golang.org/x/crypto/scrypt
Variables ¶
This section is empty.
Functions ¶
func ListenandServe ¶
ListenandServe starts the local websocket listener
Types ¶
type AddAccountArgs ¶
type AddAccountReply ¶
type AddAccountReply struct { }
type DeleteUserArgs ¶
type DeleteUserReply ¶
type DeleteUserReply struct {
Error string
}
type GetKeystoreArgs ¶
type GetKeystoreArgs struct {
Username string
}
type GetKeystoreReply ¶
type GetKeystoreReply struct {
Keystore string
}
type GetSeedArgs ¶
type GetSeedReply ¶
type GetUserDetailsReply ¶
type GetUsernamesReply ¶
type MedRecLocal ¶
type MedRecLocal struct { }
MedRecLocal interface for all the rpc methods
func (*MedRecLocal) AddAccount ¶
func (client *MedRecLocal) AddAccount(r *http.Request, args *AddAccountArgs, reply *AddAccountReply) error
should add test to check that: unique ID is not a duplicate unique id matches an entry in the database
func (*MedRecLocal) DeleteUser ¶
func (client *MedRecLocal) DeleteUser(r *http.Request, args *DeleteUserArgs, reply *DeleteUserReply) error
DeleteUser retrieves a user's decrypts and retrives a user's private key
func (*MedRecLocal) GetKeystore ¶
func (client *MedRecLocal) GetKeystore(r *http.Request, args *GetKeystoreArgs, reply *GetKeystoreReply) error
func (*MedRecLocal) GetSeed ¶
func (client *MedRecLocal) GetSeed(r *http.Request, args *GetSeedArgs, reply *GetSeedReply) error
GetSeed ecrypts and retrives a user's private key seed
func (*MedRecLocal) GetUserDetails ¶
func (client *MedRecLocal) GetUserDetails(r *http.Request, args *UserDetailsArgs, reply *GetUserDetailsReply) error
GetUserDetails queries the sql databse for the list of local users
func (*MedRecLocal) GetUsernames ¶
func (client *MedRecLocal) GetUsernames(r *http.Request, args *common.NoArgs, reply *GetUsernamesReply) error
GetUsernames queries the sql databse for the list of local users
func (*MedRecLocal) NewUser ¶
func (client *MedRecLocal) NewUser(r *http.Request, args *NewUserArgs, reply *NewUserReply) error
NewUser adds a new user to the database
func (*MedRecLocal) SaveKeystore ¶
func (client *MedRecLocal) SaveKeystore(r *http.Request, args *SaveKeystoreArgs, reply *SaveKeystoreReply) error
TODO this should take a password and check the password matches
func (*MedRecLocal) SetWalletPassword ¶
func (client *MedRecLocal) SetWalletPassword(r *http.Request, args *SetWalletPasswordArgs, reply *SetWalletPasswordReply) error
type NewUserArgs ¶
type NewUserReply ¶
type NewUserReply struct {
Error string
}
type SaveKeystoreArgs ¶
type SaveKeystoreReply ¶
type SaveKeystoreReply struct { }
type SetWalletPasswordArgs ¶
type SetWalletPasswordArgs struct {
WalletPassword string //wallet password
}
type SetWalletPasswordReply ¶
type SetWalletPasswordReply struct { }
type UserDetailsArgs ¶
type UserDetailsArgs struct {
Username string
}
Click to show internal directories.
Click to hide internal directories.