Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 16724f5

Browse files
committed
renamed API urls
1 parent 04b4354 commit 16724f5

File tree

6 files changed

+101
-56
lines changed

6 files changed

+101
-56
lines changed

core/proto/monitor_v1_types/monitor_v1_types.pb.go

Lines changed: 35 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/proto/monitor_v1_types/monitor_v1_types.proto

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ import "trillian.proto";
2323

2424
// GetMonitoringRequest contains the input parameters of the GetMonitoring APIs.
2525
message GetMonitoringRequest {
26-
// start specifies the start epoch number from which monitoring results will
27-
// be returned (ranging from [start, latestObserved] and starting at 1).
28-
int64 start = 1;
26+
// epoch specifies the for which the monitoring results will
27+
// be returned (epochs start at 1).
28+
int64 epoch = 1;
29+
30+
// ktURL is the URL of the keytransparency server for which the monitoring
31+
// result will be returned.
32+
string kt_URL = 2;
2933
}
3034

3135
message GetMonitoringResponse {

impl/monitor/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (s *Server) GetSignedMapRoot(ctx context.Context, in *mopb.GetMonitoringReq
7272
// mutations from the previous to the current epoch it won't sign the map root
7373
// and additional data will be provided to reproduce the failure.
7474
func (s *Server) GetSignedMapRootByRevision(ctx context.Context, in *mopb.GetMonitoringRequest) (*mopb.GetMonitoringResponse, error) {
75-
return s.getResponseByRevision(in.GetStart())
75+
return s.getResponseByRevision(in.GetEpoch())
7676
}
7777

7878
func (s *Server) getResponseByRevision(epoch int64) (*mopb.GetMonitoringResponse, error) {

impl/proto/monitor_v1_service/monitor_v1_service.pb.go

Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

impl/proto/monitor_v1_service/monitor_v1_service.pb.gw.go

Lines changed: 35 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

impl/proto/monitor_v1_service/monitor_v1_service.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import "google/api/annotations.proto";
2828
//
2929
// - Signed Map Roots can be collected using the GetSignedMapRoot APIs.
3030
// - Monitor resources are named:
31-
// - /v1/map/roots/*
32-
// - /v1/map/roots:latest
31+
// - /v1/monitor/{kt-url}/map/results/{epoch}
32+
// - /v1/monitor/{kt-url}/map/results:latest
3333
//
3434
service MonitorService {
3535
// GetSignedMapRoot returns the latest valid signed map root the monitor
@@ -42,7 +42,7 @@ service MonitorService {
4242
// additional data will be provided to reproduce the failure.
4343
rpc GetSignedMapRoot(monitor.v1.types.GetMonitoringRequest)
4444
returns (monitor.v1.types.GetMonitoringResponse) {
45-
option (google.api.http) = { get: "/v1/map/roots:latest" };
45+
option (google.api.http) = { get: "/v1/monitor/{kt_URL}/map/results:latest" };
4646
}
4747

4848
// GetSignedMapRootByRevision works similar to GetSignedMapRoot but returns
@@ -54,7 +54,7 @@ service MonitorService {
5454
// and additional data will be provided to reproduce the failure.
5555
rpc GetSignedMapRootByRevision(monitor.v1.types.GetMonitoringRequest)
5656
returns(monitor.v1.types.GetMonitoringResponse) {
57-
option (google.api.http) = { get: "/v1/map/roots/{start}" };
57+
option (google.api.http) = { get: "/v1/monitor/{kt_URL}/map/results/{epoch}" };
5858
}
5959
}
6060

0 commit comments

Comments
 (0)