Documentation
¶
Index ¶
- Variables
- type AccountAdminPatch
- type AccountPatch
- type AccountRecoveryResponse
- type GetRecoveryCodeResponse
- type LoginForm
- type LoginResponse
- type MetaLockerHTTPCaller
- func (c *MetaLockerHTTPCaller) AdminGetAccountList() ([]account.Account, error)
- func (c *MetaLockerHTTPCaller) AdminPatchAccount(id string, patch AccountAdminPatch) error
- func (c *MetaLockerHTTPCaller) AdminStoreAccount(acc *account.Account) error
- func (c *MetaLockerHTTPCaller) AdminStoreIdentity(didDoc *model.DIDDocument) error
- func (c *MetaLockerHTTPCaller) AuthenticatedAccountID() string
- func (c *MetaLockerHTTPCaller) BlobManager() model.BlobManager
- func (c *MetaLockerHTTPCaller) Close() error
- func (c *MetaLockerHTTPCaller) CloseNotificationService() error
- func (c *MetaLockerHTTPCaller) ConnectionURL() string
- func (c *MetaLockerHTTPCaller) CreateAccessKey(key *model.AccessKey) (*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) CreateAccount(acct *account.Account, registrationCode string) error
- func (c *MetaLockerHTTPCaller) CreateDIDDocument(didDoc *model.DIDDocument) error
- func (c *MetaLockerHTTPCaller) CreateSubAccount(acct *account.Account) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) DIDProvider() model.DIDProvider
- func (c *MetaLockerHTTPCaller) DeleteAccessKey(keyID string) error
- func (c *MetaLockerHTTPCaller) DeleteAccount(id string) error
- func (c *MetaLockerHTTPCaller) DeleteProperty(hash string) error
- func (c *MetaLockerHTTPCaller) GetAccessKey(keyID string) (*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) GetAccount(id string) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) GetAccountRecoveryCode(username string) (string, error)
- func (c *MetaLockerHTTPCaller) GetAssetHead(headID string) (*model.Record, error)
- func (c *MetaLockerHTTPCaller) GetBlob(res *model.StoredResource, accessToken string) (io.ReadCloser, error)
- func (c *MetaLockerHTTPCaller) GetBlock(bn int64) (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetBlockRecords(bn int64) ([][]string, error)
- func (c *MetaLockerHTTPCaller) GetChain(startNumber int64, depth int) ([]*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetDIDDocument(id string) (*model.DIDDocument, error)
- func (c *MetaLockerHTTPCaller) GetDataAssetState(id string) (model.DataAssetState, error)
- func (c *MetaLockerHTTPCaller) GetGenesisBlock() (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetIdentity(hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetLocker(hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetOperation(opAddr string) ([]byte, error)
- func (c *MetaLockerHTTPCaller) GetOwnAccount() (*account.Account, error)
- func (c *MetaLockerHTTPCaller) GetProperty(hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetRecord(rid string) (*model.Record, error)
- func (c *MetaLockerHTTPCaller) GetRecordState(rid string) (*model.RecordState, error)
- func (c *MetaLockerHTTPCaller) GetServerControls() (*ServerControls, error)
- func (c *MetaLockerHTTPCaller) GetToken() string
- func (c *MetaLockerHTTPCaller) GetTopBlock() (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetVaultMap() (map[string]*model.VaultProperties, error)
- func (c *MetaLockerHTTPCaller) InitContextForwarding()
- func (c *MetaLockerHTTPCaller) Ledger() model.Ledger
- func (c *MetaLockerHTTPCaller) ListAccessKeys() ([]*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) ListDIDDocuments() ([]*model.DIDDocument, error)
- func (c *MetaLockerHTTPCaller) ListIdentities() ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListLockerHashes() ([]string, error)
- func (c *MetaLockerHTTPCaller) ListLockers() ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListProperties() ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListSubAccounts(id string) ([]*account.Account, error)
- func (c *MetaLockerHTTPCaller) LoginWithAccessKeys(apiKey, clientSecret string) error
- func (c *MetaLockerHTTPCaller) LoginWithAdminKeys(adminKey, adminSecret string) error
- func (c *MetaLockerHTTPCaller) LoginWithCredentials(email string, password string) error
- func (c *MetaLockerHTTPCaller) LoginWithJWT(jwtToken string) error
- func (c *MetaLockerHTTPCaller) Logout()
- func (c *MetaLockerHTTPCaller) NewInstance(email, passphrase string, isHash bool) (wallet.NodeClient, error)
- func (c *MetaLockerHTTPCaller) NotificationService() (notification.Service, error)
- func (c *MetaLockerHTTPCaller) OffChainStorage() model.OffChainStorage
- func (c *MetaLockerHTTPCaller) PatchAccount(...) error
- func (c *MetaLockerHTTPCaller) PurgeBlob(res *model.StoredResource) error
- func (c *MetaLockerHTTPCaller) PurgeOperation(opAddr string) error
- func (c *MetaLockerHTTPCaller) RecoverAccount(userID string, privKey ed25519.PrivateKey, recoveryCode, newPassphrase string) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) SecureClient() *httpsecure.Client
- func (c *MetaLockerHTTPCaller) SendBlob(data io.Reader, cleartext bool, vaultName string) (*model.StoredResource, error)
- func (c *MetaLockerHTTPCaller) SendOperation(opData []byte) (string, error)
- func (c *MetaLockerHTTPCaller) StoreIdentity(idy *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) StoreLocker(locker *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) StoreProperty(prop *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) SubAccountInstance(subAccountID string) (wallet.NodeClient, error)
- func (c *MetaLockerHTTPCaller) SubmitRecord(r *model.Record) error
- func (c *MetaLockerHTTPCaller) UpdateAccount(acc *account.Account) error
- type NewAccountForm
- type ProxyDocumentLoader
- type ServerControls
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAuthorised = errors.New("not authorised to perform operation") ErrLoginFailed = errors.New("login failed") )
Functions ¶
This section is empty.
Types ¶
type AccountAdminPatch ¶
type AccountAdminPatch struct {
State string `json:"state,omitempty"`
}
copied from admin package
type AccountPatch ¶
type AccountPatch struct { Email string `json:"email,omitempty"` OldEncryptedPassword string `json:"oldEncryptedPassword,omitempty"` NewEncryptedPassword string `json:"newEncryptedPassword,omitempty"` Name string `json:"name,omitempty"` GivenName string `json:"givenName,omitempty"` FamilyName string `json:"familyName,omitempty"` }
type AccountRecoveryResponse ¶
type GetRecoveryCodeResponse ¶
type GetRecoveryCodeResponse struct {
Code string `json:"code"`
}
type LoginResponse ¶
type MetaLockerHTTPCaller ¶
type MetaLockerHTTPCaller struct {
// contains filtered or unexported fields
}
func NewMetaLockerHTTPCaller ¶
func NewMetaLockerHTTPCaller(url string, userAgent string) (*MetaLockerHTTPCaller, error)
func (*MetaLockerHTTPCaller) AdminGetAccountList ¶
func (c *MetaLockerHTTPCaller) AdminGetAccountList() ([]account.Account, error)
func (*MetaLockerHTTPCaller) AdminPatchAccount ¶
func (c *MetaLockerHTTPCaller) AdminPatchAccount(id string, patch AccountAdminPatch) error
func (*MetaLockerHTTPCaller) AdminStoreAccount ¶
func (c *MetaLockerHTTPCaller) AdminStoreAccount(acc *account.Account) error
func (*MetaLockerHTTPCaller) AdminStoreIdentity ¶
func (c *MetaLockerHTTPCaller) AdminStoreIdentity(didDoc *model.DIDDocument) error
func (*MetaLockerHTTPCaller) AuthenticatedAccountID ¶
func (c *MetaLockerHTTPCaller) AuthenticatedAccountID() string
func (*MetaLockerHTTPCaller) BlobManager ¶
func (c *MetaLockerHTTPCaller) BlobManager() model.BlobManager
func (*MetaLockerHTTPCaller) Close ¶
func (c *MetaLockerHTTPCaller) Close() error
func (*MetaLockerHTTPCaller) CloseNotificationService ¶
func (c *MetaLockerHTTPCaller) CloseNotificationService() error
func (*MetaLockerHTTPCaller) ConnectionURL ¶
func (c *MetaLockerHTTPCaller) ConnectionURL() string
func (*MetaLockerHTTPCaller) CreateAccessKey ¶
func (*MetaLockerHTTPCaller) CreateAccount ¶
func (c *MetaLockerHTTPCaller) CreateAccount(acct *account.Account, registrationCode string) error
func (*MetaLockerHTTPCaller) CreateDIDDocument ¶
func (c *MetaLockerHTTPCaller) CreateDIDDocument(didDoc *model.DIDDocument) error
func (*MetaLockerHTTPCaller) CreateSubAccount ¶
func (*MetaLockerHTTPCaller) DIDProvider ¶
func (c *MetaLockerHTTPCaller) DIDProvider() model.DIDProvider
func (*MetaLockerHTTPCaller) DeleteAccessKey ¶
func (c *MetaLockerHTTPCaller) DeleteAccessKey(keyID string) error
func (*MetaLockerHTTPCaller) DeleteAccount ¶
func (c *MetaLockerHTTPCaller) DeleteAccount(id string) error
func (*MetaLockerHTTPCaller) DeleteProperty ¶
func (c *MetaLockerHTTPCaller) DeleteProperty(hash string) error
func (*MetaLockerHTTPCaller) GetAccessKey ¶
func (c *MetaLockerHTTPCaller) GetAccessKey(keyID string) (*model.AccessKey, error)
func (*MetaLockerHTTPCaller) GetAccount ¶
func (c *MetaLockerHTTPCaller) GetAccount(id string) (*account.Account, error)
func (*MetaLockerHTTPCaller) GetAccountRecoveryCode ¶
func (c *MetaLockerHTTPCaller) GetAccountRecoveryCode(username string) (string, error)
func (*MetaLockerHTTPCaller) GetAssetHead ¶
func (c *MetaLockerHTTPCaller) GetAssetHead(headID string) (*model.Record, error)
func (*MetaLockerHTTPCaller) GetBlob ¶
func (c *MetaLockerHTTPCaller) GetBlob(res *model.StoredResource, accessToken string) (io.ReadCloser, error)
func (*MetaLockerHTTPCaller) GetBlock ¶
func (c *MetaLockerHTTPCaller) GetBlock(bn int64) (*model.Block, error)
func (*MetaLockerHTTPCaller) GetBlockRecords ¶
func (c *MetaLockerHTTPCaller) GetBlockRecords(bn int64) ([][]string, error)
func (*MetaLockerHTTPCaller) GetDIDDocument ¶
func (c *MetaLockerHTTPCaller) GetDIDDocument(id string) (*model.DIDDocument, error)
func (*MetaLockerHTTPCaller) GetDataAssetState ¶
func (c *MetaLockerHTTPCaller) GetDataAssetState(id string) (model.DataAssetState, error)
func (*MetaLockerHTTPCaller) GetGenesisBlock ¶
func (c *MetaLockerHTTPCaller) GetGenesisBlock() (*model.Block, error)
func (*MetaLockerHTTPCaller) GetIdentity ¶
func (c *MetaLockerHTTPCaller) GetIdentity(hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetLocker ¶
func (c *MetaLockerHTTPCaller) GetLocker(hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetOperation ¶
func (c *MetaLockerHTTPCaller) GetOperation(opAddr string) ([]byte, error)
func (*MetaLockerHTTPCaller) GetOwnAccount ¶
func (c *MetaLockerHTTPCaller) GetOwnAccount() (*account.Account, error)
func (*MetaLockerHTTPCaller) GetProperty ¶
func (c *MetaLockerHTTPCaller) GetProperty(hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetRecord ¶
func (c *MetaLockerHTTPCaller) GetRecord(rid string) (*model.Record, error)
func (*MetaLockerHTTPCaller) GetRecordState ¶
func (c *MetaLockerHTTPCaller) GetRecordState(rid string) (*model.RecordState, error)
func (*MetaLockerHTTPCaller) GetServerControls ¶
func (c *MetaLockerHTTPCaller) GetServerControls() (*ServerControls, error)
func (*MetaLockerHTTPCaller) GetToken ¶
func (c *MetaLockerHTTPCaller) GetToken() string
func (*MetaLockerHTTPCaller) GetTopBlock ¶
func (c *MetaLockerHTTPCaller) GetTopBlock() (*model.Block, error)
func (*MetaLockerHTTPCaller) GetVaultMap ¶
func (c *MetaLockerHTTPCaller) GetVaultMap() (map[string]*model.VaultProperties, error)
func (*MetaLockerHTTPCaller) InitContextForwarding ¶
func (c *MetaLockerHTTPCaller) InitContextForwarding()
func (*MetaLockerHTTPCaller) Ledger ¶
func (c *MetaLockerHTTPCaller) Ledger() model.Ledger
func (*MetaLockerHTTPCaller) ListAccessKeys ¶
func (c *MetaLockerHTTPCaller) ListAccessKeys() ([]*model.AccessKey, error)
func (*MetaLockerHTTPCaller) ListDIDDocuments ¶
func (c *MetaLockerHTTPCaller) ListDIDDocuments() ([]*model.DIDDocument, error)
func (*MetaLockerHTTPCaller) ListIdentities ¶
func (c *MetaLockerHTTPCaller) ListIdentities() ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListLockerHashes ¶
func (c *MetaLockerHTTPCaller) ListLockerHashes() ([]string, error)
func (*MetaLockerHTTPCaller) ListLockers ¶
func (c *MetaLockerHTTPCaller) ListLockers() ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListProperties ¶
func (c *MetaLockerHTTPCaller) ListProperties() ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListSubAccounts ¶
func (c *MetaLockerHTTPCaller) ListSubAccounts(id string) ([]*account.Account, error)
func (*MetaLockerHTTPCaller) LoginWithAccessKeys ¶
func (c *MetaLockerHTTPCaller) LoginWithAccessKeys(apiKey, clientSecret string) error
func (*MetaLockerHTTPCaller) LoginWithAdminKeys ¶
func (c *MetaLockerHTTPCaller) LoginWithAdminKeys(adminKey, adminSecret string) error
func (*MetaLockerHTTPCaller) LoginWithCredentials ¶
func (c *MetaLockerHTTPCaller) LoginWithCredentials(email string, password string) error
func (*MetaLockerHTTPCaller) LoginWithJWT ¶
func (c *MetaLockerHTTPCaller) LoginWithJWT(jwtToken string) error
func (*MetaLockerHTTPCaller) Logout ¶
func (c *MetaLockerHTTPCaller) Logout()
Logout - clearing authorisation info
func (*MetaLockerHTTPCaller) NewInstance ¶
func (c *MetaLockerHTTPCaller) NewInstance(email, passphrase string, isHash bool) (wallet.NodeClient, error)
func (*MetaLockerHTTPCaller) NotificationService ¶
func (c *MetaLockerHTTPCaller) NotificationService() (notification.Service, error)
func (*MetaLockerHTTPCaller) OffChainStorage ¶
func (c *MetaLockerHTTPCaller) OffChainStorage() model.OffChainStorage
func (*MetaLockerHTTPCaller) PatchAccount ¶
func (c *MetaLockerHTTPCaller) PatchAccount(email, oldEncryptedPassword, newEncryptedPassword, name, givenName, familyName string) error
func (*MetaLockerHTTPCaller) PurgeBlob ¶
func (c *MetaLockerHTTPCaller) PurgeBlob(res *model.StoredResource) error
func (*MetaLockerHTTPCaller) PurgeOperation ¶
func (c *MetaLockerHTTPCaller) PurgeOperation(opAddr string) error
func (*MetaLockerHTTPCaller) RecoverAccount ¶
func (c *MetaLockerHTTPCaller) RecoverAccount(userID string, privKey ed25519.PrivateKey, recoveryCode, newPassphrase string) (*account.Account, error)
func (*MetaLockerHTTPCaller) SecureClient ¶
func (c *MetaLockerHTTPCaller) SecureClient() *httpsecure.Client
func (*MetaLockerHTTPCaller) SendBlob ¶
func (c *MetaLockerHTTPCaller) SendBlob(data io.Reader, cleartext bool, vaultName string) (*model.StoredResource, error)
func (*MetaLockerHTTPCaller) SendOperation ¶
func (c *MetaLockerHTTPCaller) SendOperation(opData []byte) (string, error)
func (*MetaLockerHTTPCaller) StoreIdentity ¶
func (c *MetaLockerHTTPCaller) StoreIdentity(idy *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) StoreLocker ¶
func (c *MetaLockerHTTPCaller) StoreLocker(locker *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) StoreProperty ¶
func (c *MetaLockerHTTPCaller) StoreProperty(prop *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) SubAccountInstance ¶
func (c *MetaLockerHTTPCaller) SubAccountInstance(subAccountID string) (wallet.NodeClient, error)
func (*MetaLockerHTTPCaller) SubmitRecord ¶
func (c *MetaLockerHTTPCaller) SubmitRecord(r *model.Record) error
func (*MetaLockerHTTPCaller) UpdateAccount ¶
func (c *MetaLockerHTTPCaller) UpdateAccount(acc *account.Account) error
type NewAccountForm ¶
type ProxyDocumentLoader ¶
type ProxyDocumentLoader struct {
// contains filtered or unexported fields
}
ProxyDocumentLoader redirects 'well-known' context URLs to the given URLs. This is useful for redirecting Piprate context calls to a MetaLocker instance.
func NewProxyDocumentLoader ¶
func NewProxyDocumentLoader(nextLoader ld.DocumentLoader, proxyMapping map[string]string) *ProxyDocumentLoader
NewProxyDocumentLoader creates a new instance of ProxyDocumentLoader.
func (*ProxyDocumentLoader) LoadDocument ¶
func (pdl *ProxyDocumentLoader) LoadDocument(u string) (*ld.RemoteDocument, error)
LoadDocument returns a RemoteDocument containing the contents of the JSON resource from the given URL.
Click to show internal directories.
Click to hide internal directories.