services

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMemDBService added in v0.2.4

func DefaultMemDBService() (memdb.GaiaMemDB, error)

DefaultMemDBService provides a default memDBService with an underlying storer.

func DefaultVaultService added in v0.2.4

func DefaultVaultService() (security.GaiaVault, error)

DefaultVaultService provides a vault with a FileStorer backend.

func MemDBService added in v0.2.4

func MemDBService(store store.GaiaStore) (memdb.GaiaMemDB, error)

MemDBService creates a memdb service instance.

func MockMemDBService added in v0.2.4

func MockMemDBService(db memdb.GaiaMemDB)

MockMemDBService provides a way to create and set a mock for the internal memdb service manager.

func MockStorageService

func MockStorageService(store store.GaiaStore)

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.GaiaVault)

MockVaultService provides a way to create and set a mock for the internal vault service manager.

func StorageService

func StorageService() (store.GaiaStore, 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.GaiaVault, 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