NewStorage returns a new Redis-based storage.
(db *gorm.DB, ns string)
| 47 | |
| 48 | // NewStorage returns a new Redis-based storage. |
| 49 | func NewStorage(db *gorm.DB, ns string) *Storage { |
| 50 | return &Storage{ |
| 51 | db: db, |
| 52 | namespacePrefix: ns, |
| 53 | ObjectStorage: ObjectStorage{ |
| 54 | db: db, |
| 55 | namespacePrefix: ns, |
| 56 | }, |
| 57 | ReferenceStorage: ReferenceStorage{ |
| 58 | db: db, |
| 59 | namespacePrefix: ns, |
| 60 | }, |
| 61 | ConfigStorage: ConfigStorage{ |
| 62 | db: db, |
| 63 | namespacePrefix: ns, |
| 64 | }, |
| 65 | ShallowStorage: ShallowStorage{ |
| 66 | db: db, |
| 67 | namespacePrefix: ns, |
| 68 | }, |
| 69 | IndexStorage: IndexStorage{ |
| 70 | db: db, |
| 71 | namespacePrefix: ns, |
| 72 | }, |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | var errNotSupported = fmt.Errorf("not supported") |
| 77 |
nothing calls this directly
no outgoing calls
no test coverage detected