Documentation
¶
Index ¶
- func CleanPersistence(conf *configuration.Conf)
- func ClosePersistence(conf *configuration.Conf)
- func DeleteBucket(conf *configuration.Conf, bucketName []byte)
- func DeletePersistence(conf *configuration.Conf)
- func GetToken(secret string, exp time.Time) string
- func InsertObject(conf *configuration.Conf, bucketName, key []byte, object interface{})
- func ObjectExist(conf *configuration.Conf, bucketName, key []byte) bool
- type MockRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanPersistence ¶
func CleanPersistence(conf *configuration.Conf)
will Close persistence layer (if needed) and then remove all data within. should be used at the end of a test
func ClosePersistence ¶
func ClosePersistence(conf *configuration.Conf)
Will Close persistence layer without deleting data. Is usefull when it is required to make some check at the end of a test with a persistence system that don't allow concurrent access (bbolt)
If this function is used, a call to #DeletePersistence may be required to clean everything before the next test
func DeleteBucket ¶
func DeleteBucket(conf *configuration.Conf, bucketName []byte)
func DeletePersistence ¶
func DeletePersistence(conf *configuration.Conf)
func InsertObject ¶
func InsertObject(conf *configuration.Conf, bucketName, key []byte, object interface{})
insert some objet inside a given bucket. Create the bucket if needed
func ObjectExist ¶
func ObjectExist(conf *configuration.Conf, bucketName, key []byte) bool
Types ¶
type MockRepository ¶
type MockRepository struct { persistence.Repository CreateJobRunCount int UpdateJobRunCount int }
Click to show internal directories.
Click to hide internal directories.