services

package
v0.0.0-...-d892afd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL