Documentation ¶
Index ¶
- Variables
- func ByteSliceToByte2(x []byte) (rv [2]byte)
- func ByteSliceToByte32(x []byte) (rv [32]byte)
- func CheckUserIsValid(www http.ResponseWriter, req *http.Request, un, pw string) (user_id string, ok bool)
- func ConnectToEthereum() (err error)
- func DecryptKeyFile(keyFile, password string) (*keystore.Key, error)
- func DecryptKeyFileData(data, password string) (*keystore.Key, error)
- func HandleDeleteKey(www http.ResponseWriter, req *http.Request)
- func HandleKeyFile(www http.ResponseWriter, req *http.Request)
- func HandlePrivateKey(www http.ResponseWriter, req *http.Request)
- func HandleValidateKey(www http.ResponseWriter, req *http.Request)
- func RequiredParameters(www http.ResponseWriter, req *http.Request, plist ...interface{}) bool
- func Setup(dbf map[string]bool, lfp *os.File, ec *EthConfigData)
- func SetupMux(mux *ymux.ServeMux)
- func SetupRealm(r string)
- type EthConfigData
Constants ¶
This section is empty.
Variables ¶
var DbFlags map[string]bool
Functions ¶
func ByteSliceToByte2 ¶
func ByteSliceToByte32 ¶
func CheckUserIsValid ¶
func CheckUserIsValid(www http.ResponseWriter, req *http.Request, un, pw string) (user_id string, ok bool)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
func ConnectToEthereum ¶
func ConnectToEthereum() (err error)
func DecryptKeyFile ¶
DecryptKeyFile reads in a key file decrypt it with the password.
func DecryptKeyFileData ¶
DecryptKeyFileData takes keyfile data and decrypt it with the password.
func HandleDeleteKey ¶
func HandleDeleteKey(www http.ResponseWriter, req *http.Request)
------------------------------------------------------------------------------------------------------------------------------------------------------------- mux.Handle("/api/key/DeleteKey", http.HandlerFunc(HandleDeleteKey)).AuthRequired().DocTag("<h2>/api/key/DeleteKey").Method("DELETE").Inputs([]*ymux.MuxInput{
func HandleKeyFile ¶
func HandleKeyFile(www http.ResponseWriter, req *http.Request)
------------------------------------------------------------------------------------------------------------------------------------------------------------- {Name: "keyfile_password", Required: true, Label: "Password For Keyfile", MinLen: 1, Type: "s"},
func HandlePrivateKey ¶
func HandlePrivateKey(www http.ResponseWriter, req *http.Request)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
func HandleValidateKey ¶
func HandleValidateKey(www http.ResponseWriter, req *http.Request)
mux.Handle("/api/key/ValidateKey", http.HandlerFunc(HandleValidateKey)).AuthRequired().DocTag("<h2>/api/key/ValidateKey").Method("GET").Inputs([]*ymux.MuxInput{
func RequiredParameters ¶
func RequiredParameters(www http.ResponseWriter, req *http.Request, plist ...interface{}) bool
xyzzy - change params to have names/bool for this so can generate error messages.
func Setup ¶
func Setup(dbf map[string]bool, lfp *os.File, ec *EthConfigData)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
func SetupRealm ¶
func SetupRealm(r string)
Types ¶
type EthConfigData ¶
type EthConfigData struct { ymux.BaseConfigType URL_8545 string `json:"geth_rpc_8545" default:"http://127.0.0.1:7545"` // example: "http://192.168.0.200:8545". ContractAddress map[string]string `json:"ContractAddress"` // Contract names to contract addresses map FromAddress string `json:"FromAddress"` // Address of account to pull funds from - this is the signing account KeyFilePassword string `json:"key_file_password" default:"$ENV$Key_File_Password"` // Password to access KeyFile KeyFile string `json:"key_file" default:"$ENV$Key_File"` // File name for pub/priv key for Address UseEth string `json:"UseEth" default:"yes"` // Direclty call contract 'yes' Client *ethclient.Client `json:"-"` // used in secalling contract AccountKey *keystore.Key `json:"-"` }