Documentation ¶
Index ¶
- func DefaultMemDBService() (memdb.BelaurMemDB, error)
- func DefaultVaultService() (security.BelaurVault, error)
- func MemDBService(store store.BelaurStore) (memdb.BelaurMemDB, error)
- func MockMemDBService(db memdb.BelaurMemDB)
- func MockStorageService(store store.BelaurStore)
- func MockVaultService(service security.BelaurVault)
- func StorageService() (store.BelaurStore, error)
- func VaultService(vaultStore security.VaultStorer) (security.BelaurVault, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMemDBService ¶
func DefaultMemDBService() (memdb.BelaurMemDB, error)
DefaultMemDBService provides a default memDBService with an underlying storer.
func DefaultVaultService ¶
func DefaultVaultService() (security.BelaurVault, error)
DefaultVaultService provides a vault with a FileStorer backend.
func MemDBService ¶
func MemDBService(store store.BelaurStore) (memdb.BelaurMemDB, error)
MemDBService creates a memdb service instance.
func MockMemDBService ¶
func MockMemDBService(db memdb.BelaurMemDB)
MockMemDBService provides a way to create and set a mock for the internal memdb service manager.
func MockStorageService ¶
func MockStorageService(store store.BelaurStore)
MockStorageService sets the internal store singleton to the give mock implementation. A mock needs to be created in the test. The provider will make sure that everything that would use the store will use the mock instead.
func MockVaultService ¶
func MockVaultService(service security.BelaurVault)
MockVaultService provides a way to create and set a mock for the internal vault service manager.
func StorageService ¶
func StorageService() (store.BelaurStore, error)
StorageService initializes and keeps track of a storage service. If the internal storage service is a singleton. This function retruns an error but most of the times we don't care about it, because it's only ever initialized once in the main.go. If it wouldn't work, main would os.Exit(1) and the rest of the application would just stop.
func VaultService ¶
func VaultService(vaultStore security.VaultStorer) (security.BelaurVault, error)
VaultService creates a vault manager service.
Types ¶
This section is empty.