Documentation ¶
Index ¶
- func AuthenticatePatient(msg string, signature string) (string, error)
- func AuthenticateProvider(msg string, signature string) (string, error)
- func GetMedRecRemoteRPCConn() (*rpc.Client, string, error)
- func ListenandServe(router *mux.Router)
- type AddPermissionArgs
- type AddPermissionReply
- type ChangeAccountArgs
- type ChangeAccountReply
- type CheckPermissionArgs
- type CheckPermissionReply
- type GetPermissionsArgs
- type GetPermissionsReply
- type GetProviderAccountArgs
- type GetProviderAccountReply
- type MedRecRemote
- func (client *MedRecRemote) AddPermission(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
- func (client *MedRecRemote) ChangeAccount(r *http.Request, args *ChangeAccountArgs, reply *ChangeAccountReply) error
- func (client *MedRecRemote) CheckPermission(r *http.Request, args *CheckPermissionArgs, reply *CheckPermissionReply) error
- func (client *MedRecRemote) GetPermissions(r *http.Request, args *GetPermissionsArgs, reply *GetPermissionsReply) error
- func (client *MedRecRemote) GetProviderAccount(r *http.Request, args *GetProviderAccountArgs, reply *GetProviderAccountReply) error
- func (client *MedRecRemote) PatientDocuments(r *http.Request, args *PatientDocumentsArgs, reply *PatientDocumentsReply) error
- func (client *MedRecRemote) PatientFaucet(r *http.Request, args *PatientFaucetArgs, reply *PatientFaucetReply) error
- func (client *MedRecRemote) ProviderFaucet(r *http.Request, args *ProviderFaucetArgs, reply *ProviderFaucetReply) error
- func (client *MedRecRemote) RemovePermission(r *http.Request, args *RemovePermissionArgs, reply *RemovePermissionReply) error
- func (client *MedRecRemote) SetPermissionDuration(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
- func (client *MedRecRemote) SetPermissionStartTime(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
- type PatientDocumentsArgs
- type PatientDocumentsReply
- type PatientFaucetArgs
- type PatientFaucetReply
- type Permission
- type ProviderFaucetArgs
- type ProviderFaucetReply
- type RemovePermissionArgs
- type RemovePermissionReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticatePatient ¶
AuthenticateProvider verifies that the provided message was signed by a provider message is current time in seconds formatted as a string signature is the signature of the current time returns the patient account
func AuthenticateProvider ¶
AuthenticateProvider verifies that the provided message was signed by a provider message is current time in seconds formatted as a string signature is the signature of the current time returns provider account
func GetMedRecRemoteRPCConn ¶
GetMedRecRemoteRPCConn returns a connection to a random provider
Types ¶
type AddPermissionArgs ¶
type AddPermissionReply ¶
type AddPermissionReply struct {
Error string
}
type ChangeAccountArgs ¶
type ChangeAccountReply ¶
type ChangeAccountReply struct { }
type CheckPermissionArgs ¶
type CheckPermissionReply ¶
type GetPermissionsArgs ¶
type GetPermissionsReply ¶
type GetPermissionsReply struct { Permissions []Permission Error string }
type GetProviderAccountArgs ¶
type GetProviderAccountReply ¶
type GetProviderAccountReply struct {
Account string
}
type MedRecRemote ¶
type MedRecRemote struct { }
MedRecRemote interface for all the rpc methods
func (*MedRecRemote) AddPermission ¶
func (client *MedRecRemote) AddPermission(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
func (*MedRecRemote) ChangeAccount ¶
func (client *MedRecRemote) ChangeAccount(r *http.Request, args *ChangeAccountArgs, reply *ChangeAccountReply) error
ChangeAccount transfers the mapping from patient account to unique identifier to a different account
func (*MedRecRemote) CheckPermission ¶
func (client *MedRecRemote) CheckPermission(r *http.Request, args *CheckPermissionArgs, reply *CheckPermissionReply) error
utility function for checking the access permissions of a particular viewer
func (*MedRecRemote) GetPermissions ¶
func (client *MedRecRemote) GetPermissions(r *http.Request, args *GetPermissionsArgs, reply *GetPermissionsReply) error
func (*MedRecRemote) GetProviderAccount ¶
func (client *MedRecRemote) GetProviderAccount(r *http.Request, args *GetProviderAccountArgs, reply *GetProviderAccountReply) error
func (*MedRecRemote) PatientDocuments ¶
func (client *MedRecRemote) PatientDocuments(r *http.Request, args *PatientDocumentsArgs, reply *PatientDocumentsReply) error
returns a pointer to an sql database.
func (*MedRecRemote) PatientFaucet ¶
func (client *MedRecRemote) PatientFaucet(r *http.Request, args *PatientFaucetArgs, reply *PatientFaucetReply) error
PatientFaucet takes an ethereum account and gives it some ether Message and Signature should be from the patient Account should refer to the Provider's account that money should be sent from
func (*MedRecRemote) ProviderFaucet ¶
func (client *MedRecRemote) ProviderFaucet(r *http.Request, args *ProviderFaucetArgs, reply *ProviderFaucetReply) error
ProviderFaucet takes an ethereum account and gives it some ether The Message and Signature should be from the requesting provider The Account should be of the patient to whom funds should be sent
func (*MedRecRemote) RemovePermission ¶
func (client *MedRecRemote) RemovePermission(r *http.Request, args *RemovePermissionArgs, reply *RemovePermissionReply) error
func (*MedRecRemote) SetPermissionDuration ¶
func (client *MedRecRemote) SetPermissionDuration(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
func (*MedRecRemote) SetPermissionStartTime ¶
func (client *MedRecRemote) SetPermissionStartTime(r *http.Request, args *AddPermissionArgs, reply *AddPermissionReply) error
type PatientDocumentsArgs ¶
type PatientDocumentsReply ¶
type PatientFaucetArgs ¶
type PatientFaucetReply ¶
type Permission ¶
type ProviderFaucetArgs ¶
type ProviderFaucetReply ¶
type RemovePermissionArgs ¶
type RemovePermissionReply ¶
type RemovePermissionReply struct {
Error string
}