Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame^] | 1 | // Copyright 2016 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Schemas for monorail api client configs. |
| 6 | // Command to generate api_clients_config_pb2.py: in monorail/ directory: |
Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame^] | 7 | // protoc ./mrproto/api_clients_config.proto --proto_path=./mrproto/ --python_out=./mrproto |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 8 | |
| 9 | |
| 10 | syntax = "proto2"; |
| 11 | |
| 12 | package monorail; |
| 13 | |
| 14 | message ProjectPermission { |
| 15 | enum Role { |
| 16 | committer = 1; |
| 17 | contributor = 2; |
| 18 | } |
| 19 | |
| 20 | optional string project = 1; |
| 21 | optional Role role = 2 [default = contributor]; |
| 22 | repeated string extra_permissions = 3; |
| 23 | } |
| 24 | |
| 25 | // Next available tag: 11 |
| 26 | message Client { |
| 27 | optional string client_email = 1; |
| 28 | optional string display_name = 2; |
| 29 | optional string client_id = 3; |
| 30 | repeated string allowed_origins = 10; |
| 31 | optional string description = 4; |
| 32 | repeated ProjectPermission project_permissions = 5; |
| 33 | optional int32 period_limit = 6 [default = 100000]; |
| 34 | optional int32 lifetime_limit = 7 [default = 1000000]; |
| 35 | repeated string contacts = 8; |
| 36 | optional int32 qpm_limit = 9 [default = 100]; |
| 37 | } |
| 38 | |
| 39 | message ClientCfg { |
| 40 | repeated Client clients = 1; |
| 41 | } |