Documentation ¶
Index ¶
- Variables
- type AccountAdminPatch
- type AccountPatch
- type AccountRecoveryResponse
- type GetRecoveryCodeResponse
- type LoginForm
- type LoginResponse
- type MetaLockerHTTPCaller
- func (c *MetaLockerHTTPCaller) AdminGetAccountList(ctx context.Context) ([]account.Account, error)
- func (c *MetaLockerHTTPCaller) AdminPatchAccount(ctx context.Context, id string, patch AccountAdminPatch) error
- func (c *MetaLockerHTTPCaller) AdminStoreAccount(ctx context.Context, acc *account.Account) error
- func (c *MetaLockerHTTPCaller) AdminStoreIdentity(ctx context.Context, 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(ctx context.Context, key *model.AccessKey) (*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) CreateAccount(ctx context.Context, acct *account.Account, registrationCode string) error
- func (c *MetaLockerHTTPCaller) CreateDIDDocument(ctx context.Context, didDoc *model.DIDDocument) error
- func (c *MetaLockerHTTPCaller) CreateSubAccount(ctx context.Context, acct *account.Account) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) DIDProvider() model.DIDProvider
- func (c *MetaLockerHTTPCaller) DeleteAccessKey(ctx context.Context, keyID string) error
- func (c *MetaLockerHTTPCaller) DeleteAccount(ctx context.Context, id string) error
- func (c *MetaLockerHTTPCaller) DeleteProperty(ctx context.Context, hash string) error
- func (c *MetaLockerHTTPCaller) GetAccessKey(ctx context.Context, keyID string) (*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) GetAccount(ctx context.Context, id string) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) GetAccountRecoveryCode(ctx context.Context, username string) (string, error)
- func (c *MetaLockerHTTPCaller) GetAssetHead(ctx context.Context, headID string) (*model.Record, error)
- func (c *MetaLockerHTTPCaller) GetBlob(ctx context.Context, res *model.StoredResource, accessToken string) (io.ReadCloser, error)
- func (c *MetaLockerHTTPCaller) GetBlock(ctx context.Context, bn int64) (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetBlockRecords(ctx context.Context, bn int64) ([][]string, error)
- func (c *MetaLockerHTTPCaller) GetChain(ctx context.Context, startNumber int64, depth int) ([]*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetDIDDocument(ctx context.Context, id string) (*model.DIDDocument, error)
- func (c *MetaLockerHTTPCaller) GetDataAssetState(ctx context.Context, id string) (model.DataAssetState, error)
- func (c *MetaLockerHTTPCaller) GetGenesisBlock(ctx context.Context) (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetIdentity(ctx context.Context, hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetLocker(ctx context.Context, hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetOperation(ctx context.Context, opAddr string) ([]byte, error)
- func (c *MetaLockerHTTPCaller) GetOwnAccount(ctx context.Context) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) GetProperty(ctx context.Context, hash string) (*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) GetRecord(ctx context.Context, rid string) (*model.Record, error)
- func (c *MetaLockerHTTPCaller) GetRecordState(ctx context.Context, rid string) (*model.RecordState, error)
- func (c *MetaLockerHTTPCaller) GetServerControls(ctx context.Context) (*ServerControls, error)
- func (c *MetaLockerHTTPCaller) GetToken() string
- func (c *MetaLockerHTTPCaller) GetTopBlock(ctx context.Context) (*model.Block, error)
- func (c *MetaLockerHTTPCaller) GetVaultMap(ctx context.Context) (map[string]*model.VaultProperties, error)
- func (c *MetaLockerHTTPCaller) InitContextForwarding()
- func (c *MetaLockerHTTPCaller) Ledger() model.Ledger
- func (c *MetaLockerHTTPCaller) ListAccessKeys(ctx context.Context) ([]*model.AccessKey, error)
- func (c *MetaLockerHTTPCaller) ListDIDDocuments(ctx context.Context) ([]*model.DIDDocument, error)
- func (c *MetaLockerHTTPCaller) ListIdentities(ctx context.Context) ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListLockers(ctx context.Context) ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListProperties(ctx context.Context) ([]*account.DataEnvelope, error)
- func (c *MetaLockerHTTPCaller) ListSubAccounts(ctx context.Context, id string) ([]*account.Account, error)
- func (c *MetaLockerHTTPCaller) LoginWithAccessKeys(ctx context.Context, apiKey, clientSecret string) error
- func (c *MetaLockerHTTPCaller) LoginWithAdminKeys(adminKey, adminSecret string) error
- func (c *MetaLockerHTTPCaller) LoginWithCredentials(ctx context.Context, email string, password string) error
- func (c *MetaLockerHTTPCaller) LoginWithJWT(jwtToken string) error
- func (c *MetaLockerHTTPCaller) Logout()
- func (c *MetaLockerHTTPCaller) NewInstance(ctx context.Context, 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(ctx context.Context, ...) error
- func (c *MetaLockerHTTPCaller) PurgeBlob(ctx context.Context, res *model.StoredResource) error
- func (c *MetaLockerHTTPCaller) PurgeOperation(ctx context.Context, opAddr string) error
- func (c *MetaLockerHTTPCaller) RecoverAccount(ctx context.Context, userID string, privKey ed25519.PrivateKey, ...) (*account.Account, error)
- func (c *MetaLockerHTTPCaller) SecureClient() *httpsecure.Client
- func (c *MetaLockerHTTPCaller) SendBlob(ctx context.Context, data io.Reader, cleartext bool, vaultName string) (*model.StoredResource, error)
- func (c *MetaLockerHTTPCaller) SendOperation(ctx context.Context, opData []byte) (string, error)
- func (c *MetaLockerHTTPCaller) StoreIdentity(ctx context.Context, idy *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) StoreLocker(ctx context.Context, locker *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) StoreProperty(ctx context.Context, prop *account.DataEnvelope) error
- func (c *MetaLockerHTTPCaller) SubAccountInstance(subAccountID string) (wallet.NodeClient, error)
- func (c *MetaLockerHTTPCaller) SubmitRecord(ctx context.Context, r *model.Record) error
- func (c *MetaLockerHTTPCaller) UpdateAccount(ctx context.Context, 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 (*MetaLockerHTTPCaller) AdminPatchAccount ¶
func (c *MetaLockerHTTPCaller) AdminPatchAccount(ctx context.Context, id string, patch AccountAdminPatch) error
func (*MetaLockerHTTPCaller) AdminStoreAccount ¶
func (*MetaLockerHTTPCaller) AdminStoreIdentity ¶
func (c *MetaLockerHTTPCaller) AdminStoreIdentity(ctx context.Context, 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 (*MetaLockerHTTPCaller) CreateDIDDocument ¶
func (c *MetaLockerHTTPCaller) CreateDIDDocument(ctx context.Context, didDoc *model.DIDDocument) error
func (*MetaLockerHTTPCaller) CreateSubAccount ¶
func (*MetaLockerHTTPCaller) DIDProvider ¶
func (c *MetaLockerHTTPCaller) DIDProvider() model.DIDProvider
func (*MetaLockerHTTPCaller) DeleteAccessKey ¶
func (c *MetaLockerHTTPCaller) DeleteAccessKey(ctx context.Context, keyID string) error
func (*MetaLockerHTTPCaller) DeleteAccount ¶
func (c *MetaLockerHTTPCaller) DeleteAccount(ctx context.Context, id string) error
func (*MetaLockerHTTPCaller) DeleteProperty ¶
func (c *MetaLockerHTTPCaller) DeleteProperty(ctx context.Context, hash string) error
func (*MetaLockerHTTPCaller) GetAccessKey ¶
func (*MetaLockerHTTPCaller) GetAccount ¶
func (*MetaLockerHTTPCaller) GetAccountRecoveryCode ¶
func (*MetaLockerHTTPCaller) GetAssetHead ¶
func (*MetaLockerHTTPCaller) GetBlob ¶
func (c *MetaLockerHTTPCaller) GetBlob(ctx context.Context, res *model.StoredResource, accessToken string) (io.ReadCloser, error)
func (*MetaLockerHTTPCaller) GetBlockRecords ¶
func (*MetaLockerHTTPCaller) GetDIDDocument ¶
func (c *MetaLockerHTTPCaller) GetDIDDocument(ctx context.Context, id string) (*model.DIDDocument, error)
func (*MetaLockerHTTPCaller) GetDataAssetState ¶
func (c *MetaLockerHTTPCaller) GetDataAssetState(ctx context.Context, id string) (model.DataAssetState, error)
func (*MetaLockerHTTPCaller) GetGenesisBlock ¶
func (*MetaLockerHTTPCaller) GetIdentity ¶
func (c *MetaLockerHTTPCaller) GetIdentity(ctx context.Context, hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetLocker ¶
func (c *MetaLockerHTTPCaller) GetLocker(ctx context.Context, hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetOperation ¶
func (*MetaLockerHTTPCaller) GetOwnAccount ¶
func (*MetaLockerHTTPCaller) GetProperty ¶
func (c *MetaLockerHTTPCaller) GetProperty(ctx context.Context, hash string) (*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) GetRecordState ¶
func (c *MetaLockerHTTPCaller) GetRecordState(ctx context.Context, rid string) (*model.RecordState, error)
func (*MetaLockerHTTPCaller) GetServerControls ¶
func (c *MetaLockerHTTPCaller) GetServerControls(ctx context.Context) (*ServerControls, error)
func (*MetaLockerHTTPCaller) GetToken ¶
func (c *MetaLockerHTTPCaller) GetToken() string
func (*MetaLockerHTTPCaller) GetTopBlock ¶
func (*MetaLockerHTTPCaller) GetVaultMap ¶
func (c *MetaLockerHTTPCaller) GetVaultMap(ctx context.Context) (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 (*MetaLockerHTTPCaller) ListDIDDocuments ¶
func (c *MetaLockerHTTPCaller) ListDIDDocuments(ctx context.Context) ([]*model.DIDDocument, error)
func (*MetaLockerHTTPCaller) ListIdentities ¶
func (c *MetaLockerHTTPCaller) ListIdentities(ctx context.Context) ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListLockers ¶
func (c *MetaLockerHTTPCaller) ListLockers(ctx context.Context) ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListProperties ¶
func (c *MetaLockerHTTPCaller) ListProperties(ctx context.Context) ([]*account.DataEnvelope, error)
func (*MetaLockerHTTPCaller) ListSubAccounts ¶
func (*MetaLockerHTTPCaller) LoginWithAccessKeys ¶
func (c *MetaLockerHTTPCaller) LoginWithAccessKeys(ctx context.Context, apiKey, clientSecret string) error
func (*MetaLockerHTTPCaller) LoginWithAdminKeys ¶
func (c *MetaLockerHTTPCaller) LoginWithAdminKeys(adminKey, adminSecret string) error
func (*MetaLockerHTTPCaller) LoginWithCredentials ¶
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(ctx context.Context, 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(ctx context.Context, email, oldEncryptedPassword, newEncryptedPassword, name, givenName, familyName string) error
func (*MetaLockerHTTPCaller) PurgeBlob ¶
func (c *MetaLockerHTTPCaller) PurgeBlob(ctx context.Context, res *model.StoredResource) error
func (*MetaLockerHTTPCaller) PurgeOperation ¶
func (c *MetaLockerHTTPCaller) PurgeOperation(ctx context.Context, opAddr string) error
func (*MetaLockerHTTPCaller) RecoverAccount ¶
func (c *MetaLockerHTTPCaller) RecoverAccount(ctx context.Context, 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(ctx context.Context, data io.Reader, cleartext bool, vaultName string) (*model.StoredResource, error)
func (*MetaLockerHTTPCaller) SendOperation ¶
func (*MetaLockerHTTPCaller) StoreIdentity ¶
func (c *MetaLockerHTTPCaller) StoreIdentity(ctx context.Context, idy *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) StoreLocker ¶
func (c *MetaLockerHTTPCaller) StoreLocker(ctx context.Context, locker *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) StoreProperty ¶
func (c *MetaLockerHTTPCaller) StoreProperty(ctx context.Context, prop *account.DataEnvelope) error
func (*MetaLockerHTTPCaller) SubAccountInstance ¶
func (c *MetaLockerHTTPCaller) SubAccountInstance(subAccountID string) (wallet.NodeClient, error)
func (*MetaLockerHTTPCaller) SubmitRecord ¶
func (*MetaLockerHTTPCaller) UpdateAccount ¶
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.