go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/examples/appengine/quotabeta/proto/service.proto (about) 1 // Copyright 2022 The LUCI Authors. All rights reserved. 2 // Use of this source code is governed under the Apache License, Version 2.0 3 // that can be found in the LICENSE file. 4 5 syntax = "proto3"; 6 7 option go_package = "go.chromium.org/luci/examples/appengine/quotabeta/proto"; 8 9 package rpc; 10 11 import "google/protobuf/empty.proto"; 12 13 // Demo is a service for demonstrating quota library functionality. 14 service Demo { 15 // GlobalRateLimit is an endpoint globally limited to one request every 60 16 // seconds. This quota can be reset at any time by calling GlobalQuotaReset. 17 rpc GlobalRateLimit(google.protobuf.Empty) returns (google.protobuf.Empty); 18 19 // GlobalQuotaReset resets quota for calling GlobalRateLimit. 20 rpc GlobalQuotaReset(google.protobuf.Empty) returns (google.protobuf.Empty); 21 22 // PerUserRateLimit is an endpoint limited to two requests every 60 seconds 23 // from any given user. Users can reset their own quota at any time by calling 24 // PerUserQuotaReset. 25 rpc PerUserRateLimit(google.protobuf.Empty) returns (google.protobuf.Empty); 26 27 // PerUserQuotaReset resets the caller's quota for calling PerUserRateLimit. 28 rpc PerUserQuotaReset(google.protobuf.Empty) returns (google.protobuf.Empty); 29 }