diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index 9b22bf7d1e..5de404fd50 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -116,12 +116,12 @@ POST /v1/backup/Locations/TestConfig POST /v1/backups/locations:t POST /v1/backup/RestoreHistory/List GET /v1/backups/restores ✅ POST /v1/backup/Backups/Restore POST /v1/backups/restores:start ✅ -**DumpsService** **DumpService** TODO: rename to singular -POST /v1/dump/List GET /v1/dumps -POST /v1/dump/Delete POST /v1/dumps:batchDelete accepts an array in body -POST /v1/dump/GetLogs GET /v1/dumps/{id}/logs ?offset=10,limit=100 -POST /v1/dump/Start POST /v1/dumps:start -POST /v1/dump/Upload POST /v1/dumps:upload +**DumpsService** **DumpService** NOTE: renamed to DumpService +POST /v1/dump/List GET /v1/dumps ✅ +POST /v1/dump/Delete POST /v1/dumps:batchDelete ✅ accepts an array in body +POST /v1/dump/GetLogs GET /v1/dumps/{dump_id}/logs ✅ ?offset=0&limit=100 +POST /v1/dump/Start POST /v1/dumps:start ✅ +POST /v1/dump/Upload POST /v1/dumps:upload ✅ **RoleService** **AccessControlService** TODO: rename to AccessControlService POST /v1/role/Assign POST /v1/accesscontrol/roles:assign diff --git a/api/backup/v1/json/client/locations_service/list_locations_responses.go b/api/backup/v1/json/client/locations_service/list_locations_responses.go index 020322ebe9..590e7b2a07 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_responses.go +++ b/api/backup/v1/json/client/locations_service/list_locations_responses.go @@ -58,7 +58,7 @@ type ListLocationsOK struct { } func (o *ListLocationsOK) Error() string { - return fmt.Sprintf("[GET /v1/backup/locations][%d] listLocationsOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/backups/locations][%d] listLocationsOk %+v", 200, o.Payload) } func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { @@ -100,7 +100,7 @@ func (o *ListLocationsDefault) Code() int { } func (o *ListLocationsDefault) Error() string { - return fmt.Sprintf("[GET /v1/backup/locations][%d] ListLocations default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/backups/locations][%d] ListLocations default %+v", o._statusCode, o.Payload) } func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { diff --git a/api/backup/v1/json/client/locations_service/locations_service_client.go b/api/backup/v1/json/client/locations_service/locations_service_client.go index 50deb0317f..e9830d0b4c 100644 --- a/api/backup/v1/json/client/locations_service/locations_service_client.go +++ b/api/backup/v1/json/client/locations_service/locations_service_client.go @@ -132,7 +132,7 @@ func (a *Client) ListLocations(params *ListLocationsParams, opts ...ClientOption op := &runtime.ClientOperation{ ID: "ListLocations", Method: "GET", - PathPattern: "/v1/backup/locations", + PathPattern: "/v1/backups/locations", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -210,7 +210,7 @@ func (a *Client) TestLocationConfig(params *TestLocationConfigParams, opts ...Cl op := &runtime.ClientOperation{ ID: "TestLocationConfig", Method: "POST", - PathPattern: "/v1/backup/locations:testConfig", + PathPattern: "/v1/backups/locations:testConfig", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/api/backup/v1/json/client/locations_service/test_location_config_responses.go b/api/backup/v1/json/client/locations_service/test_location_config_responses.go index f338f1c43b..de196b8081 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_responses.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_responses.go @@ -58,7 +58,7 @@ type TestLocationConfigOK struct { } func (o *TestLocationConfigOK) Error() string { - return fmt.Sprintf("[POST /v1/backup/locations:testConfig][%d] testLocationConfigOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/backups/locations:testConfig][%d] testLocationConfigOk %+v", 200, o.Payload) } func (o *TestLocationConfigOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *TestLocationConfigDefault) Code() int { } func (o *TestLocationConfigDefault) Error() string { - return fmt.Sprintf("[POST /v1/backup/locations:testConfig][%d] TestLocationConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/backups/locations:testConfig][%d] TestLocationConfig default %+v", o._statusCode, o.Payload) } func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody { diff --git a/api/backup/v1/json/v1.json b/api/backup/v1/json/v1.json index 08359250c9..fc23cbc987 100644 --- a/api/backup/v1/json/v1.json +++ b/api/backup/v1/json/v1.json @@ -15,211 +15,6 @@ "version": "v1beta1" }, "paths": { - "/v1/backup/locations": { - "get": { - "description": "List backup locations.", - "tags": [ - "LocationsService" - ], - "summary": "List Backup Locations", - "operationId": "ListLocations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "locations": { - "type": "array", - "items": { - "description": "Location represents single Backup Location.", - "type": "object", - "properties": { - "description": { - "type": "string", - "title": "Short description", - "x-order": 2 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Location name", - "x-order": 1 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "access_key": { - "type": "string", - "x-order": 1 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - }, - "endpoint": { - "type": "string", - "x-order": 0 - }, - "secret_key": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/backup/locations:testConfig": { - "post": { - "description": "Test a backup location and credentials.", - "tags": [ - "LocationsService" - ], - "summary": "Test a Backup Location and Credentials", - "operationId": "TestLocationConfig", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "access_key": { - "type": "string", - "x-order": 1 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - }, - "endpoint": { - "type": "string", - "x-order": 0 - }, - "secret_key": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, "/v1/backups/artifacts": { "get": { "tags": [ @@ -572,6 +367,114 @@ } }, "/v1/backups/locations": { + "get": { + "description": "List backup locations.", + "tags": [ + "LocationsService" + ], + "summary": "List Backup Locations", + "operationId": "ListLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "description": "Location represents single Backup Location.", + "type": "object", + "properties": { + "description": { + "type": "string", + "title": "Short description", + "x-order": 2 + }, + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 3 + }, + "location_id": { + "description": "Machine-readable ID.", + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "title": "Location name", + "x-order": 1 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "access_key": { + "type": "string", + "x-order": 1 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + }, + "endpoint": { + "type": "string", + "x-order": 0 + }, + "secret_key": { + "type": "string", + "x-order": 2 + } + }, + "x-order": 4 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + }, "post": { "description": "Add a backup location.", "tags": [ @@ -855,6 +758,101 @@ } } }, + "/v1/backups/locations:testConfig": { + "post": { + "description": "Test a backup location and credentials.", + "tags": [ + "LocationsService" + ], + "summary": "Test a Backup Location and Credentials", + "operationId": "TestLocationConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 0 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "access_key": { + "type": "string", + "x-order": 1 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + }, + "endpoint": { + "type": "string", + "x-order": 0 + }, + "secret_key": { + "type": "string", + "x-order": 2 + } + }, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, "/v1/backups/restores": { "get": { "description": "List all backup restore history items", diff --git a/api/backup/v1/locations.pb.go b/api/backup/v1/locations.pb.go index efe8120b75..3721aa7abe 100644 --- a/api/backup/v1/locations.pb.go +++ b/api/backup/v1/locations.pb.go @@ -874,77 +874,77 @@ var file_backup_v1_locations_proto_rawDesc = []byte{ 0x53, 0x33, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1c, 0x0a, 0x1a, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbc, 0x07, 0x0a, 0x10, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa2, 0x01, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbe, 0x07, 0x0a, 0x10, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4e, 0x92, 0x41, 0x2f, 0x12, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x42, 0x61, + 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x2f, 0x12, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, - 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x52, 0x92, 0x41, 0x2f, 0x12, 0x15, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x41, - 0x64, 0x64, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, - 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbd, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x92, - 0x41, 0x35, 0x12, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x20, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, - 0x1a, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbb, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x92, - 0x41, 0x36, 0x12, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x19, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0xe1, 0x01, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, - 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x92, 0x41, 0x51, 0x12, 0x26, 0x54, 0x65, - 0x73, 0x74, 0x20, 0x61, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x27, 0x54, 0x65, 0x73, 0x74, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, - 0x20, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x74, 0x65, 0x73, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x93, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, - 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x3b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, - 0xaa, 0x02, 0x09, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0a, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, + 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x2f, 0x12, 0x15, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, + 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, + 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbd, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, + 0x92, 0x41, 0x35, 0x12, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x20, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, + 0x2a, 0x1a, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbb, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, + 0x92, 0x41, 0x36, 0x12, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x19, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, + 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xe2, 0x01, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x51, 0x12, 0x26, 0x54, + 0x65, 0x73, 0x74, 0x20, 0x61, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x20, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x27, 0x54, 0x65, 0x73, 0x74, 0x20, 0x61, 0x20, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x74, + 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x93, 0x01, 0x0a, 0x0d, 0x63, 0x6f, + 0x6d, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, + 0x58, 0x58, 0xaa, 0x02, 0x09, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x09, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0a, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/backup/v1/locations.pb.gw.go b/api/backup/v1/locations.pb.gw.go index 3e31e87576..7cd6a0fc38 100644 --- a/api/backup/v1/locations.pb.gw.go +++ b/api/backup/v1/locations.pb.gw.go @@ -234,7 +234,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/backup.v1.LocationsService/ListLocations", runtime.WithHTTPPathPattern("/v1/backup/locations")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/backup.v1.LocationsService/ListLocations", runtime.WithHTTPPathPattern("/v1/backups/locations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -330,7 +330,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/backup.v1.LocationsService/TestLocationConfig", runtime.WithHTTPPathPattern("/v1/backup/locations:testConfig")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/backup.v1.LocationsService/TestLocationConfig", runtime.WithHTTPPathPattern("/v1/backups/locations:testConfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -392,7 +392,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/backup.v1.LocationsService/ListLocations", runtime.WithHTTPPathPattern("/v1/backup/locations")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/backup.v1.LocationsService/ListLocations", runtime.WithHTTPPathPattern("/v1/backups/locations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -476,7 +476,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/backup.v1.LocationsService/TestLocationConfig", runtime.WithHTTPPathPattern("/v1/backup/locations:testConfig")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/backup.v1.LocationsService/TestLocationConfig", runtime.WithHTTPPathPattern("/v1/backups/locations:testConfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -495,7 +495,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } var ( - pattern_LocationsService_ListLocations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "backup", "locations"}, "")) + pattern_LocationsService_ListLocations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "backups", "locations"}, "")) pattern_LocationsService_AddLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "backups", "locations"}, "")) @@ -503,7 +503,7 @@ var ( pattern_LocationsService_RemoveLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "backups", "locations", "location_id"}, "")) - pattern_LocationsService_TestLocationConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "backup", "locations"}, "testConfig")) + pattern_LocationsService_TestLocationConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "backups", "locations"}, "testConfig")) ) var ( diff --git a/api/backup/v1/locations.proto b/api/backup/v1/locations.proto index 4f22429224..bb29398fe5 100644 --- a/api/backup/v1/locations.proto +++ b/api/backup/v1/locations.proto @@ -90,7 +90,7 @@ message TestLocationConfigResponse {} service LocationsService { // ListLocations returns a list of all backup locations. rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { - option (google.api.http) = {get: "/v1/backup/locations"}; + option (google.api.http) = {get: "/v1/backups/locations"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "List Backup Locations" description: "List backup locations." @@ -129,7 +129,7 @@ service LocationsService { // TestLocationConfig tests backup location and credentials. rpc TestLocationConfig(TestLocationConfigRequest) returns (TestLocationConfigResponse) { option (google.api.http) = { - post: "/v1/backup/locations:testConfig" + post: "/v1/backups/locations:testConfig" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { diff --git a/api/dump/v1/dump.pb.go b/api/dump/v1/dump.pb.go index 068aa763d3..2223cb6ffb 100644 --- a/api/dump/v1/dump.pb.go +++ b/api/dump/v1/dump.pb.go @@ -11,6 +11,7 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -807,6 +808,9 @@ var file_dump_v1_dump_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x04, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, @@ -897,52 +901,67 @@ var file_dump_v1_dump_proto_rawDesc = []byte{ 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x55, 0x4d, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x55, 0x4d, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xaa, 0x04, 0x0a, 0x0c, 0x44, 0x75, 0x6d, 0x70, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x94, 0x06, 0x0a, 0x0b, 0x44, 0x75, 0x6d, 0x70, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x1e, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, - 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x2f, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x66, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x12, 0x1e, - 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, - 0x64, 0x75, 0x6d, 0x70, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x1f, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x75, 0x6d, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x75, - 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x2f, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x75, 0x6d, - 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x6f, - 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x2f, - 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x6b, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x1f, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x75, 0x6d, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x75, 0x6d, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, - 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x2f, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x9e, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x75, 0x6d, - 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x44, 0x75, 0x6d, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x75, 0x6d, 0x70, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x44, - 0x75, 0x6d, 0x70, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0c, 0x44, 0x75, - 0x6d, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x18, 0x44, 0x75, 0x6d, - 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x44, 0x75, 0x6d, 0x70, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x92, 0x41, 0x25, 0x12, 0x10, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x20, 0x61, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x44, 0x75, 0x6d, 0x70, 0x1a, 0x11, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x64, 0x75, 0x6d, 0x70, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x64, + 0x75, 0x6d, 0x70, 0x73, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x82, 0x01, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x75, 0x6d, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x92, 0x41, 0x20, 0x12, 0x0e, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x1a, 0x0e, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x12, + 0x9a, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x1f, + 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x49, 0x92, 0x41, 0x26, 0x12, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x44, + 0x75, 0x6d, 0x70, 0x73, 0x1a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x73, + 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0xa4, 0x01, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x64, + 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x75, 0x6d, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x50, 0x92, 0x41, 0x2d, 0x12, 0x0d, 0x47, 0x65, 0x74, 0x20, 0x44, 0x75, 0x6d, 0x70, + 0x20, 0x4c, 0x6f, 0x67, 0x73, 0x1a, 0x1c, 0x47, 0x65, 0x74, 0x20, 0x6c, 0x6f, 0x67, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x75, + 0x6d, 0x70, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x64, + 0x75, 0x6d, 0x70, 0x73, 0x2f, 0x7b, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, + 0x6f, 0x67, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x75, + 0x6d, 0x70, 0x12, 0x1f, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x92, 0x41, 0x39, 0x12, 0x0c, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x20, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x1a, 0x29, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, + 0x31, 0x2f, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x3a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x9e, + 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x09, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, + 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x75, 0x6d, + 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x75, 0x6d, 0x70, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0c, 0x44, 0x75, 0x6d, 0x70, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x18, 0x44, 0x75, 0x6d, 0x70, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x44, 0x75, 0x6d, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -989,16 +1008,16 @@ var file_dump_v1_dump_proto_depIdxs = []int32{ 1, // 6: dump.v1beta1.ListDumpsResponse.dumps:type_name -> dump.v1beta1.Dump 10, // 7: dump.v1beta1.GetDumpLogsResponse.logs:type_name -> dump.v1beta1.LogChunk 11, // 8: dump.v1beta1.UploadDumpRequest.sftp_parameters:type_name -> dump.v1beta1.SFTPParameters - 2, // 9: dump.v1beta1.DumpsService.StartDump:input_type -> dump.v1beta1.StartDumpRequest - 4, // 10: dump.v1beta1.DumpsService.ListDumps:input_type -> dump.v1beta1.ListDumpsRequest - 6, // 11: dump.v1beta1.DumpsService.DeleteDump:input_type -> dump.v1beta1.DeleteDumpRequest - 8, // 12: dump.v1beta1.DumpsService.GetDumpLogs:input_type -> dump.v1beta1.GetDumpLogsRequest - 12, // 13: dump.v1beta1.DumpsService.UploadDump:input_type -> dump.v1beta1.UploadDumpRequest - 3, // 14: dump.v1beta1.DumpsService.StartDump:output_type -> dump.v1beta1.StartDumpResponse - 5, // 15: dump.v1beta1.DumpsService.ListDumps:output_type -> dump.v1beta1.ListDumpsResponse - 7, // 16: dump.v1beta1.DumpsService.DeleteDump:output_type -> dump.v1beta1.DeleteDumpResponse - 9, // 17: dump.v1beta1.DumpsService.GetDumpLogs:output_type -> dump.v1beta1.GetDumpLogsResponse - 13, // 18: dump.v1beta1.DumpsService.UploadDump:output_type -> dump.v1beta1.UploadDumpResponse + 2, // 9: dump.v1beta1.DumpService.StartDump:input_type -> dump.v1beta1.StartDumpRequest + 4, // 10: dump.v1beta1.DumpService.ListDumps:input_type -> dump.v1beta1.ListDumpsRequest + 6, // 11: dump.v1beta1.DumpService.DeleteDump:input_type -> dump.v1beta1.DeleteDumpRequest + 8, // 12: dump.v1beta1.DumpService.GetDumpLogs:input_type -> dump.v1beta1.GetDumpLogsRequest + 12, // 13: dump.v1beta1.DumpService.UploadDump:input_type -> dump.v1beta1.UploadDumpRequest + 3, // 14: dump.v1beta1.DumpService.StartDump:output_type -> dump.v1beta1.StartDumpResponse + 5, // 15: dump.v1beta1.DumpService.ListDumps:output_type -> dump.v1beta1.ListDumpsResponse + 7, // 16: dump.v1beta1.DumpService.DeleteDump:output_type -> dump.v1beta1.DeleteDumpResponse + 9, // 17: dump.v1beta1.DumpService.GetDumpLogs:output_type -> dump.v1beta1.GetDumpLogsResponse + 13, // 18: dump.v1beta1.DumpService.UploadDump:output_type -> dump.v1beta1.UploadDumpResponse 14, // [14:19] is the sub-list for method output_type 9, // [9:14] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name diff --git a/api/dump/v1/dump.pb.gw.go b/api/dump/v1/dump.pb.gw.go index 37eda9f8de..b97d521c0c 100644 --- a/api/dump/v1/dump.pb.gw.go +++ b/api/dump/v1/dump.pb.gw.go @@ -33,7 +33,7 @@ var ( _ = metadata.Join ) -func request_DumpsService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartDumpRequest var metadata runtime.ServerMetadata @@ -45,7 +45,7 @@ func request_DumpsService_StartDump_0(ctx context.Context, marshaler runtime.Mar return msg, metadata, err } -func local_request_DumpsService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartDumpRequest var metadata runtime.ServerMetadata @@ -57,31 +57,23 @@ func local_request_DumpsService_StartDump_0(ctx context.Context, marshaler runti return msg, metadata, err } -func request_DumpsService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, client DumpsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListDumpsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ListDumps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_DumpsService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, server DumpsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListDumpsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ListDumps(ctx, &protoReq) return msg, metadata, err } -func request_DumpsService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteDumpRequest var metadata runtime.ServerMetadata @@ -93,7 +85,7 @@ func request_DumpsService_DeleteDump_0(ctx context.Context, marshaler runtime.Ma return msg, metadata, err } -func local_request_DumpsService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteDumpRequest var metadata runtime.ServerMetadata @@ -105,11 +97,33 @@ func local_request_DumpsService_DeleteDump_0(ctx context.Context, marshaler runt return msg, metadata, err } -func request_DumpsService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, client DumpsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +var filter_DumpService_GetDumpLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"dump_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + +func request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetDumpLogsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["dump_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "dump_id") + } + + protoReq.DumpId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "dump_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DumpService_GetDumpLogs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -117,11 +131,31 @@ func request_DumpsService_GetDumpLogs_0(ctx context.Context, marshaler runtime.M return msg, metadata, err } -func local_request_DumpsService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, server DumpsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetDumpLogsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["dump_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "dump_id") + } + + protoReq.DumpId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "dump_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DumpService_GetDumpLogs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -129,7 +163,7 @@ func local_request_DumpsService_GetDumpLogs_0(ctx context.Context, marshaler run return msg, metadata, err } -func request_DumpsService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UploadDumpRequest var metadata runtime.ServerMetadata @@ -141,7 +175,7 @@ func request_DumpsService_UploadDump_0(ctx context.Context, marshaler runtime.Ma return msg, metadata, err } -func local_request_DumpsService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UploadDumpRequest var metadata runtime.ServerMetadata @@ -153,12 +187,12 @@ func local_request_DumpsService_UploadDump_0(ctx context.Context, marshaler runt return msg, metadata, err } -// RegisterDumpsServiceHandlerServer registers the http handlers for service DumpsService to "mux". -// UnaryRPC :call DumpsServiceServer directly. +// RegisterDumpServiceHandlerServer registers the http handlers for service DumpService to "mux". +// UnaryRPC :call DumpServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDumpsServiceHandlerFromEndpoint instead. -func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DumpsServiceServer) error { - mux.Handle("POST", pattern_DumpsService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDumpServiceHandlerFromEndpoint instead. +func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DumpServiceServer) error { + mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -166,12 +200,12 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpsService/StartDump", runtime.WithHTTPPathPattern("/v1/dump/Start")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpService/StartDump", runtime.WithHTTPPathPattern("/v1/dumps:start")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DumpsService_StartDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DumpService_StartDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -179,10 +213,10 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_DumpsService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -190,12 +224,12 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpsService/ListDumps", runtime.WithHTTPPathPattern("/v1/dump/List")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpService/ListDumps", runtime.WithHTTPPathPattern("/v1/dumps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DumpsService_ListDumps_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DumpService_ListDumps_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -203,10 +237,10 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_DumpsService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -214,12 +248,12 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpsService/DeleteDump", runtime.WithHTTPPathPattern("/v1/dump/Delete")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpService/DeleteDump", runtime.WithHTTPPathPattern("/v1/dumps:batchDelete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DumpsService_DeleteDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DumpService_DeleteDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -227,10 +261,10 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_DumpsService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -238,12 +272,12 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpsService/GetDumpLogs", runtime.WithHTTPPathPattern("/v1/dump/GetLogs")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpService/GetDumpLogs", runtime.WithHTTPPathPattern("/v1/dumps/{dump_id}/logs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DumpsService_GetDumpLogs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DumpService_GetDumpLogs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -251,10 +285,10 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_DumpsService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -262,12 +296,12 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpsService/UploadDump", runtime.WithHTTPPathPattern("/v1/dump/Upload")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/dump.v1beta1.DumpService/UploadDump", runtime.WithHTTPPathPattern("/v1/dumps:upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DumpsService_UploadDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DumpService_UploadDump_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -275,15 +309,15 @@ func RegisterDumpsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_DumpsService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterDumpsServiceHandlerFromEndpoint is same as RegisterDumpsServiceHandler but +// RegisterDumpServiceHandlerFromEndpoint is same as RegisterDumpServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterDumpsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterDumpServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -303,149 +337,149 @@ func RegisterDumpsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.S }() }() - return RegisterDumpsServiceHandler(ctx, mux, conn) + return RegisterDumpServiceHandler(ctx, mux, conn) } -// RegisterDumpsServiceHandler registers the http handlers for service DumpsService to "mux". +// RegisterDumpServiceHandler registers the http handlers for service DumpService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterDumpsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterDumpsServiceHandlerClient(ctx, mux, NewDumpsServiceClient(conn)) +func RegisterDumpServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterDumpServiceHandlerClient(ctx, mux, NewDumpServiceClient(conn)) } -// RegisterDumpsServiceHandlerClient registers the http handlers for service DumpsService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DumpsServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DumpsServiceClient" +// RegisterDumpServiceHandlerClient registers the http handlers for service DumpService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DumpServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DumpServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DumpsServiceClient" to call the correct interceptors. -func RegisterDumpsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DumpsServiceClient) error { - mux.Handle("POST", pattern_DumpsService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// "DumpServiceClient" to call the correct interceptors. +func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DumpServiceClient) error { + mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpsService/StartDump", runtime.WithHTTPPathPattern("/v1/dump/Start")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpService/StartDump", runtime.WithHTTPPathPattern("/v1/dumps:start")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DumpsService_StartDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DumpService_StartDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_DumpsService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpsService/ListDumps", runtime.WithHTTPPathPattern("/v1/dump/List")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpService/ListDumps", runtime.WithHTTPPathPattern("/v1/dumps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DumpsService_ListDumps_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DumpService_ListDumps_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_DumpsService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpsService/DeleteDump", runtime.WithHTTPPathPattern("/v1/dump/Delete")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpService/DeleteDump", runtime.WithHTTPPathPattern("/v1/dumps:batchDelete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DumpsService_DeleteDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DumpService_DeleteDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_DumpsService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpsService/GetDumpLogs", runtime.WithHTTPPathPattern("/v1/dump/GetLogs")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpService/GetDumpLogs", runtime.WithHTTPPathPattern("/v1/dumps/{dump_id}/logs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DumpsService_GetDumpLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DumpService_GetDumpLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_DumpsService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_DumpsService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpsService/UploadDump", runtime.WithHTTPPathPattern("/v1/dump/Upload")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/dump.v1beta1.DumpService/UploadDump", runtime.WithHTTPPathPattern("/v1/dumps:upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DumpsService_UploadDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DumpService_UploadDump_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_DumpsService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } var ( - pattern_DumpsService_StartDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "dump", "Start"}, "")) + pattern_DumpService_StartDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "dumps"}, "start")) - pattern_DumpsService_ListDumps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "dump", "List"}, "")) + pattern_DumpService_ListDumps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "dumps"}, "")) - pattern_DumpsService_DeleteDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "dump", "Delete"}, "")) + pattern_DumpService_DeleteDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "dumps"}, "batchDelete")) - pattern_DumpsService_GetDumpLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "dump", "GetLogs"}, "")) + pattern_DumpService_GetDumpLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "dumps", "dump_id", "logs"}, "")) - pattern_DumpsService_UploadDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "dump", "Upload"}, "")) + pattern_DumpService_UploadDump_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "dumps"}, "upload")) ) var ( - forward_DumpsService_StartDump_0 = runtime.ForwardResponseMessage + forward_DumpService_StartDump_0 = runtime.ForwardResponseMessage - forward_DumpsService_ListDumps_0 = runtime.ForwardResponseMessage + forward_DumpService_ListDumps_0 = runtime.ForwardResponseMessage - forward_DumpsService_DeleteDump_0 = runtime.ForwardResponseMessage + forward_DumpService_DeleteDump_0 = runtime.ForwardResponseMessage - forward_DumpsService_GetDumpLogs_0 = runtime.ForwardResponseMessage + forward_DumpService_GetDumpLogs_0 = runtime.ForwardResponseMessage - forward_DumpsService_UploadDump_0 = runtime.ForwardResponseMessage + forward_DumpService_UploadDump_0 = runtime.ForwardResponseMessage ) diff --git a/api/dump/v1/dump.proto b/api/dump/v1/dump.proto index 386c94a148..952ab4c80c 100644 --- a/api/dump/v1/dump.proto +++ b/api/dump/v1/dump.proto @@ -4,6 +4,7 @@ package dump.v1beta1; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "validate/validate.proto"; enum DumpStatus { @@ -85,40 +86,54 @@ message UploadDumpRequest { message UploadDumpResponse {} -service DumpsService { +service DumpService { // StartDump request creates pmm dump. rpc StartDump(StartDumpRequest) returns (StartDumpResponse) { option (google.api.http) = { - post: "/v1/dump/Start" + post: "/v1/dumps:start" body: "*" }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Start a New Dump" + description: "Start a new dump." + }; } // ListDumps returns a list of all pmm dumps. rpc ListDumps(ListDumpsRequest) returns (ListDumpsResponse) { - option (google.api.http) = { - post: "/v1/dump/List" - body: "*" + option (google.api.http) = {get: "/v1/dumps"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "List All Dumps" + description: "List all dumps" }; } // DeleteDump deletes specified pmm dump. rpc DeleteDump(DeleteDumpRequest) returns (DeleteDumpResponse) { option (google.api.http) = { - post: "/v1/dump/Delete" + post: "/v1/dumps:batchDelete" body: "*" }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Delete Dumps" + description: "Delete selected dumps." + }; } // GetLogs returns logs from pmm-dump tool. rpc GetDumpLogs(GetDumpLogsRequest) returns (GetDumpLogsResponse) { - option (google.api.http) = { - post: "/v1/dump/GetLogs" - body: "*" + option (google.api.http) = {get: "/v1/dumps/{dump_id}/logs"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Get Dump Logs" + description: "Get logs of a selected dump." }; } - // UploadDump uploads selected dumps to remote server. + // UploadDump uploads selected dumps to a remote server. rpc UploadDump(UploadDumpRequest) returns (UploadDumpResponse) { option (google.api.http) = { - post: "/v1/dump/Upload" + post: "/v1/dumps:upload" body: "*" }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Upload Dumps" + description: "Upload selected dumps to a remote server." + }; } } diff --git a/api/dump/v1/dump_grpc.pb.go b/api/dump/v1/dump_grpc.pb.go index 0e0e7b8cfa..51548ca1e1 100644 --- a/api/dump/v1/dump_grpc.pb.go +++ b/api/dump/v1/dump_grpc.pb.go @@ -20,17 +20,17 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - DumpsService_StartDump_FullMethodName = "/dump.v1beta1.DumpsService/StartDump" - DumpsService_ListDumps_FullMethodName = "/dump.v1beta1.DumpsService/ListDumps" - DumpsService_DeleteDump_FullMethodName = "/dump.v1beta1.DumpsService/DeleteDump" - DumpsService_GetDumpLogs_FullMethodName = "/dump.v1beta1.DumpsService/GetDumpLogs" - DumpsService_UploadDump_FullMethodName = "/dump.v1beta1.DumpsService/UploadDump" + DumpService_StartDump_FullMethodName = "/dump.v1beta1.DumpService/StartDump" + DumpService_ListDumps_FullMethodName = "/dump.v1beta1.DumpService/ListDumps" + DumpService_DeleteDump_FullMethodName = "/dump.v1beta1.DumpService/DeleteDump" + DumpService_GetDumpLogs_FullMethodName = "/dump.v1beta1.DumpService/GetDumpLogs" + DumpService_UploadDump_FullMethodName = "/dump.v1beta1.DumpService/UploadDump" ) -// DumpsServiceClient is the client API for DumpsService service. +// DumpServiceClient is the client API for DumpService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type DumpsServiceClient interface { +type DumpServiceClient interface { // StartDump request creates pmm dump. StartDump(ctx context.Context, in *StartDumpRequest, opts ...grpc.CallOption) (*StartDumpResponse, error) // ListDumps returns a list of all pmm dumps. @@ -39,67 +39,67 @@ type DumpsServiceClient interface { DeleteDump(ctx context.Context, in *DeleteDumpRequest, opts ...grpc.CallOption) (*DeleteDumpResponse, error) // GetLogs returns logs from pmm-dump tool. GetDumpLogs(ctx context.Context, in *GetDumpLogsRequest, opts ...grpc.CallOption) (*GetDumpLogsResponse, error) - // UploadDump uploads selected dumps to remote server. + // UploadDump uploads selected dumps to a remote server. UploadDump(ctx context.Context, in *UploadDumpRequest, opts ...grpc.CallOption) (*UploadDumpResponse, error) } -type dumpsServiceClient struct { +type dumpServiceClient struct { cc grpc.ClientConnInterface } -func NewDumpsServiceClient(cc grpc.ClientConnInterface) DumpsServiceClient { - return &dumpsServiceClient{cc} +func NewDumpServiceClient(cc grpc.ClientConnInterface) DumpServiceClient { + return &dumpServiceClient{cc} } -func (c *dumpsServiceClient) StartDump(ctx context.Context, in *StartDumpRequest, opts ...grpc.CallOption) (*StartDumpResponse, error) { +func (c *dumpServiceClient) StartDump(ctx context.Context, in *StartDumpRequest, opts ...grpc.CallOption) (*StartDumpResponse, error) { out := new(StartDumpResponse) - err := c.cc.Invoke(ctx, DumpsService_StartDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_StartDump_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *dumpsServiceClient) ListDumps(ctx context.Context, in *ListDumpsRequest, opts ...grpc.CallOption) (*ListDumpsResponse, error) { +func (c *dumpServiceClient) ListDumps(ctx context.Context, in *ListDumpsRequest, opts ...grpc.CallOption) (*ListDumpsResponse, error) { out := new(ListDumpsResponse) - err := c.cc.Invoke(ctx, DumpsService_ListDumps_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_ListDumps_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *dumpsServiceClient) DeleteDump(ctx context.Context, in *DeleteDumpRequest, opts ...grpc.CallOption) (*DeleteDumpResponse, error) { +func (c *dumpServiceClient) DeleteDump(ctx context.Context, in *DeleteDumpRequest, opts ...grpc.CallOption) (*DeleteDumpResponse, error) { out := new(DeleteDumpResponse) - err := c.cc.Invoke(ctx, DumpsService_DeleteDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_DeleteDump_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *dumpsServiceClient) GetDumpLogs(ctx context.Context, in *GetDumpLogsRequest, opts ...grpc.CallOption) (*GetDumpLogsResponse, error) { +func (c *dumpServiceClient) GetDumpLogs(ctx context.Context, in *GetDumpLogsRequest, opts ...grpc.CallOption) (*GetDumpLogsResponse, error) { out := new(GetDumpLogsResponse) - err := c.cc.Invoke(ctx, DumpsService_GetDumpLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_GetDumpLogs_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *dumpsServiceClient) UploadDump(ctx context.Context, in *UploadDumpRequest, opts ...grpc.CallOption) (*UploadDumpResponse, error) { +func (c *dumpServiceClient) UploadDump(ctx context.Context, in *UploadDumpRequest, opts ...grpc.CallOption) (*UploadDumpResponse, error) { out := new(UploadDumpResponse) - err := c.cc.Invoke(ctx, DumpsService_UploadDump_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DumpService_UploadDump_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// DumpsServiceServer is the server API for DumpsService service. -// All implementations must embed UnimplementedDumpsServiceServer +// DumpServiceServer is the server API for DumpService service. +// All implementations must embed UnimplementedDumpServiceServer // for forward compatibility -type DumpsServiceServer interface { +type DumpServiceServer interface { // StartDump request creates pmm dump. StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) // ListDumps returns a list of all pmm dumps. @@ -108,162 +108,162 @@ type DumpsServiceServer interface { DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) // GetLogs returns logs from pmm-dump tool. GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) - // UploadDump uploads selected dumps to remote server. + // UploadDump uploads selected dumps to a remote server. UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) - mustEmbedUnimplementedDumpsServiceServer() + mustEmbedUnimplementedDumpServiceServer() } -// UnimplementedDumpsServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDumpsServiceServer struct{} +// UnimplementedDumpServiceServer must be embedded to have forward compatible implementations. +type UnimplementedDumpServiceServer struct{} -func (UnimplementedDumpsServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { +func (UnimplementedDumpServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartDump not implemented") } -func (UnimplementedDumpsServiceServer) ListDumps(context.Context, *ListDumpsRequest) (*ListDumpsResponse, error) { +func (UnimplementedDumpServiceServer) ListDumps(context.Context, *ListDumpsRequest) (*ListDumpsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDumps not implemented") } -func (UnimplementedDumpsServiceServer) DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) { +func (UnimplementedDumpServiceServer) DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDump not implemented") } -func (UnimplementedDumpsServiceServer) GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) { +func (UnimplementedDumpServiceServer) GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDumpLogs not implemented") } -func (UnimplementedDumpsServiceServer) UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) { +func (UnimplementedDumpServiceServer) UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadDump not implemented") } -func (UnimplementedDumpsServiceServer) mustEmbedUnimplementedDumpsServiceServer() {} +func (UnimplementedDumpServiceServer) mustEmbedUnimplementedDumpServiceServer() {} -// UnsafeDumpsServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DumpsServiceServer will +// UnsafeDumpServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DumpServiceServer will // result in compilation errors. -type UnsafeDumpsServiceServer interface { - mustEmbedUnimplementedDumpsServiceServer() +type UnsafeDumpServiceServer interface { + mustEmbedUnimplementedDumpServiceServer() } -func RegisterDumpsServiceServer(s grpc.ServiceRegistrar, srv DumpsServiceServer) { - s.RegisterService(&DumpsService_ServiceDesc, srv) +func RegisterDumpServiceServer(s grpc.ServiceRegistrar, srv DumpServiceServer) { + s.RegisterService(&DumpService_ServiceDesc, srv) } -func _DumpsService_StartDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _DumpService_StartDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StartDumpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DumpsServiceServer).StartDump(ctx, in) + return srv.(DumpServiceServer).StartDump(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DumpsService_StartDump_FullMethodName, + FullMethod: DumpService_StartDump_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DumpsServiceServer).StartDump(ctx, req.(*StartDumpRequest)) + return srv.(DumpServiceServer).StartDump(ctx, req.(*StartDumpRequest)) } return interceptor(ctx, in, info, handler) } -func _DumpsService_ListDumps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _DumpService_ListDumps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListDumpsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DumpsServiceServer).ListDumps(ctx, in) + return srv.(DumpServiceServer).ListDumps(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DumpsService_ListDumps_FullMethodName, + FullMethod: DumpService_ListDumps_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DumpsServiceServer).ListDumps(ctx, req.(*ListDumpsRequest)) + return srv.(DumpServiceServer).ListDumps(ctx, req.(*ListDumpsRequest)) } return interceptor(ctx, in, info, handler) } -func _DumpsService_DeleteDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _DumpService_DeleteDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteDumpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DumpsServiceServer).DeleteDump(ctx, in) + return srv.(DumpServiceServer).DeleteDump(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DumpsService_DeleteDump_FullMethodName, + FullMethod: DumpService_DeleteDump_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DumpsServiceServer).DeleteDump(ctx, req.(*DeleteDumpRequest)) + return srv.(DumpServiceServer).DeleteDump(ctx, req.(*DeleteDumpRequest)) } return interceptor(ctx, in, info, handler) } -func _DumpsService_GetDumpLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _DumpService_GetDumpLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDumpLogsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DumpsServiceServer).GetDumpLogs(ctx, in) + return srv.(DumpServiceServer).GetDumpLogs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DumpsService_GetDumpLogs_FullMethodName, + FullMethod: DumpService_GetDumpLogs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DumpsServiceServer).GetDumpLogs(ctx, req.(*GetDumpLogsRequest)) + return srv.(DumpServiceServer).GetDumpLogs(ctx, req.(*GetDumpLogsRequest)) } return interceptor(ctx, in, info, handler) } -func _DumpsService_UploadDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _DumpService_UploadDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UploadDumpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DumpsServiceServer).UploadDump(ctx, in) + return srv.(DumpServiceServer).UploadDump(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DumpsService_UploadDump_FullMethodName, + FullMethod: DumpService_UploadDump_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DumpsServiceServer).UploadDump(ctx, req.(*UploadDumpRequest)) + return srv.(DumpServiceServer).UploadDump(ctx, req.(*UploadDumpRequest)) } return interceptor(ctx, in, info, handler) } -// DumpsService_ServiceDesc is the grpc.ServiceDesc for DumpsService service. +// DumpService_ServiceDesc is the grpc.ServiceDesc for DumpService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var DumpsService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dump.v1beta1.DumpsService", - HandlerType: (*DumpsServiceServer)(nil), +var DumpService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "dump.v1beta1.DumpService", + HandlerType: (*DumpServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "StartDump", - Handler: _DumpsService_StartDump_Handler, + Handler: _DumpService_StartDump_Handler, }, { MethodName: "ListDumps", - Handler: _DumpsService_ListDumps_Handler, + Handler: _DumpService_ListDumps_Handler, }, { MethodName: "DeleteDump", - Handler: _DumpsService_DeleteDump_Handler, + Handler: _DumpService_DeleteDump_Handler, }, { MethodName: "GetDumpLogs", - Handler: _DumpsService_GetDumpLogs_Handler, + Handler: _DumpService_GetDumpLogs_Handler, }, { MethodName: "UploadDump", - Handler: _DumpsService_UploadDump_Handler, + Handler: _DumpService_UploadDump_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/dump/v1/json/client/dumps_service/delete_dump_parameters.go b/api/dump/v1/json/client/dump_service/delete_dump_parameters.go similarity index 99% rename from api/dump/v1/json/client/dumps_service/delete_dump_parameters.go rename to api/dump/v1/json/client/dump_service/delete_dump_parameters.go index 8f38021b9e..0c83d67b57 100644 --- a/api/dump/v1/json/client/dumps_service/delete_dump_parameters.go +++ b/api/dump/v1/json/client/dump_service/delete_dump_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/dump/v1/json/client/dumps_service/delete_dump_responses.go b/api/dump/v1/json/client/dump_service/delete_dump_responses.go similarity index 97% rename from api/dump/v1/json/client/dumps_service/delete_dump_responses.go rename to api/dump/v1/json/client/dump_service/delete_dump_responses.go index 3d538618da..7b0787e6ae 100644 --- a/api/dump/v1/json/client/dumps_service/delete_dump_responses.go +++ b/api/dump/v1/json/client/dump_service/delete_dump_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -58,7 +58,7 @@ type DeleteDumpOK struct { } func (o *DeleteDumpOK) Error() string { - return fmt.Sprintf("[POST /v1/dump/Delete][%d] deleteDumpOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:batchDelete][%d] deleteDumpOk %+v", 200, o.Payload) } func (o *DeleteDumpOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *DeleteDumpDefault) Code() int { } func (o *DeleteDumpDefault) Error() string { - return fmt.Sprintf("[POST /v1/dump/Delete][%d] DeleteDump default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:batchDelete][%d] DeleteDump default %+v", o._statusCode, o.Payload) } func (o *DeleteDumpDefault) GetPayload() *DeleteDumpDefaultBody { diff --git a/api/dump/v1/json/client/dumps_service/dumps_service_client.go b/api/dump/v1/json/client/dump_service/dump_service_client.go similarity index 91% rename from api/dump/v1/json/client/dumps_service/dumps_service_client.go rename to api/dump/v1/json/client/dump_service/dump_service_client.go index e251964ced..b1c8797af5 100644 --- a/api/dump/v1/json/client/dumps_service/dumps_service_client.go +++ b/api/dump/v1/json/client/dump_service/dump_service_client.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -10,13 +10,13 @@ import ( "github.com/go-openapi/strfmt" ) -// New creates a new dumps service API client. +// New creates a new dump service API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } /* -Client for dumps service API +Client for dump service API */ type Client struct { transport runtime.ClientTransport @@ -42,7 +42,9 @@ type ClientService interface { } /* -DeleteDump deletes dump deletes specified pmm dump +DeleteDump deletes dumps + +Delete selected dumps. */ func (a *Client) DeleteDump(params *DeleteDumpParams, opts ...ClientOption) (*DeleteDumpOK, error) { // TODO: Validate the params before sending @@ -52,7 +54,7 @@ func (a *Client) DeleteDump(params *DeleteDumpParams, opts ...ClientOption) (*De op := &runtime.ClientOperation{ ID: "DeleteDump", Method: "POST", - PathPattern: "/v1/dump/Delete", + PathPattern: "/v1/dumps:batchDelete", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -79,7 +81,9 @@ func (a *Client) DeleteDump(params *DeleteDumpParams, opts ...ClientOption) (*De } /* -GetDumpLogs gets logs returns logs from pmm dump tool +GetDumpLogs gets dump logs + +Get logs of a selected dump. */ func (a *Client) GetDumpLogs(params *GetDumpLogsParams, opts ...ClientOption) (*GetDumpLogsOK, error) { // TODO: Validate the params before sending @@ -88,8 +92,8 @@ func (a *Client) GetDumpLogs(params *GetDumpLogsParams, opts ...ClientOption) (* } op := &runtime.ClientOperation{ ID: "GetDumpLogs", - Method: "POST", - PathPattern: "/v1/dump/GetLogs", + Method: "GET", + PathPattern: "/v1/dumps/{dump_id}/logs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -116,7 +120,9 @@ func (a *Client) GetDumpLogs(params *GetDumpLogsParams, opts ...ClientOption) (* } /* -ListDumps lists dumps returns a list of all pmm dumps +ListDumps lists all dumps + +List all dumps */ func (a *Client) ListDumps(params *ListDumpsParams, opts ...ClientOption) (*ListDumpsOK, error) { // TODO: Validate the params before sending @@ -125,8 +131,8 @@ func (a *Client) ListDumps(params *ListDumpsParams, opts ...ClientOption) (*List } op := &runtime.ClientOperation{ ID: "ListDumps", - Method: "POST", - PathPattern: "/v1/dump/List", + Method: "GET", + PathPattern: "/v1/dumps", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -153,7 +159,9 @@ func (a *Client) ListDumps(params *ListDumpsParams, opts ...ClientOption) (*List } /* -StartDump starts dump request creates pmm dump +StartDump starts a new dump + +Start a new dump. */ func (a *Client) StartDump(params *StartDumpParams, opts ...ClientOption) (*StartDumpOK, error) { // TODO: Validate the params before sending @@ -163,7 +171,7 @@ func (a *Client) StartDump(params *StartDumpParams, opts ...ClientOption) (*Star op := &runtime.ClientOperation{ ID: "StartDump", Method: "POST", - PathPattern: "/v1/dump/Start", + PathPattern: "/v1/dumps:start", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -190,7 +198,9 @@ func (a *Client) StartDump(params *StartDumpParams, opts ...ClientOption) (*Star } /* -UploadDump uploads dump uploads selected dumps to remote server +UploadDump uploads dumps + +Upload selected dumps to a remote server. */ func (a *Client) UploadDump(params *UploadDumpParams, opts ...ClientOption) (*UploadDumpOK, error) { // TODO: Validate the params before sending @@ -200,7 +210,7 @@ func (a *Client) UploadDump(params *UploadDumpParams, opts ...ClientOption) (*Up op := &runtime.ClientOperation{ ID: "UploadDump", Method: "POST", - PathPattern: "/v1/dump/Upload", + PathPattern: "/v1/dumps:upload", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/api/dump/v1/json/client/dumps_service/get_dump_logs_parameters.go b/api/dump/v1/json/client/dump_service/get_dump_logs_parameters.go similarity index 68% rename from api/dump/v1/json/client/dumps_service/get_dump_logs_parameters.go rename to api/dump/v1/json/client/dump_service/get_dump_logs_parameters.go index f6a540d93a..82ed2997d2 100644 --- a/api/dump/v1/json/client/dumps_service/get_dump_logs_parameters.go +++ b/api/dump/v1/json/client/dump_service/get_dump_logs_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetDumpLogsParams creates a new GetDumpLogsParams object, @@ -60,8 +61,18 @@ GetDumpLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetDumpLogsParams struct { - // Body. - Body GetDumpLogsBody + // DumpID. + DumpID string + + // Limit. + // + // Format: int64 + Limit *int64 + + // Offset. + // + // Format: int64 + Offset *int64 timeout time.Duration Context context.Context @@ -116,15 +127,37 @@ func (o *GetDumpLogsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the get dump logs params -func (o *GetDumpLogsParams) WithBody(body GetDumpLogsBody) *GetDumpLogsParams { - o.SetBody(body) +// WithDumpID adds the dumpID to the get dump logs params +func (o *GetDumpLogsParams) WithDumpID(dumpID string) *GetDumpLogsParams { + o.SetDumpID(dumpID) return o } -// SetBody adds the body to the get dump logs params -func (o *GetDumpLogsParams) SetBody(body GetDumpLogsBody) { - o.Body = body +// SetDumpID adds the dumpId to the get dump logs params +func (o *GetDumpLogsParams) SetDumpID(dumpID string) { + o.DumpID = dumpID +} + +// WithLimit adds the limit to the get dump logs params +func (o *GetDumpLogsParams) WithLimit(limit *int64) *GetDumpLogsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get dump logs params +func (o *GetDumpLogsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get dump logs params +func (o *GetDumpLogsParams) WithOffset(offset *int64) *GetDumpLogsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get dump logs params +func (o *GetDumpLogsParams) SetOffset(offset *int64) { + o.Offset = offset } // WriteToRequest writes these params to a swagger request @@ -133,10 +166,44 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { + + // path param dump_id + if err := r.SetPathParam("dump_id", o.DumpID); err != nil { return err } + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/dump/v1/json/client/dumps_service/get_dump_logs_responses.go b/api/dump/v1/json/client/dump_service/get_dump_logs_responses.go similarity index 89% rename from api/dump/v1/json/client/dumps_service/get_dump_logs_responses.go rename to api/dump/v1/json/client/dump_service/get_dump_logs_responses.go index e448fa2740..403516e70e 100644 --- a/api/dump/v1/json/client/dumps_service/get_dump_logs_responses.go +++ b/api/dump/v1/json/client/dump_service/get_dump_logs_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -58,7 +58,7 @@ type GetDumpLogsOK struct { } func (o *GetDumpLogsOK) Error() string { - return fmt.Sprintf("[POST /v1/dump/GetLogs][%d] getDumpLogsOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/dumps/{dump_id}/logs][%d] getDumpLogsOk %+v", 200, o.Payload) } func (o *GetDumpLogsOK) GetPayload() *GetDumpLogsOKBody { @@ -100,7 +100,7 @@ func (o *GetDumpLogsDefault) Code() int { } func (o *GetDumpLogsDefault) Error() string { - return fmt.Sprintf("[POST /v1/dump/GetLogs][%d] GetDumpLogs default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/dumps/{dump_id}/logs][%d] GetDumpLogs default %+v", o._statusCode, o.Payload) } func (o *GetDumpLogsDefault) GetPayload() *GetDumpLogsDefaultBody { @@ -118,49 +118,6 @@ func (o *GetDumpLogsDefault) readResponse(response runtime.ClientResponse, consu return nil } -/* -GetDumpLogsBody get dump logs body -swagger:model GetDumpLogsBody -*/ -type GetDumpLogsBody struct { - // dump id - DumpID string `json:"dump_id,omitempty"` - - // offset - Offset int64 `json:"offset,omitempty"` - - // limit - Limit int64 `json:"limit,omitempty"` -} - -// Validate validates this get dump logs body -func (o *GetDumpLogsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get dump logs body based on context it is used -func (o *GetDumpLogsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDumpLogsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDumpLogsBody) UnmarshalBinary(b []byte) error { - var res GetDumpLogsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* GetDumpLogsDefaultBody get dump logs default body swagger:model GetDumpLogsDefaultBody diff --git a/api/dump/v1/json/client/dumps_service/list_dumps_parameters.go b/api/dump/v1/json/client/dump_service/list_dumps_parameters.go similarity index 89% rename from api/dump/v1/json/client/dumps_service/list_dumps_parameters.go rename to api/dump/v1/json/client/dump_service/list_dumps_parameters.go index f14f6129ae..dc28a36ad4 100644 --- a/api/dump/v1/json/client/dumps_service/list_dumps_parameters.go +++ b/api/dump/v1/json/client/dump_service/list_dumps_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -60,9 +60,6 @@ ListDumpsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListDumpsParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *ListDumpsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the list dumps params -func (o *ListDumpsParams) WithBody(body interface{}) *ListDumpsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list dumps params -func (o *ListDumpsParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *ListDumpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/dump/v1/json/client/dumps_service/list_dumps_responses.go b/api/dump/v1/json/client/dump_service/list_dumps_responses.go similarity index 98% rename from api/dump/v1/json/client/dumps_service/list_dumps_responses.go rename to api/dump/v1/json/client/dump_service/list_dumps_responses.go index 272f2fe658..530626f983 100644 --- a/api/dump/v1/json/client/dumps_service/list_dumps_responses.go +++ b/api/dump/v1/json/client/dump_service/list_dumps_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -60,7 +60,7 @@ type ListDumpsOK struct { } func (o *ListDumpsOK) Error() string { - return fmt.Sprintf("[POST /v1/dump/List][%d] listDumpsOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/dumps][%d] listDumpsOk %+v", 200, o.Payload) } func (o *ListDumpsOK) GetPayload() *ListDumpsOKBody { @@ -102,7 +102,7 @@ func (o *ListDumpsDefault) Code() int { } func (o *ListDumpsDefault) Error() string { - return fmt.Sprintf("[POST /v1/dump/List][%d] ListDumps default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/dumps][%d] ListDumps default %+v", o._statusCode, o.Payload) } func (o *ListDumpsDefault) GetPayload() *ListDumpsDefaultBody { diff --git a/api/dump/v1/json/client/dumps_service/start_dump_parameters.go b/api/dump/v1/json/client/dump_service/start_dump_parameters.go similarity index 99% rename from api/dump/v1/json/client/dumps_service/start_dump_parameters.go rename to api/dump/v1/json/client/dump_service/start_dump_parameters.go index 9d363e2a60..ac9f2ba90e 100644 --- a/api/dump/v1/json/client/dumps_service/start_dump_parameters.go +++ b/api/dump/v1/json/client/dump_service/start_dump_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/dump/v1/json/client/dumps_service/start_dump_responses.go b/api/dump/v1/json/client/dump_service/start_dump_responses.go similarity index 97% rename from api/dump/v1/json/client/dumps_service/start_dump_responses.go rename to api/dump/v1/json/client/dump_service/start_dump_responses.go index 608e9c11e6..e5044795e3 100644 --- a/api/dump/v1/json/client/dumps_service/start_dump_responses.go +++ b/api/dump/v1/json/client/dump_service/start_dump_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -59,7 +59,7 @@ type StartDumpOK struct { } func (o *StartDumpOK) Error() string { - return fmt.Sprintf("[POST /v1/dump/Start][%d] startDumpOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:start][%d] startDumpOk %+v", 200, o.Payload) } func (o *StartDumpOK) GetPayload() *StartDumpOKBody { @@ -101,7 +101,7 @@ func (o *StartDumpDefault) Code() int { } func (o *StartDumpDefault) Error() string { - return fmt.Sprintf("[POST /v1/dump/Start][%d] StartDump default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:start][%d] StartDump default %+v", o._statusCode, o.Payload) } func (o *StartDumpDefault) GetPayload() *StartDumpDefaultBody { diff --git a/api/dump/v1/json/client/dumps_service/upload_dump_parameters.go b/api/dump/v1/json/client/dump_service/upload_dump_parameters.go similarity index 99% rename from api/dump/v1/json/client/dumps_service/upload_dump_parameters.go rename to api/dump/v1/json/client/dump_service/upload_dump_parameters.go index b379593b0d..0be24f481a 100644 --- a/api/dump/v1/json/client/dumps_service/upload_dump_parameters.go +++ b/api/dump/v1/json/client/dump_service/upload_dump_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/dump/v1/json/client/dumps_service/upload_dump_responses.go b/api/dump/v1/json/client/dump_service/upload_dump_responses.go similarity index 97% rename from api/dump/v1/json/client/dumps_service/upload_dump_responses.go rename to api/dump/v1/json/client/dump_service/upload_dump_responses.go index 82ba19ee41..fc58967780 100644 --- a/api/dump/v1/json/client/dumps_service/upload_dump_responses.go +++ b/api/dump/v1/json/client/dump_service/upload_dump_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package dumps_service +package dump_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -58,7 +58,7 @@ type UploadDumpOK struct { } func (o *UploadDumpOK) Error() string { - return fmt.Sprintf("[POST /v1/dump/Upload][%d] uploadDumpOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:upload][%d] uploadDumpOk %+v", 200, o.Payload) } func (o *UploadDumpOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *UploadDumpDefault) Code() int { } func (o *UploadDumpDefault) Error() string { - return fmt.Sprintf("[POST /v1/dump/Upload][%d] UploadDump default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/dumps:upload][%d] UploadDump default %+v", o._statusCode, o.Payload) } func (o *UploadDumpDefault) GetPayload() *UploadDumpDefaultBody { diff --git a/api/dump/v1/json/client/pmm_dump_api_client.go b/api/dump/v1/json/client/pmm_dump_api_client.go index 250f4aa4f6..37a60e545f 100644 --- a/api/dump/v1/json/client/pmm_dump_api_client.go +++ b/api/dump/v1/json/client/pmm_dump_api_client.go @@ -10,7 +10,7 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/percona/pmm/api/dump/v1/json/client/dumps_service" + "github.com/percona/pmm/api/dump/v1/json/client/dump_service" ) // Default PMM dump API HTTP client. @@ -55,7 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMDumpAPI cli := new(PMMDumpAPI) cli.Transport = transport - cli.DumpsService = dumps_service.New(transport, formats) + cli.DumpService = dump_service.New(transport, formats) return cli } @@ -100,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PMMDumpAPI is a client for PMM dump API type PMMDumpAPI struct { - DumpsService dumps_service.ClientService + DumpService dump_service.ClientService Transport runtime.ClientTransport } @@ -108,5 +108,5 @@ type PMMDumpAPI struct { // SetTransport changes the transport on the client and all its subresources func (c *PMMDumpAPI) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.DumpsService.SetTransport(transport) + c.DumpService.SetTransport(transport) } diff --git a/api/dump/v1/json/v1.json b/api/dump/v1/json/v1.json index 71bb22db10..30693f20d9 100644 --- a/api/dump/v1/json/v1.json +++ b/api/dump/v1/json/v1.json @@ -15,38 +15,68 @@ "version": "v1beta1" }, "paths": { - "/v1/dump/Delete": { - "post": { + "/v1/dumps": { + "get": { + "description": "List all dumps", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "DeleteDump deletes specified pmm dump.", - "operationId": "DeleteDump", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "summary": "List All Dumps", + "operationId": "ListDumps", + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "dump_ids": { + "dumps": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "dump_id": { + "type": "string", + "x-order": 0 + }, + "end_time": { + "type": "string", + "format": "date-time", + "x-order": 4 + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "start_time": { + "type": "string", + "format": "date-time", + "x-order": 3 + }, + "status": { + "type": "string", + "default": "DUMP_STATUS_UNSPECIFIED", + "enum": [ + "DUMP_STATUS_UNSPECIFIED", + "DUMP_STATUS_IN_PROGRESS", + "DUMP_STATUS_SUCCESS", + "DUMP_STATUS_ERROR" + ], + "x-order": 1 + } + } }, "x-order": 0 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -82,37 +112,32 @@ } } }, - "/v1/dump/GetLogs": { - "post": { + "/v1/dumps/{dump_id}/logs": { + "get": { + "description": "Get logs of a selected dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "GetLogs returns logs from pmm-dump tool.", + "summary": "Get Dump Logs", "operationId": "GetDumpLogs", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "dump_id": { - "type": "string", - "x-order": 0 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 2 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 1 - } - } - } + "type": "string", + "name": "dump_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "offset", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "limit", + "in": "query" } ], "responses": { @@ -181,77 +206,39 @@ } } }, - "/v1/dump/List": { + "/v1/dumps:batchDelete": { "post": { + "description": "Delete selected dumps.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "ListDumps returns a list of all pmm dumps.", - "operationId": "ListDumps", + "summary": "Delete Dumps", + "operationId": "DeleteDump", "parameters": [ { "name": "body", "in": "body", "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", "schema": { "type": "object", "properties": { - "dumps": { + "dump_ids": { "type": "array", "items": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-order": 5 - }, - "dump_id": { - "type": "string", - "x-order": 0 - }, - "end_time": { - "type": "string", - "format": "date-time", - "x-order": 4 - }, - "service_names": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - }, - "start_time": { - "type": "string", - "format": "date-time", - "x-order": 3 - }, - "status": { - "type": "string", - "default": "DUMP_STATUS_UNSPECIFIED", - "enum": [ - "DUMP_STATUS_UNSPECIFIED", - "DUMP_STATUS_IN_PROGRESS", - "DUMP_STATUS_SUCCESS", - "DUMP_STATUS_ERROR" - ], - "x-order": 1 - } - } + "type": "string" }, "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -287,12 +274,13 @@ } } }, - "/v1/dump/Start": { + "/v1/dumps:start": { "post": { + "description": "Start a new dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "StartDump request creates pmm dump.", + "summary": "Start a New Dump", "operationId": "StartDump", "parameters": [ { @@ -378,12 +366,13 @@ } } }, - "/v1/dump/Upload": { + "/v1/dumps:upload": { "post": { + "description": "Upload selected dumps to a remote server.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "UploadDump uploads selected dumps to remote server.", + "summary": "Upload Dumps", "operationId": "UploadDump", "parameters": [ { @@ -470,7 +459,7 @@ }, "tags": [ { - "name": "DumpsService" + "name": "DumpService" } ] } \ No newline at end of file diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index d511cd5358..292904d735 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -2151,211 +2151,6 @@ } } }, - "/v1/backup/locations": { - "get": { - "description": "List backup locations.", - "tags": [ - "LocationsService" - ], - "summary": "List Backup Locations", - "operationId": "ListLocations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "locations": { - "type": "array", - "items": { - "description": "Location represents single Backup Location.", - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Location name", - "x-order": 1 - }, - "description": { - "type": "string", - "title": "Short description", - "x-order": 2 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 4 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/backup/locations:testConfig": { - "post": { - "description": "Test a backup location and credentials.", - "tags": [ - "LocationsService" - ], - "summary": "Test a Backup Location and Credentials", - "operationId": "TestLocationConfig", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/backups/artifacts": { "get": { "tags": [ @@ -2708,6 +2503,114 @@ } }, "/v1/backups/locations": { + "get": { + "description": "List backup locations.", + "tags": [ + "LocationsService" + ], + "summary": "List Backup Locations", + "operationId": "ListLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "description": "Location represents single Backup Location.", + "type": "object", + "properties": { + "location_id": { + "description": "Machine-readable ID.", + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "title": "Location name", + "x-order": 1 + }, + "description": { + "type": "string", + "title": "Short description", + "x-order": 2 + }, + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 3 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "x-order": 0 + }, + "access_key": { + "type": "string", + "x-order": 1 + }, + "secret_key": { + "type": "string", + "x-order": 2 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + } + }, + "x-order": 4 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + }, "post": { "description": "Add a backup location.", "tags": [ @@ -2991,6 +2894,101 @@ } } }, + "/v1/backups/locations:testConfig": { + "post": { + "description": "Test a backup location and credentials.", + "tags": [ + "LocationsService" + ], + "summary": "Test a Backup Location and Credentials", + "operationId": "TestLocationConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 0 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "x-order": 0 + }, + "access_key": { + "type": "string", + "x-order": 1 + }, + "secret_key": { + "type": "string", + "x-order": 2 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + } + }, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/backups/restores": { "get": { "description": "List all backup restore history items", @@ -4127,38 +4125,68 @@ } } }, - "/v1/dump/Delete": { - "post": { + "/v1/dumps": { + "get": { + "description": "List all dumps", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "DeleteDump deletes specified pmm dump.", - "operationId": "DeleteDump", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "summary": "List All Dumps", + "operationId": "ListDumps", + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "dump_ids": { + "dumps": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "dump_id": { + "type": "string", + "x-order": 0 + }, + "status": { + "type": "string", + "default": "DUMP_STATUS_UNSPECIFIED", + "enum": [ + "DUMP_STATUS_UNSPECIFIED", + "DUMP_STATUS_IN_PROGRESS", + "DUMP_STATUS_SUCCESS", + "DUMP_STATUS_ERROR" + ], + "x-order": 1 + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "start_time": { + "type": "string", + "format": "date-time", + "x-order": 3 + }, + "end_time": { + "type": "string", + "format": "date-time", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + } + } }, "x-order": 0 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -4194,37 +4222,32 @@ } } }, - "/v1/dump/GetLogs": { - "post": { + "/v1/dumps/{dump_id}/logs": { + "get": { + "description": "Get logs of a selected dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "GetLogs returns logs from pmm-dump tool.", + "summary": "Get Dump Logs", "operationId": "GetDumpLogs", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "dump_id": { - "type": "string", - "x-order": 0 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 2 - } - } - } + "type": "string", + "name": "dump_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "offset", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "limit", + "in": "query" } ], "responses": { @@ -4293,77 +4316,39 @@ } } }, - "/v1/dump/List": { + "/v1/dumps:batchDelete": { "post": { + "description": "Delete selected dumps.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "ListDumps returns a list of all pmm dumps.", - "operationId": "ListDumps", + "summary": "Delete Dumps", + "operationId": "DeleteDump", "parameters": [ { "name": "body", "in": "body", "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", "schema": { "type": "object", "properties": { - "dumps": { + "dump_ids": { "type": "array", "items": { - "type": "object", - "properties": { - "dump_id": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "default": "DUMP_STATUS_UNSPECIFIED", - "enum": [ - "DUMP_STATUS_UNSPECIFIED", - "DUMP_STATUS_IN_PROGRESS", - "DUMP_STATUS_SUCCESS", - "DUMP_STATUS_ERROR" - ], - "x-order": 1 - }, - "service_names": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - }, - "start_time": { - "type": "string", - "format": "date-time", - "x-order": 3 - }, - "end_time": { - "type": "string", - "format": "date-time", - "x-order": 4 - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-order": 5 - } - } + "type": "string" }, "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -4399,12 +4384,13 @@ } } }, - "/v1/dump/Start": { + "/v1/dumps:start": { "post": { + "description": "Start a new dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "StartDump request creates pmm dump.", + "summary": "Start a New Dump", "operationId": "StartDump", "parameters": [ { @@ -4490,12 +4476,13 @@ } } }, - "/v1/dump/Upload": { + "/v1/dumps:upload": { "post": { + "description": "Upload selected dumps to a remote server.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "UploadDump uploads selected dumps to remote server.", + "summary": "Upload Dumps", "operationId": "UploadDump", "parameters": [ { @@ -26930,7 +26917,7 @@ "name": "RestoreService" }, { - "name": "DumpsService" + "name": "DumpService" }, { "name": "RoleService" diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 9a88e62ba0..2f281eea29 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -2150,211 +2150,6 @@ } } }, - "/v1/backup/locations": { - "get": { - "description": "List backup locations.", - "tags": [ - "LocationsService" - ], - "summary": "List Backup Locations", - "operationId": "ListLocations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "locations": { - "type": "array", - "items": { - "description": "Location represents single Backup Location.", - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Location name", - "x-order": 1 - }, - "description": { - "type": "string", - "title": "Short description", - "x-order": 2 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 4 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/backup/locations:testConfig": { - "post": { - "description": "Test a backup location and credentials.", - "tags": [ - "LocationsService" - ], - "summary": "Test a Backup Location and Credentials", - "operationId": "TestLocationConfig", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/backups/artifacts": { "get": { "tags": [ @@ -2707,6 +2502,114 @@ } }, "/v1/backups/locations": { + "get": { + "description": "List backup locations.", + "tags": [ + "LocationsService" + ], + "summary": "List Backup Locations", + "operationId": "ListLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "description": "Location represents single Backup Location.", + "type": "object", + "properties": { + "location_id": { + "description": "Machine-readable ID.", + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "title": "Location name", + "x-order": 1 + }, + "description": { + "type": "string", + "title": "Short description", + "x-order": 2 + }, + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 3 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "x-order": 0 + }, + "access_key": { + "type": "string", + "x-order": 1 + }, + "secret_key": { + "type": "string", + "x-order": 2 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + } + }, + "x-order": 4 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + }, "post": { "description": "Add a backup location.", "tags": [ @@ -2990,6 +2893,101 @@ } } }, + "/v1/backups/locations:testConfig": { + "post": { + "description": "Test a backup location and credentials.", + "tags": [ + "LocationsService" + ], + "summary": "Test a Backup Location and Credentials", + "operationId": "TestLocationConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "filesystem_config": { + "description": "FilesystemLocationConfig represents file system location config.", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + } + }, + "x-order": 0 + }, + "s3_config": { + "description": "S3LocationConfig represents S3 bucket configuration.", + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "x-order": 0 + }, + "access_key": { + "type": "string", + "x-order": 1 + }, + "secret_key": { + "type": "string", + "x-order": 2 + }, + "bucket_name": { + "type": "string", + "x-order": 3 + } + }, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/backups/restores": { "get": { "description": "List all backup restore history items", @@ -4126,38 +4124,68 @@ } } }, - "/v1/dump/Delete": { - "post": { + "/v1/dumps": { + "get": { + "description": "List all dumps", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "DeleteDump deletes specified pmm dump.", - "operationId": "DeleteDump", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "summary": "List All Dumps", + "operationId": "ListDumps", + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "dump_ids": { + "dumps": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "dump_id": { + "type": "string", + "x-order": 0 + }, + "status": { + "type": "string", + "default": "DUMP_STATUS_UNSPECIFIED", + "enum": [ + "DUMP_STATUS_UNSPECIFIED", + "DUMP_STATUS_IN_PROGRESS", + "DUMP_STATUS_SUCCESS", + "DUMP_STATUS_ERROR" + ], + "x-order": 1 + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "start_time": { + "type": "string", + "format": "date-time", + "x-order": 3 + }, + "end_time": { + "type": "string", + "format": "date-time", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + } + } }, "x-order": 0 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -4193,37 +4221,32 @@ } } }, - "/v1/dump/GetLogs": { - "post": { + "/v1/dumps/{dump_id}/logs": { + "get": { + "description": "Get logs of a selected dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "GetLogs returns logs from pmm-dump tool.", + "summary": "Get Dump Logs", "operationId": "GetDumpLogs", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "dump_id": { - "type": "string", - "x-order": 0 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 2 - } - } - } + "type": "string", + "name": "dump_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "offset", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "limit", + "in": "query" } ], "responses": { @@ -4292,77 +4315,39 @@ } } }, - "/v1/dump/List": { + "/v1/dumps:batchDelete": { "post": { + "description": "Delete selected dumps.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "ListDumps returns a list of all pmm dumps.", - "operationId": "ListDumps", + "summary": "Delete Dumps", + "operationId": "DeleteDump", "parameters": [ { "name": "body", "in": "body", "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", "schema": { "type": "object", "properties": { - "dumps": { + "dump_ids": { "type": "array", "items": { - "type": "object", - "properties": { - "dump_id": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "default": "DUMP_STATUS_UNSPECIFIED", - "enum": [ - "DUMP_STATUS_UNSPECIFIED", - "DUMP_STATUS_IN_PROGRESS", - "DUMP_STATUS_SUCCESS", - "DUMP_STATUS_ERROR" - ], - "x-order": 1 - }, - "service_names": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - }, - "start_time": { - "type": "string", - "format": "date-time", - "x-order": 3 - }, - "end_time": { - "type": "string", - "format": "date-time", - "x-order": 4 - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-order": 5 - } - } + "type": "string" }, "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -4398,12 +4383,13 @@ } } }, - "/v1/dump/Start": { + "/v1/dumps:start": { "post": { + "description": "Start a new dump.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "StartDump request creates pmm dump.", + "summary": "Start a New Dump", "operationId": "StartDump", "parameters": [ { @@ -4489,12 +4475,13 @@ } } }, - "/v1/dump/Upload": { + "/v1/dumps:upload": { "post": { + "description": "Upload selected dumps to a remote server.", "tags": [ - "DumpsService" + "DumpService" ], - "summary": "UploadDump uploads selected dumps to remote server.", + "summary": "Upload Dumps", "operationId": "UploadDump", "parameters": [ { @@ -12794,7 +12781,7 @@ "name": "AlertingService" }, { - "name": "DumpsService" + "name": "DumpService" }, { "name": "CollectorService" diff --git a/descriptor.bin b/descriptor.bin index d455074be3..aab63aeff5 100644 Binary files a/descriptor.bin and b/descriptor.bin differ diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index bb25c480bd..845a993d14 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -278,7 +278,7 @@ func runGRPCServer(ctx context.Context, deps *gRPCServerDeps) { backuppb.RegisterArtifactsServiceServer(gRPCServer, mgmtArtifactsService) backuppb.RegisterRestoreServiceServer(gRPCServer, mgmtRestoreService) - dumpv1beta1.RegisterDumpsServiceServer(gRPCServer, managementdump.New(deps.db, deps.grafanaClient, deps.dumpService)) + dumpv1beta1.RegisterDumpServiceServer(gRPCServer, managementdump.New(deps.db, deps.grafanaClient, deps.dumpService)) userv1.RegisterUserServiceServer(gRPCServer, user.NewUserService(deps.db, deps.grafanaClient)) @@ -370,7 +370,7 @@ func runHTTP1Server(ctx context.Context, deps *http1ServerDeps) { backuppb.RegisterArtifactsServiceHandlerFromEndpoint, backuppb.RegisterRestoreServiceHandlerFromEndpoint, - dumpv1beta1.RegisterDumpsServiceHandlerFromEndpoint, + dumpv1beta1.RegisterDumpServiceHandlerFromEndpoint, platformv1.RegisterPlatformServiceHandlerFromEndpoint, uieventsv1.RegisterUIEventsServiceHandlerFromEndpoint, diff --git a/managed/services/management/dump/dump.go b/managed/services/management/dump/dump.go index b00d72396c..7c872e1d94 100644 --- a/managed/services/management/dump/dump.go +++ b/managed/services/management/dump/dump.go @@ -50,7 +50,7 @@ type Service struct { dumpService dumpService grafanaClient *grafana.Client - dumpv1beta1.UnimplementedDumpsServiceServer + dumpv1beta1.UnimplementedDumpServiceServer } // New creates a new instance of the Service with the provided dependencies.