Documentation ¶
Index ¶
- func GetStore() store.Store
- func ResetState()
- type MockDB
- func (m *MockDB) Backup(path string) error
- func (m *MockDB) Close() error
- func (m *MockDB) CreateCert(c *models.Certificate) (string, error)
- func (m *MockDB) CreateCertReq(r *models.CertificateRequest) (string, error)
- func (m *MockDB) CreateOrganization() (*bff.Organization, error)
- func (m *MockDB) CreateVASP(v *pb.VASP) (string, error)
- func (m *MockDB) DeleteAnnouncementMonth(date string) error
- func (m *MockDB) DeleteCert(id string) error
- func (m *MockDB) DeleteCertReq(id string) error
- func (m *MockDB) DeleteOrganization(id uuid.UUID) error
- func (m *MockDB) DeleteVASP(id string) error
- func (m *MockDB) ListCertReqs() iterator.CertificateRequestIterator
- func (m *MockDB) ListCerts() iterator.CertificateIterator
- func (m *MockDB) ListVASPs() iterator.DirectoryIterator
- func (m *MockDB) Reindex() error
- func (m *MockDB) RetrieveAnnouncementMonth(date string) (*bff.AnnouncementMonth, error)
- func (m *MockDB) RetrieveCert(id string) (*models.Certificate, error)
- func (m *MockDB) RetrieveCertReq(id string) (*models.CertificateRequest, error)
- func (m *MockDB) RetrieveOrganization(id uuid.UUID) (*bff.Organization, error)
- func (m *MockDB) RetrieveVASP(id string) (*pb.VASP, error)
- func (m *MockDB) SearchVASPs(query map[string]interface{}) ([]*pb.VASP, error)
- func (m *MockDB) UpdateAnnouncementMonth(o *bff.AnnouncementMonth) error
- func (m *MockDB) UpdateCert(c *models.Certificate) error
- func (m *MockDB) UpdateCertReq(r *models.CertificateRequest) error
- func (m *MockDB) UpdateOrganization(o *bff.Organization) error
- func (m *MockDB) UpdateVASP(v *pb.VASP) error
- type MockState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetState ¶
func ResetState()
Types ¶
type MockDB ¶
type MockDB struct { OnClose func() error OnCreateVASP func(v *pb.VASP) (string, error) OnRetrieveVASP func(id string) (*pb.VASP, error) OnUpdateVASP func(v *pb.VASP) error OnDeleteVASP func(id string) error OnListVASPs func() iterator.DirectoryIterator OnSearchVASPs func(query map[string]interface{}) ([]*pb.VASP, error) OnListCertReqs func() iterator.CertificateRequestIterator OnCreateCertReq func(r *models.CertificateRequest) (string, error) OnRetrieveCertReq func(id string) (*models.CertificateRequest, error) OnUpdateCertReq func(r *models.CertificateRequest) error OnDeleteCertReq func(id string) error OnListCerts func() iterator.CertificateIterator OnCreateCert func(c *models.Certificate) (string, error) OnRetrieveCert func(id string) (*models.Certificate, error) OnUpdateCert func(c *models.Certificate) error OnDeleteCert func(id string) error OnRetrieveAnnouncementMonth func(date string) (*bff.AnnouncementMonth, error) OnUpdateAnnouncementMonth func(o *bff.AnnouncementMonth) error OnDeleteAnnouncementMonth func(date string) error OnCreateOrganization func() (*bff.Organization, error) OnRetrieveOrganization func(id uuid.UUID) (*bff.Organization, error) OnUpdateOrganization func(o *bff.Organization) error OnDeleteOrganization func(id uuid.UUID) error OnReindex func() error OnBackup func(string) error }
MockDB fulfills the store interface for testing.
func (*MockDB) CreateCert ¶
func (*MockDB) CreateCertReq ¶
func (*MockDB) CreateOrganization ¶ added in v1.5.2
func (m *MockDB) CreateOrganization() (*bff.Organization, error)
func (*MockDB) DeleteAnnouncementMonth ¶ added in v1.5.3
func (*MockDB) DeleteCert ¶
func (*MockDB) DeleteCertReq ¶
func (*MockDB) DeleteOrganization ¶ added in v1.5.2
func (*MockDB) DeleteVASP ¶
func (*MockDB) ListCertReqs ¶
func (m *MockDB) ListCertReqs() iterator.CertificateRequestIterator
func (*MockDB) ListCerts ¶
func (m *MockDB) ListCerts() iterator.CertificateIterator
func (*MockDB) ListVASPs ¶
func (m *MockDB) ListVASPs() iterator.DirectoryIterator
func (*MockDB) RetrieveAnnouncementMonth ¶ added in v1.5.2
func (m *MockDB) RetrieveAnnouncementMonth(date string) (*bff.AnnouncementMonth, error)
func (*MockDB) RetrieveCert ¶
func (*MockDB) RetrieveCertReq ¶
func (*MockDB) RetrieveOrganization ¶ added in v1.5.2
func (*MockDB) SearchVASPs ¶
func (*MockDB) UpdateAnnouncementMonth ¶ added in v1.5.2
func (m *MockDB) UpdateAnnouncementMonth(o *bff.AnnouncementMonth) error
func (*MockDB) UpdateCert ¶
func (*MockDB) UpdateCertReq ¶
func (*MockDB) UpdateOrganization ¶ added in v1.5.2
func (m *MockDB) UpdateOrganization(o *bff.Organization) error
type MockState ¶
type MockState struct { // in-memory database store VASPs map[string]pb.VASP Keys []string // keep track of store interface calls CloseInvoked bool CreateVASPInvoked bool RetrieveVASPInvoked bool UpdateVASPInvoked bool DeleteVASPInvoked bool ListVASPsInvoked bool SearchVASPsInvoked bool ListCertReqsInvoked bool CreateCertReqInvoked bool RetrieveCertReqInvoked bool UpdateCertReqInvoked bool DeleteCertReqInvoked bool ListCertInvoked bool CreateCertInvoked bool RetrieveCertInvoked bool UpdateCertInvoked bool DeleteCertInvoked bool RetrieveAnnouncementMonthInvoked bool UpdateAnnouncementMonthInvoked bool DeleteAnnouncementMonthInvoked bool CreateOrganizationInvoked bool RetrieveOrganizationInvoked bool UpdateOrganizationInvoked bool DeleteOrganizationInvoked bool ReindexInvoked bool BackupInvoked bool }
MockState contains the current state of the MockDB for test verification.
Click to show internal directories.
Click to hide internal directories.