Граф коммитов

3253 Коммитов

Автор SHA1 Сообщение Дата
Julie Qiu dc3e6e940c discovery/internal/postgres: read/write to the version_logs table
The discovery/internal/postgres package is created to interact
with the discovery database. The following methods are implemented:
- LastestProxyIndexUpdate() *time.Time
- InsertNewVersionsToLog(newVersions []*internal.VersionLog) error

These will be used by the proxy index cron when fetching new versions
from the module index.

The version_log table is renamed to version_logs. This was initially
a typo.

A dependency to github.com/lib/pq v1.0.0 is introduced.

Change-Id: I720a836dc85a37a5df863e879ce6f60082c795f1
Reviewed-on: https://team-review.git.corp.google.com/c/413847
Reviewed-by: Andrew Bonventre <andybons@google.com>
2020-03-27 16:46:33 -04:00
Julie Qiu f0bb052bb4 discovery: create proxy for testing; add .DS_Store to .gitignore
Implemented a proxy that runs on localhost:8080 following the Module
proxy protocol.

It supports the modules and versions:

- my/module (v1.0.0, v1.1.0, v1.1.1)
- my/module/v2 (v2.0.0)

A GET request can be made to:

- GET $GOPROXY/<module>/@v/list
- GET $GOPROXY/<module>/@v/<version>.info
- GET $GOPROXY/<module>/@v/<version>.mod
- GET $GOPROXY/<module>/@v/<version>.zip

All the zip files contain only an empty README.md.

Change-Id: If7d547eb94a9a24608fafccdfd39330da9849a0e
Reviewed-on: https://team-review.git.corp.google.com/c/412883
Reviewed-by: Andrew Bonventre <andybons@google.com>
2020-03-27 16:46:33 -04:00
Julie Qiu 75f8121564 discovery: created initial models
- license
- module
- package
- readme
- series
- version

Change-Id: If98ead2d8651510a961762a0e8c03e24a2b9e862
Reviewed-on: https://team-review.git.corp.google.com/c/409075
Reviewed-by: Andrew Bonventre <andybons@google.com>
2020-03-27 16:46:28 -04:00