mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Implemented backing mongo storage for modules (#64)
* mongo storage initial impl * added tests * mongo tests passing
This commit is contained in:
committed by
Aaron Schlesinger
parent
23f469ac18
commit
0a6e4407a1
@@ -0,0 +1,16 @@
|
||||
package mongo
|
||||
|
||||
import "github.com/gomods/athens/pkg/storage"
|
||||
|
||||
func (s *MongoModuleStore) Save(baseURL, module, version string, mod, zip []byte) error {
|
||||
m := &storage.Module{
|
||||
BaseURL: baseURL,
|
||||
Module: module,
|
||||
Version: version,
|
||||
Mod: mod,
|
||||
Zip: zip,
|
||||
}
|
||||
|
||||
c := s.s.DB(s.d).C(s.c)
|
||||
return c.Insert(m)
|
||||
}
|
||||
Reference in New Issue
Block a user