A serveDirectoryPage function is added, which serves pages for the
directory view using a versioned directory.
For golang/go#39629
Change-Id: I372981dfa7822d850aac59ffd9fea2aab8949baa
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241859
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Many functions in internal/frontend have "version" as an argument, but
it is not clear whether that version is the "requested version" (i.e.
latest, master, or semver), or the "resolved version" (the semantic
version corresponding to the requested version).
These are now specified in the argument name to make it clearer what is
expected as an input to the function.
Change-Id: I9211c1b55e0951b37f693bfed5c4b509a5d81da4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240939
Reviewed-by: Jonathan Amsterdam <jba@google.com>
At the moment there are several methods not implemented by the
proxydatasource. These are removed from internal.DataSource.
Fixes b/150138536
Change-Id: Id1eef4b2497bd46c8e3cecf8a083ef81bfbe2f47
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/768688
Reviewed-by: Jonathan Amsterdam <jba@google.com>
golang.org/x/discovery is renamed to golang.org/x/pkgsite.
When the repository is open sourced, it will be hosted at
go.googlesource.com/pkgsite.
Change-Id: Ifc3b45b771a385b99179e785447f2a87afcacf87
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/724273
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This CL is pure renaming:
- internal.VersionInfo to internal.ModuleInfo
- related variables from vi to mi
Updates b/150143758.
Change-Id: I5da63a07d6f9b731016ffe92e403e5f2d9aadab7
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/673875
Reviewed-by: Julie Qiu <julieqiu@google.com>
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
frontend.Datasource is moved into internal.Datasource, so that it
can be used in future CLs in the internal/middleware package.
Change-Id: Id4823b46f36f114fd02ee3b8ac78c1e6d24c0cc5
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/611020
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Do not count package A as importing package B if they
are in the same module.
Change-Id: Ic0f98af8d72b8fff29e105779c6eb619214335e9
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/596525
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
GetPackageInModule is added to the DataSource struct and as a method to
proxydatasource.
GetImports is modified to accept modulePath in addition to pkgPath and
version as an argument.
Updates b/140191811
Updates b/136484298
Change-Id: Ibee233535a5970a2e4a5568181a4317a57a920eb
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/565240
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Use the new imports_unique table to determine importers.
It is significantly faster.
Increase limit significantly.
Change-Id: I8ca549d769a83533d9fb7baa8f69a02a45f721c4
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/537588
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
This introduces a layer of abstraction between the frontend and
postgres, which can be useful for testing but also is required for
enabling a 'direct' mode which goes straight to a proxy.
Updates b/139144841
Change-Id: I38ebda5766df38f87ce18d0fde8c862ac92e2713
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/539132
Reviewed-by: Julie Qiu <julieqiu@google.com>
Instead of displaying the paths imported by a module as a flat list,
use <details> elements to display a tree.
Make tree nodes for (roughly) "account" and "repo", so that
"github.com/google" is one level of the tree, and
"github.com/google/somerepo" is the next level. Don't group beyond
that on the assumption that users would want to see all the importing
packages in a repo as a flat list.
Also, get rid of pagination on the query. Instead use a large limit,
and only display paths up to that limit.
Fixes b/139411420.
Change-Id: I55e030e5f901dacf854f2e7f585a444d089f6ea1
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/537581
Reviewed-by: Julie Qiu <julieqiu@google.com>
details.go currently contains almost all of the logic for rendering the
package details view. In a future CL, it will also contain logic for
rendering the module details view.
It is reorganized by being split into multiple files in preparation for
handling that logic, which has a lot of shared functionality.
Updates b/138448402
Change-Id: Id031b14f58dce9e90b32ca658bfe920c30c42b74
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/515745
Reviewed-by: Robert Findley <rfindley@google.com>