validator use test

This commit is contained in:
mr
2024-07-19 09:32:58 +02:00
parent 071a49cd81
commit e838474835
8 changed files with 61 additions and 9 deletions

View File

@@ -33,6 +33,16 @@ func (dma *Storage) Deserialize(j map[string]interface{}) utils.DBObject {
return dma
}
func (dma *Storage) Serialize() map[string]interface{} {
var m map[string]interface{}
b, err := json.Marshal(dma)
if err != nil {
return nil
}
json.Unmarshal(b, dma)
return m
}
func (d *Storage) GetAccessor() utils.Accessor {
data := &StorageMongoAccessor{}
data.SetLogger(resources.STORAGE)