Skip to content

Commit

Permalink
sa: remove CountFQDNSetTimestamps
Browse files Browse the repository at this point in the history
This was superseded in #6220 by FQDNTimestampsForWindow and is no longer called.
  • Loading branch information
jsha committed Dec 11, 2024
1 parent 40e100c commit 83c56c5
Show file tree
Hide file tree
Showing 7 changed files with 474 additions and 716 deletions.
5 changes: 0 additions & 5 deletions mocks/sa.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,6 @@ func (sa *StorageAuthority) UpdateRegistration(_ context.Context, _ *corepb.Regi
return &emptypb.Empty{}, nil
}

// CountFQDNSets is a mock
func (sa *StorageAuthorityReadOnly) CountFQDNSets(_ context.Context, _ *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Count, error) {
return &sapb.Count{}, nil
}

// FQDNSetTimestampsForWindow is a mock
func (sa *StorageAuthorityReadOnly) FQDNSetTimestampsForWindow(_ context.Context, _ *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Timestamps, error) {
return &sapb.Timestamps{}, nil
Expand Down
11 changes: 0 additions & 11 deletions ra/ra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1533,17 +1533,6 @@ func (m mockSAWithFQDNSet) CountCertificatesByNames(ctx context.Context, req *sa
return &sapb.CountByNames{Counts: counts}, nil
}

func (m mockSAWithFQDNSet) CountFQDNSets(_ context.Context, req *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Count, error) {
var total int64
for _, name := range req.DnsNames {
entry, ok := m.issuanceTimestamps[name]
if ok {
total += int64(len(entry.Timestamps))
}
}
return &sapb.Count{Count: total}, nil
}

func (m mockSAWithFQDNSet) FQDNSetTimestampsForWindow(_ context.Context, req *sapb.CountFQDNSetsRequest, _ ...grpc.CallOption) (*sapb.Timestamps, error) {
if len(req.DnsNames) == 1 {
return m.issuanceTimestamps[req.DnsNames[0]], nil
Expand Down
966 changes: 474 additions & 492 deletions sa/proto/sa.pb.go

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions sa/proto/sa.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ import "google/protobuf/duration.proto";
// StorageAuthorityReadOnly exposes only those SA methods which are read-only.
service StorageAuthorityReadOnly {
rpc CountCertificatesByNames(CountCertificatesByNamesRequest) returns (CountByNames) {}
rpc CountFQDNSets(CountFQDNSetsRequest) returns (Count) {}
rpc CountInvalidAuthorizations2(CountInvalidAuthorizationsRequest) returns (Count) {}
rpc CountOrders(CountOrdersRequest) returns (Count) {}
rpc CountPendingAuthorizations2(RegistrationID) returns (Count) {}
rpc FQDNSetExists(FQDNSetExistsRequest) returns (Exists) {}
rpc FQDNSetTimestampsForWindow(CountFQDNSetsRequest) returns (Timestamps) {}
rpc GetAuthorization2(AuthorizationID2) returns (core.Authorization) {}
rpc GetAuthorizations2(GetAuthorizationsRequest) returns (Authorizations) {}
rpc GetCertificate(Serial) returns (core.Certificate) {}
Expand Down Expand Up @@ -46,7 +44,6 @@ service StorageAuthorityReadOnly {
service StorageAuthority {
// Getters: this list must be identical to the StorageAuthorityReadOnly rpcs.
rpc CountCertificatesByNames(CountCertificatesByNamesRequest) returns (CountByNames) {}
rpc CountFQDNSets(CountFQDNSetsRequest) returns (Count) {}
rpc CountInvalidAuthorizations2(CountInvalidAuthorizationsRequest) returns (Count) {}
rpc CountOrders(CountOrdersRequest) returns (Count) {}
rpc CountPendingAuthorizations2(RegistrationID) returns (Count) {}
Expand Down
114 changes: 0 additions & 114 deletions sa/proto/sa_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 83c56c5

Please sign in to comment.