rpc/apikeys/service.proto (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
syntax = "proto3"; package apikeys; option go_package = "argus-core/rpc/apikeys"; service APIKeysService { rpc CreateAPIKey(CreateAPIKeyRequest) returns (CreateAPIKeyResponse); rpc ListAPIKeys(ListAPIKeysRequest) returns (ListAPIKeysResponse); rpc RevokeAPIKey(RevokeAPIKeyRequest) returns (RevokeAPIKeyResponse); rpc DeleteAPIKey(DeleteAPIKeyRequest) returns (DeleteAPIKeyResponse); } message CreateAPIKeyRequest { string token = 1; string name = 2; string expires_at = 3; } message CreateAPIKeyResponse { APIKey api_key = 1; string key = 2; } message ListAPIKeysRequest { string token = 1; } message ListAPIKeysResponse { repeated APIKey api_keys = 1; } message RevokeAPIKeyRequest { string token = 1; string key_id = 2; } message RevokeAPIKeyResponse {} message DeleteAPIKeyRequest { string token = 1; string key_id = 2; } message DeleteAPIKeyResponse {} message APIKey { string id = 1; string user_id = 2; string name = 3; string created_at = 4; string last_used_at = 5; string expires_at = 6; bool is_active = 7; } |