func (m *MockRemoteProviderStore) Delete(id string) error {
	if m.ErrDelete != nil {
		return m.ErrDelete
	}
	return m.Store.Delete(id)
}
Delete deletes a remote provider record in the underlying storage.
package ld
import (
	"github.com/google/uuid"
	mockstorage "github.com/hyperledger/aries-framework-go/pkg/mock/storage"
	"github.com/hyperledger/aries-framework-go/pkg/store/ld"
	"github.com/hyperledger/aries-framework-go/spi/storage"
)
type MockRemoteProviderStore struct {
	Store     *mockstorage.MockStore
	ErrGet    error
	ErrGetAll error
	ErrSave   error
	ErrDelete error
}
func NewMockRemoteProviderStore() *MockRemoteProviderStore {
	return &MockRemoteProviderStore{
		Store: &mockstorage.MockStore{
			Store: make(map[string]mockstorage.DBEntry),
		},
	}
}
func (m *MockRemoteProviderStore) Get(id string) (*ld.RemoteProviderRecord, error) {
	if m.ErrGet != nil {
		return nil, m.ErrGet
	}
	b, err := m.Store.Get(id)
	if err != nil {
		return nil, err
	}
	return &ld.RemoteProviderRecord{
		ID:       id,
		Endpoint: string(b),
	}, nil
}
func (m *MockRemoteProviderStore) GetAll() ([]ld.RemoteProviderRecord, error) {
	if m.ErrGetAll != nil {
		return nil, m.ErrGetAll
	}
	var records []ld.RemoteProviderRecord
	for k, v := range m.Store.Store {
		records = append(records, ld.RemoteProviderRecord{
			ID:       k,
			Endpoint: string(v.Value),
		})
	}
	return records, nil
}
func (m *MockRemoteProviderStore) Save(endpoint string) (*ld.RemoteProviderRecord, error) {
	if m.ErrSave != nil {
		return nil, m.ErrSave
	}
	for k, v := range m.Store.Store {
		if string(v.Value) == endpoint {
			return &ld.RemoteProviderRecord{
				ID:       k,
				Endpoint: string(v.Value),
			}, nil
		}
	}
	id := uuid.New().String()
	if err := m.Store.Put(id, []byte(endpoint), storage.Tag{Name: ld.RemoteProviderRecordTag}); err != nil {
		return nil, err
	}
	return &ld.RemoteProviderRecord{
		ID:       id,
		Endpoint: endpoint,
	}, nil
}