Add .info to upload payload (#141)

* Add .info to upload payload
everywhere else as well

+ Upload payload includes Info
+ CLI uploads `version.info` as blob to storage
+ Getter and Saver methods updated for all storages implemented
+ Migration updated to include Info column
+ Tests no longer check RevInfo, now checking for Info same as Zip
+ Updated docs

* newline in .fizz

* change RevInfo.Info to []byte

+ change to []byte instead of io.Reader
+ adjust tests to check for info byte contents directly
+ add error check for minio client GetObject `pkg/storage/minio/getter.go`
This commit is contained in:
Rob j Loranger
2018-05-28 23:03:01 -07:00
committed by Michal Pristas
parent 8cce792e55
commit 9df207561d
32 changed files with 108 additions and 81 deletions
+2 -1
View File
@@ -3,12 +3,13 @@ package mongo
import "github.com/gomods/athens/pkg/storage"
// Save stores a module in mongo storage.
func (s *ModuleStore) Save(module, version string, mod, zip []byte) error {
func (s *ModuleStore) Save(module, version string, mod, zip, info []byte) error {
m := &storage.Module{
Module: module,
Version: version,
Mod: mod,
Zip: zip,
Info: info,
}
c := s.s.DB(s.d).C(s.c)