Documentation ¶
Index ¶
- type AccessReq
- type Storage
- func (s *Storage) AccessGranted(patient, to string) (bool, error)
- func (s *Storage) CheckAccountExists(account string) bool
- func (s *Storage) CheckAccountKey(account, key string) (bool, error)
- func (s *Storage) CreateAccount(account, keyStr string) error
- func (s *Storage) DeployContract() error
- func (s *Storage) GrantAccess(to string) error
- func (s *Storage) ImportKey(prkey string) (*ecc.PrivateKey, error)
- func (s *Storage) ListConnected(patient string) ([]string, error)
- func (s *Storage) NewKey() error
- func (s *Storage) RevokeAccess(to string) error
- func (s *Storage) SignByte(data []byte) (string, error)
- func (s *Storage) SignHash(data []byte) (string, error)
- type TableEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessReq ¶
type AccessReq struct { Patient eos.AccountName `json:"patient"` Account eos.AccountName `json:"account"` }
AccessReq contains fields needed in sending access-contract related actions
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) AccessGranted ¶
AccessGranted checks if connection between `patient` and `to` is establisehd return true if connection is established and false if it is not Due to uint32 limitations this functions allows connection for up to 4294967295 doctors to a single client
func (*Storage) CheckAccountExists ¶
func (*Storage) CheckAccountKey ¶
CheckAccountKey checks if the key is authority of account
func (*Storage) CreateAccount ¶
CreateAccount creates account named `account` using key `keyStr`
func (*Storage) DeployContract ¶
DeployContract pushes contract located in contract/eos to blockchain under name specified in config
func (*Storage) GrantAccess ¶
GrantAccess adds `to` field in contract table
func (*Storage) ImportKey ¶
func (s *Storage) ImportKey(prkey string) (*ecc.PrivateKey, error)
ImportKey imports private key returns privatekey struct or error
func (*Storage) RevokeAccess ¶
RevokeAccess changes isEnabled field in table to 0
type TableEntry ¶
type TableEntry struct {
AccountName string `json:"account_name"`
}