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; }