go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/auth_service/api/rpcpb/authdb.proto (about) 1 // Copyright 2022 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package auth.service; 18 19 option go_package = "go.chromium.org/luci/auth_service/api/rpcpb"; 20 21 import "google/protobuf/timestamp.proto"; 22 23 // AuthDB contains methods to work with AuthDB. 24 service AuthDB { 25 // GetSnapshot serves the deflated AuthDB proto 26 // message with snapshot of all groups. 27 rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot); 28 } 29 30 // GetSnapshotRequest is passed to GetSnapshot rpc. 31 message GetSnapshotRequest { 32 // Version of the snapshot to get or 0 to get the latest one. 33 // Not all versions may be available (i.e. there may be gaps in revision 34 // numbers). 35 int64 revision = 1; 36 // If true response will not return actual snapshot, just its SHA256 37 // hash, revision number and timestamp. 38 bool skip_body = 2; 39 } 40 41 // Snapshot contains information about a specific AuthDB revision. 42 // The revision number is used to identify this snapshot. 43 message Snapshot { 44 // Revision number of this Snapshot. 45 int64 auth_db_rev = 1; 46 // SHA256 hash for this Snapshot. 47 string auth_db_sha256 = 2; 48 // Deflated AuthDB proto message, omitted if skip_body is true. 49 bytes auth_db_deflated = 3; 50 // Time that this Snapshot was created. 51 google.protobuf.Timestamp created_ts = 4; 52 }