diff --git a/api/docs.go b/api/docs.go index 1a56db6..88b6928 100644 --- a/api/docs.go +++ b/api/docs.go @@ -23,198 +23,6 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/config": { - "get": { - "description": "List all configs", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "List all configs", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.RestGetAllConfigResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "post": { - "description": "Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...)", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Create or Update config", - "parameters": [ - { - "description": "Key and Value for configuration", - "name": "config", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/common.ConfigReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "delete": { - "description": "Init all configs", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Init all configs", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, - "/config/{configId}": { - "get": { - "description": "Get config", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Get config", - "parameters": [ - { - "type": "string", - "description": "Config ID", - "name": "configId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "delete": { - "description": "Init config", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Init config", - "parameters": [ - { - "type": "string", - "description": "Config ID", - "name": "configId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, "/httpVersion": { "get": { "description": "Checks and logs the HTTP version of the incoming request to the server console.", @@ -252,7 +60,7 @@ const docTemplate = `{ }, "/migration/infra": { "post": { - "description": "It migrates an infrastructure on a cloud platform. Infrastructure includes network, storage, compute, and so on.", + "description": "It migrates an infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -264,6 +72,13 @@ const docTemplate = `{ ], "summary": "Migrate an infrastructure on a cloud platform", "parameters": [ + { + "type": "string", + "description": "Namespace ID", + "name": "nsId", + "in": "path", + "required": true + }, { "description": "Specify network, disk, compute, security group, virtual machine, etc.", "name": "InfrastructureInfo", @@ -284,21 +99,21 @@ const docTemplate = `{ "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } } }, - "/migration/infra/instance": { - "post": { - "description": "It migrates instance on a cloud platform. Storage includes name, spec, OS, and so on.", + "/migration/infra/{infraId}": { + "get": { + "description": "It gets the migrated infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -308,89 +123,46 @@ const docTemplate = `{ "tags": [ "[Migration] Infrastructure" ], - "summary": "(Skeleton) Migrate instance on a cloud platform", + "summary": "Get the migrated infrastructure on a cloud platform", "parameters": [ { - "description": "Specify name, spec, OS, and so on.", - "name": "InstanceInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateInstanceRequest" - } - } - ], - "responses": { - "200": { - "description": "Successfully migrated storage on a cloud platform", - "schema": { - "$ref": "#/definitions/controller.MigrateInstanceResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } + "type": "string", + "description": "a namespace ID", + "name": "nsId", + "in": "path", + "required": true }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, - "/migration/infra/network": { - "post": { - "description": "It migrates network on a cloud platform. Network includes name, ID, IPv4 CIDR block, IPv6 CIDR block, and so on.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Migration] Infrastructure" - ], - "summary": "(Skeleton) Migrate network on a cloud platform", - "parameters": [ { - "description": "Specify name, IPv4 CIDR block, etc.", - "name": "NetworkInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateNetworkRequest" - } + "type": "string", + "description": "a infrastructure ID created for migration", + "name": "infraId", + "in": "path", + "required": true } ], "responses": { "200": { - "description": "Successfully migrated network on a cloud platform", + "description": "Successfully got the migrated infrastructure on a cloud platform", "schema": { - "$ref": "#/definitions/controller.MigrateNetworkResponse" + "$ref": "#/definitions/controller.MigrateInfraResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } - } - }, - "/migration/infra/storage": { - "post": { - "description": "It migrates storage on a cloud platform. Storage includes name, ID, type, size, and so on.", + }, + "delete": { + "description": "It deletes the migrated infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -400,35 +172,40 @@ const docTemplate = `{ "tags": [ "[Migration] Infrastructure" ], - "summary": "(Skeleton) Migrate storage on a cloud platform", + "summary": "Delete the migrated infrastructure on a cloud platform", "parameters": [ { - "description": "Specify name, type, size, affiliated Network ID, and so on.", - "name": "StorageInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateStorageRequest" - } + "type": "string", + "description": "a namespace ID", + "name": "nsId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a infrastructure ID created for migration", + "name": "infraId", + "in": "path", + "required": true } ], "responses": { "200": { - "description": "Successfully migrated storage on a cloud platform", + "description": "Successfully deleted the migrated infrastructure on a cloud platform", "schema": { - "$ref": "#/definitions/controller.MigrateStorageResponse" + "$ref": "#/definitions/model.Response" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } @@ -447,17 +224,6 @@ const docTemplate = `{ "[Namespace] Namespace management" ], "summary": "List all namespaces or namespaces' ID", - "parameters": [ - { - "enum": [ - "id" - ], - "type": "string", - "description": "Option", - "name": "option", - "in": "query" - } - ], "responses": { "200": { "description": "Different return structures by the given option param", @@ -537,33 +303,6 @@ const docTemplate = `{ } } } - }, - "delete": { - "description": "Delete all namespaces", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Namespace] Namespace management" - ], - "summary": "Delete all namespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } } }, "/ns/{nsId}": { @@ -610,58 +349,6 @@ const docTemplate = `{ } } }, - "put": { - "description": "Update namespace", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Namespace] Namespace management" - ], - "summary": "Update namespace", - "parameters": [ - { - "type": "string", - "default": "ns01", - "description": "Namespace ID", - "name": "nsId", - "in": "path", - "required": true - }, - { - "description": "Details to update existing namespace", - "name": "namespace", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/common.NsReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.NsInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, "delete": { "description": "Delete namespace", "consumes": [ @@ -785,7 +472,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Get a list of users", "responses": { @@ -812,7 +499,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Create a new user", "parameters": [ @@ -852,7 +539,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Get specific user information", "parameters": [ @@ -888,7 +575,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Update a user", "parameters": [ @@ -933,7 +620,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Delete a user", "parameters": [ @@ -975,7 +662,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Patch a user", "parameters": [ @@ -1020,6 +707,60 @@ const docTemplate = `{ } }, "definitions": { + "cloudmodel.HostMigrationReq": { + "type": "object", + "required": [ + "commonImage", + "commonSpec" + ], + "properties": { + "commonImage": { + "description": "CommonImage is field for id of a image in common namespace", + "type": "string", + "example": "ubuntu18.04" + }, + "commonSpec": { + "description": "CommonSpec is field for id of a spec in common namespace", + "type": "string", + "example": "aws-ap-northeast-2-t2-small" + }, + "connectionName": { + "description": "if ConnectionName is given, the VM tries to use associtated credential.\nif not, it will use predefined ConnectionName in Spec objects", + "type": "string" + }, + "description": { + "type": "string", + "example": "description" + }, + "label": { + "type": "string", + "example": "rehosted virtual machine" + }, + "name": { + "description": "VM name or subGroup name if is (not empty) \u0026\u0026 (\u003e 0). If it is a group, actual VM name will be generated with -N postfix.", + "type": "string", + "example": "g1-1" + }, + "rootDiskSize": { + "description": "\"default\", Integer (GB): [\"50\", ..., \"1000\"]", + "type": "string", + "example": "default, 30, 42, ..." + }, + "rootDiskType": { + "description": "\"\", \"default\", \"TYPE1\", AWS: [\"standard\", \"gp2\", \"gp3\"], Azure: [\"PremiumSSD\", \"StandardSSD\", \"StandardHDD\"], GCP: [\"pd-standard\", \"pd-balanced\", \"pd-ssd\", \"pd-extreme\"], ALIBABA: [\"cloud_efficiency\", \"cloud\", \"cloud_essd\"], TENCENT: [\"CLOUD_PREMIUM\", \"CLOUD_SSD\"]", + "type": "string", + "example": "default, TYPE1, ..." + }, + "subGroupSize": { + "description": "if subGroupSize is (not empty) \u0026\u0026 (\u003e 0), subGroup will be gernetad. VMs will be created accordingly.", + "type": "string", + "example": "3" + }, + "vmUserPassword": { + "type": "string" + } + } + }, "cloudmodel.RegionInfo": { "type": "object", "properties": { @@ -1175,119 +916,45 @@ const docTemplate = `{ "description": "CountCreating is for counting Creating", "type": "integer" }, - "countFailed": { - "description": "CountFailed is for counting Failed", - "type": "integer" - }, - "countRebooting": { - "description": "CountRebooting is for counting Rebooting", - "type": "integer" - }, - "countResuming": { - "description": "CountResuming is for counting Resuming", - "type": "integer" - }, - "countRunning": { - "description": "CountRunning is for counting Running", - "type": "integer" - }, - "countSuspended": { - "description": "CountSuspended is for counting Suspended", - "type": "integer" - }, - "countSuspending": { - "description": "CountSuspending is for counting Suspending", - "type": "integer" - }, - "countTerminated": { - "description": "CountTerminated is for counting Terminated", - "type": "integer" - }, - "countTerminating": { - "description": "CountTerminating is for counting Terminating", - "type": "integer" - }, - "countTotal": { - "description": "CountTotal is for Total VMs", - "type": "integer" - }, - "countUndefined": { - "description": "CountUndefined is for counting Undefined", - "type": "integer" - } - } - }, - "cloudmodel.Subnet": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parentNetworkId": { - "type": "string" - } - } - }, - "cloudmodel.TbVmDynamicReq": { - "type": "object", - "required": [ - "commonImage", - "commonSpec" - ], - "properties": { - "commonImage": { - "description": "CommonImage is field for id of a image in common namespace", - "type": "string", - "example": "ubuntu18.04" - }, - "commonSpec": { - "description": "CommonSpec is field for id of a spec in common namespace", - "type": "string", - "example": "aws-ap-northeast-2-t2-small" + "countFailed": { + "description": "CountFailed is for counting Failed", + "type": "integer" }, - "connectionName": { - "description": "if ConnectionName is given, the VM tries to use associtated credential.\nif not, it will use predefined ConnectionName in Spec objects", - "type": "string" + "countRebooting": { + "description": "CountRebooting is for counting Rebooting", + "type": "integer" }, - "description": { - "type": "string", - "example": "Description" + "countResuming": { + "description": "CountResuming is for counting Resuming", + "type": "integer" }, - "label": { - "type": "string", - "example": "DynamicVM" + "countRunning": { + "description": "CountRunning is for counting Running", + "type": "integer" }, - "name": { - "description": "VM name or subGroup name if is (not empty) \u0026\u0026 (\u003e 0). If it is a group, actual VM name will be generated with -N postfix.", - "type": "string", - "example": "g1-1" + "countSuspended": { + "description": "CountSuspended is for counting Suspended", + "type": "integer" }, - "rootDiskSize": { - "description": "\"default\", Integer (GB): [\"50\", ..., \"1000\"]", - "type": "string", - "example": "default, 30, 42, ..." + "countSuspending": { + "description": "CountSuspending is for counting Suspending", + "type": "integer" }, - "rootDiskType": { - "description": "\"\", \"default\", \"TYPE1\", AWS: [\"standard\", \"gp2\", \"gp3\"], Azure: [\"PremiumSSD\", \"StandardSSD\", \"StandardHDD\"], GCP: [\"pd-standard\", \"pd-balanced\", \"pd-ssd\", \"pd-extreme\"], ALIBABA: [\"cloud_efficiency\", \"cloud\", \"cloud_essd\"], TENCENT: [\"CLOUD_PREMIUM\", \"CLOUD_SSD\"]", - "type": "string", - "example": "default, TYPE1, ..." + "countTerminated": { + "description": "CountTerminated is for counting Terminated", + "type": "integer" }, - "subGroupSize": { - "description": "if subGroupSize is (not empty) \u0026\u0026 (\u003e 0), subGroup will be gernetad. VMs will be created accordingly.", - "type": "string", - "example": "3" + "countTerminating": { + "description": "CountTerminating is for counting Terminating", + "type": "integer" }, - "vmUserPassword": { - "type": "string" + "countTotal": { + "description": "CountTotal is for Total VMs", + "type": "integer" + }, + "countUndefined": { + "description": "CountUndefined is for counting Undefined", + "type": "integer" } } }, @@ -1423,36 +1090,6 @@ const docTemplate = `{ } } }, - "common.ConfigInfo": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "name": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "value": { - "type": "string", - "example": "http://localhost:1024/spider" - } - } - }, - "common.ConfigReq": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "value": { - "type": "string", - "example": "http://localhost:1024/spider" - } - } - }, "common.ConnConfig": { "type": "object", "properties": { @@ -1564,18 +1201,6 @@ const docTemplate = `{ } } }, - "common.RestGetAllConfigResponse": { - "type": "object", - "properties": { - "config": { - "description": "Name string ` + "`" + `json:\"name\"` + "`" + `", - "type": "array", - "items": { - "$ref": "#/definitions/common.ConfigInfo" - } - } - } - }, "common.RestGetAllNsResponse": { "type": "object", "properties": { @@ -1645,7 +1270,7 @@ const docTemplate = `{ "properties": { "description": { "type": "string", - "example": "Made in CB-TB" + "example": "the infrastructure created for migration" }, "installMonAgent": { "description": "InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)", @@ -1660,11 +1285,11 @@ const docTemplate = `{ "label": { "description": "Label is for describing the mcis in a keyword (any string can be used)", "type": "string", - "example": "DynamicVM" + "example": "rehosting infra" }, "name": { "type": "string", - "example": "mcis01" + "example": "mig01" }, "systemLabel": { "description": "SystemLabel is for describing the mcis in a keyword (any string can be used) for special System purpose", @@ -1674,7 +1299,7 @@ const docTemplate = `{ "vm": { "type": "array", "items": { - "$ref": "#/definitions/cloudmodel.TbVmDynamicReq" + "$ref": "#/definitions/cloudmodel.HostMigrationReq" } } } @@ -1756,132 +1381,6 @@ const docTemplate = `{ } } }, - "controller.MigrateInstanceRequest": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "os": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateInstanceResponse": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "os": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateNetworkRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/cloudmodel.Subnet" - } - } - } - }, - "controller.MigrateNetworkResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/cloudmodel.Subnet" - } - } - } - }, - "controller.MigrateStorageRequest": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateStorageResponse": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, "controller.PatchUserRequest": { "type": "object", "properties": { @@ -1912,18 +1411,15 @@ const docTemplate = `{ }, "controller.RecommendInfraRequest": { "type": "object", + "required": [ + "servers" + ], "properties": { - "compute": { - "$ref": "#/definitions/infra.Compute" - }, - "gpu": { - "$ref": "#/definitions/infra.GPU" - }, - "network": { - "$ref": "#/definitions/network.Network" - }, - "storage": { - "$ref": "#/definitions/infra.Storage" + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/infra.Infra" + } } } }, @@ -1936,7 +1432,7 @@ const docTemplate = `{ "properties": { "description": { "type": "string", - "example": "Made in CB-TB" + "example": "the infrastructure created for migration" }, "installMonAgent": { "description": "InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)", @@ -1951,11 +1447,11 @@ const docTemplate = `{ "label": { "description": "Label is for describing the mcis in a keyword (any string can be used)", "type": "string", - "example": "DynamicVM" + "example": "rehosting infra" }, "name": { "type": "string", - "example": "mcis01" + "example": "mig01" }, "systemLabel": { "description": "SystemLabel is for describing the mcis in a keyword (any string can be used) for special System purpose", @@ -1965,7 +1461,7 @@ const docTemplate = `{ "vm": { "type": "array", "items": { - "$ref": "#/definitions/cloudmodel.TbVmDynamicReq" + "$ref": "#/definitions/cloudmodel.HostMigrationReq" } } } @@ -2000,6 +1496,11 @@ const docTemplate = `{ }, "infra.CPU": { "type": "object", + "required": [ + "cores", + "cpus", + "threads" + ], "properties": { "cache": { "description": "KB", @@ -2031,6 +1532,10 @@ const docTemplate = `{ }, "infra.Compute": { "type": "object", + "required": [ + "compute_resource", + "os" + ], "properties": { "compute_resource": { "$ref": "#/definitions/infra.ComputeResource" @@ -2048,6 +1553,10 @@ const docTemplate = `{ }, "infra.ComputeResource": { "type": "object", + "required": [ + "cpu", + "memory" + ], "properties": { "cpu": { "$ref": "#/definitions/infra.CPU" @@ -2123,6 +1632,23 @@ const docTemplate = `{ } } }, + "infra.Infra": { + "type": "object", + "properties": { + "compute": { + "$ref": "#/definitions/infra.Compute" + }, + "gpu": { + "$ref": "#/definitions/infra.GPU" + }, + "network": { + "$ref": "#/definitions/network.Network" + }, + "storage": { + "$ref": "#/definitions/infra.Storage" + } + } + }, "infra.Kernel": { "type": "object", "properties": { @@ -2153,6 +1679,9 @@ const docTemplate = `{ }, "infra.Memory": { "type": "object", + "required": [ + "size" + ], "properties": { "size": { "description": "MB", @@ -2281,6 +1810,10 @@ const docTemplate = `{ }, "infra.OS": { "type": "object", + "required": [ + "release", + "vendor" + ], "properties": { "architecture": { "type": "string" @@ -2309,6 +1842,9 @@ const docTemplate = `{ }, "infra.System": { "type": "object", + "required": [ + "os" + ], "properties": { "kernel": { "$ref": "#/definitions/infra.Kernel" @@ -2335,6 +1871,31 @@ const docTemplate = `{ } } }, + "model.Response": { + "type": "object", + "properties": { + "details": { + "type": "string", + "example": "Any details" + }, + "list": { + "type": "array", + "items": {} + }, + "object": { + "type": "object", + "additionalProperties": true + }, + "success": { + "type": "boolean", + "example": true + }, + "text": { + "type": "string", + "example": "Any text" + } + } + }, "network.CSP": { "type": "object", "properties": { diff --git a/api/swagger.json b/api/swagger.json index 190d6fd..831d510 100644 --- a/api/swagger.json +++ b/api/swagger.json @@ -16,198 +16,6 @@ }, "basePath": "/beetle", "paths": { - "/config": { - "get": { - "description": "List all configs", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "List all configs", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.RestGetAllConfigResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "post": { - "description": "Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...)", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Create or Update config", - "parameters": [ - { - "description": "Key and Value for configuration", - "name": "config", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/common.ConfigReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "delete": { - "description": "Init all configs", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Init all configs", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, - "/config/{configId}": { - "get": { - "description": "Get config", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Get config", - "parameters": [ - { - "type": "string", - "description": "Config ID", - "name": "configId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, - "delete": { - "description": "Init config", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Admin] System environment" - ], - "summary": "Init config", - "parameters": [ - { - "type": "string", - "description": "Config ID", - "name": "configId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.ConfigInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, "/httpVersion": { "get": { "description": "Checks and logs the HTTP version of the incoming request to the server console.", @@ -245,7 +53,7 @@ }, "/migration/infra": { "post": { - "description": "It migrates an infrastructure on a cloud platform. Infrastructure includes network, storage, compute, and so on.", + "description": "It migrates an infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -257,6 +65,13 @@ ], "summary": "Migrate an infrastructure on a cloud platform", "parameters": [ + { + "type": "string", + "description": "Namespace ID", + "name": "nsId", + "in": "path", + "required": true + }, { "description": "Specify network, disk, compute, security group, virtual machine, etc.", "name": "InfrastructureInfo", @@ -277,21 +92,21 @@ "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } } }, - "/migration/infra/instance": { - "post": { - "description": "It migrates instance on a cloud platform. Storage includes name, spec, OS, and so on.", + "/migration/infra/{infraId}": { + "get": { + "description": "It gets the migrated infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -301,89 +116,46 @@ "tags": [ "[Migration] Infrastructure" ], - "summary": "(Skeleton) Migrate instance on a cloud platform", + "summary": "Get the migrated infrastructure on a cloud platform", "parameters": [ { - "description": "Specify name, spec, OS, and so on.", - "name": "InstanceInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateInstanceRequest" - } - } - ], - "responses": { - "200": { - "description": "Successfully migrated storage on a cloud platform", - "schema": { - "$ref": "#/definitions/controller.MigrateInstanceResponse" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } + "type": "string", + "description": "a namespace ID", + "name": "nsId", + "in": "path", + "required": true }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - } - }, - "/migration/infra/network": { - "post": { - "description": "It migrates network on a cloud platform. Network includes name, ID, IPv4 CIDR block, IPv6 CIDR block, and so on.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Migration] Infrastructure" - ], - "summary": "(Skeleton) Migrate network on a cloud platform", - "parameters": [ { - "description": "Specify name, IPv4 CIDR block, etc.", - "name": "NetworkInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateNetworkRequest" - } + "type": "string", + "description": "a infrastructure ID created for migration", + "name": "infraId", + "in": "path", + "required": true } ], "responses": { "200": { - "description": "Successfully migrated network on a cloud platform", + "description": "Successfully got the migrated infrastructure on a cloud platform", "schema": { - "$ref": "#/definitions/controller.MigrateNetworkResponse" + "$ref": "#/definitions/controller.MigrateInfraResponse" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } - } - }, - "/migration/infra/storage": { - "post": { - "description": "It migrates storage on a cloud platform. Storage includes name, ID, type, size, and so on.", + }, + "delete": { + "description": "It deletes the migrated infrastructure on a cloud platform.", "consumes": [ "application/json" ], @@ -393,35 +165,40 @@ "tags": [ "[Migration] Infrastructure" ], - "summary": "(Skeleton) Migrate storage on a cloud platform", + "summary": "Delete the migrated infrastructure on a cloud platform", "parameters": [ { - "description": "Specify name, type, size, affiliated Network ID, and so on.", - "name": "StorageInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/controller.MigrateStorageRequest" - } + "type": "string", + "description": "a namespace ID", + "name": "nsId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a infrastructure ID created for migration", + "name": "infraId", + "in": "path", + "required": true } ], "responses": { "200": { - "description": "Successfully migrated storage on a cloud platform", + "description": "Successfully deleted the migrated infrastructure on a cloud platform", "schema": { - "$ref": "#/definitions/controller.MigrateStorageResponse" + "$ref": "#/definitions/model.Response" } }, "404": { "description": "Not Found", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } }, "500": { "description": "Internal Server Error", "schema": { - "$ref": "#/definitions/common.SimpleMsg" + "$ref": "#/definitions/model.Response" } } } @@ -440,17 +217,6 @@ "[Namespace] Namespace management" ], "summary": "List all namespaces or namespaces' ID", - "parameters": [ - { - "enum": [ - "id" - ], - "type": "string", - "description": "Option", - "name": "option", - "in": "query" - } - ], "responses": { "200": { "description": "Different return structures by the given option param", @@ -530,33 +296,6 @@ } } } - }, - "delete": { - "description": "Delete all namespaces", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Namespace] Namespace management" - ], - "summary": "Delete all namespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } } }, "/ns/{nsId}": { @@ -603,58 +342,6 @@ } } }, - "put": { - "description": "Update namespace", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Namespace] Namespace management" - ], - "summary": "Update namespace", - "parameters": [ - { - "type": "string", - "default": "ns01", - "description": "Namespace ID", - "name": "nsId", - "in": "path", - "required": true - }, - { - "description": "Details to update existing namespace", - "name": "namespace", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/common.NsReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/common.NsInfo" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/common.SimpleMsg" - } - } - } - }, "delete": { "description": "Delete namespace", "consumes": [ @@ -778,7 +465,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Get a list of users", "responses": { @@ -805,7 +492,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Create a new user", "parameters": [ @@ -845,7 +532,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Get specific user information", "parameters": [ @@ -881,7 +568,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Update a user", "parameters": [ @@ -926,7 +613,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Delete a user", "parameters": [ @@ -968,7 +655,7 @@ "application/json" ], "tags": [ - "[Sample] Users" + "[Sample API] Users" ], "summary": "Patch a user", "parameters": [ @@ -1013,6 +700,60 @@ } }, "definitions": { + "cloudmodel.HostMigrationReq": { + "type": "object", + "required": [ + "commonImage", + "commonSpec" + ], + "properties": { + "commonImage": { + "description": "CommonImage is field for id of a image in common namespace", + "type": "string", + "example": "ubuntu18.04" + }, + "commonSpec": { + "description": "CommonSpec is field for id of a spec in common namespace", + "type": "string", + "example": "aws-ap-northeast-2-t2-small" + }, + "connectionName": { + "description": "if ConnectionName is given, the VM tries to use associtated credential.\nif not, it will use predefined ConnectionName in Spec objects", + "type": "string" + }, + "description": { + "type": "string", + "example": "description" + }, + "label": { + "type": "string", + "example": "rehosted virtual machine" + }, + "name": { + "description": "VM name or subGroup name if is (not empty) \u0026\u0026 (\u003e 0). If it is a group, actual VM name will be generated with -N postfix.", + "type": "string", + "example": "g1-1" + }, + "rootDiskSize": { + "description": "\"default\", Integer (GB): [\"50\", ..., \"1000\"]", + "type": "string", + "example": "default, 30, 42, ..." + }, + "rootDiskType": { + "description": "\"\", \"default\", \"TYPE1\", AWS: [\"standard\", \"gp2\", \"gp3\"], Azure: [\"PremiumSSD\", \"StandardSSD\", \"StandardHDD\"], GCP: [\"pd-standard\", \"pd-balanced\", \"pd-ssd\", \"pd-extreme\"], ALIBABA: [\"cloud_efficiency\", \"cloud\", \"cloud_essd\"], TENCENT: [\"CLOUD_PREMIUM\", \"CLOUD_SSD\"]", + "type": "string", + "example": "default, TYPE1, ..." + }, + "subGroupSize": { + "description": "if subGroupSize is (not empty) \u0026\u0026 (\u003e 0), subGroup will be gernetad. VMs will be created accordingly.", + "type": "string", + "example": "3" + }, + "vmUserPassword": { + "type": "string" + } + } + }, "cloudmodel.RegionInfo": { "type": "object", "properties": { @@ -1168,119 +909,45 @@ "description": "CountCreating is for counting Creating", "type": "integer" }, - "countFailed": { - "description": "CountFailed is for counting Failed", - "type": "integer" - }, - "countRebooting": { - "description": "CountRebooting is for counting Rebooting", - "type": "integer" - }, - "countResuming": { - "description": "CountResuming is for counting Resuming", - "type": "integer" - }, - "countRunning": { - "description": "CountRunning is for counting Running", - "type": "integer" - }, - "countSuspended": { - "description": "CountSuspended is for counting Suspended", - "type": "integer" - }, - "countSuspending": { - "description": "CountSuspending is for counting Suspending", - "type": "integer" - }, - "countTerminated": { - "description": "CountTerminated is for counting Terminated", - "type": "integer" - }, - "countTerminating": { - "description": "CountTerminating is for counting Terminating", - "type": "integer" - }, - "countTotal": { - "description": "CountTotal is for Total VMs", - "type": "integer" - }, - "countUndefined": { - "description": "CountUndefined is for counting Undefined", - "type": "integer" - } - } - }, - "cloudmodel.Subnet": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parentNetworkId": { - "type": "string" - } - } - }, - "cloudmodel.TbVmDynamicReq": { - "type": "object", - "required": [ - "commonImage", - "commonSpec" - ], - "properties": { - "commonImage": { - "description": "CommonImage is field for id of a image in common namespace", - "type": "string", - "example": "ubuntu18.04" - }, - "commonSpec": { - "description": "CommonSpec is field for id of a spec in common namespace", - "type": "string", - "example": "aws-ap-northeast-2-t2-small" + "countFailed": { + "description": "CountFailed is for counting Failed", + "type": "integer" }, - "connectionName": { - "description": "if ConnectionName is given, the VM tries to use associtated credential.\nif not, it will use predefined ConnectionName in Spec objects", - "type": "string" + "countRebooting": { + "description": "CountRebooting is for counting Rebooting", + "type": "integer" }, - "description": { - "type": "string", - "example": "Description" + "countResuming": { + "description": "CountResuming is for counting Resuming", + "type": "integer" }, - "label": { - "type": "string", - "example": "DynamicVM" + "countRunning": { + "description": "CountRunning is for counting Running", + "type": "integer" }, - "name": { - "description": "VM name or subGroup name if is (not empty) \u0026\u0026 (\u003e 0). If it is a group, actual VM name will be generated with -N postfix.", - "type": "string", - "example": "g1-1" + "countSuspended": { + "description": "CountSuspended is for counting Suspended", + "type": "integer" }, - "rootDiskSize": { - "description": "\"default\", Integer (GB): [\"50\", ..., \"1000\"]", - "type": "string", - "example": "default, 30, 42, ..." + "countSuspending": { + "description": "CountSuspending is for counting Suspending", + "type": "integer" }, - "rootDiskType": { - "description": "\"\", \"default\", \"TYPE1\", AWS: [\"standard\", \"gp2\", \"gp3\"], Azure: [\"PremiumSSD\", \"StandardSSD\", \"StandardHDD\"], GCP: [\"pd-standard\", \"pd-balanced\", \"pd-ssd\", \"pd-extreme\"], ALIBABA: [\"cloud_efficiency\", \"cloud\", \"cloud_essd\"], TENCENT: [\"CLOUD_PREMIUM\", \"CLOUD_SSD\"]", - "type": "string", - "example": "default, TYPE1, ..." + "countTerminated": { + "description": "CountTerminated is for counting Terminated", + "type": "integer" }, - "subGroupSize": { - "description": "if subGroupSize is (not empty) \u0026\u0026 (\u003e 0), subGroup will be gernetad. VMs will be created accordingly.", - "type": "string", - "example": "3" + "countTerminating": { + "description": "CountTerminating is for counting Terminating", + "type": "integer" }, - "vmUserPassword": { - "type": "string" + "countTotal": { + "description": "CountTotal is for Total VMs", + "type": "integer" + }, + "countUndefined": { + "description": "CountUndefined is for counting Undefined", + "type": "integer" } } }, @@ -1416,36 +1083,6 @@ } } }, - "common.ConfigInfo": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "name": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "value": { - "type": "string", - "example": "http://localhost:1024/spider" - } - } - }, - "common.ConfigReq": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "SPIDER_REST_URL" - }, - "value": { - "type": "string", - "example": "http://localhost:1024/spider" - } - } - }, "common.ConnConfig": { "type": "object", "properties": { @@ -1557,18 +1194,6 @@ } } }, - "common.RestGetAllConfigResponse": { - "type": "object", - "properties": { - "config": { - "description": "Name string `json:\"name\"`", - "type": "array", - "items": { - "$ref": "#/definitions/common.ConfigInfo" - } - } - } - }, "common.RestGetAllNsResponse": { "type": "object", "properties": { @@ -1638,7 +1263,7 @@ "properties": { "description": { "type": "string", - "example": "Made in CB-TB" + "example": "the infrastructure created for migration" }, "installMonAgent": { "description": "InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)", @@ -1653,11 +1278,11 @@ "label": { "description": "Label is for describing the mcis in a keyword (any string can be used)", "type": "string", - "example": "DynamicVM" + "example": "rehosting infra" }, "name": { "type": "string", - "example": "mcis01" + "example": "mig01" }, "systemLabel": { "description": "SystemLabel is for describing the mcis in a keyword (any string can be used) for special System purpose", @@ -1667,7 +1292,7 @@ "vm": { "type": "array", "items": { - "$ref": "#/definitions/cloudmodel.TbVmDynamicReq" + "$ref": "#/definitions/cloudmodel.HostMigrationReq" } } } @@ -1749,132 +1374,6 @@ } } }, - "controller.MigrateInstanceRequest": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "os": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateInstanceResponse": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "os": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateNetworkRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/cloudmodel.Subnet" - } - } - } - }, - "controller.MigrateNetworkResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ipv4CidrBlock": { - "type": "string" - }, - "ipv6CidrBlock": { - "type": "string" - }, - "name": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/cloudmodel.Subnet" - } - } - } - }, - "controller.MigrateStorageRequest": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "controller.MigrateStorageResponse": { - "type": "object", - "properties": { - "NetworkId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, "controller.PatchUserRequest": { "type": "object", "properties": { @@ -1905,18 +1404,15 @@ }, "controller.RecommendInfraRequest": { "type": "object", + "required": [ + "servers" + ], "properties": { - "compute": { - "$ref": "#/definitions/infra.Compute" - }, - "gpu": { - "$ref": "#/definitions/infra.GPU" - }, - "network": { - "$ref": "#/definitions/network.Network" - }, - "storage": { - "$ref": "#/definitions/infra.Storage" + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/infra.Infra" + } } } }, @@ -1929,7 +1425,7 @@ "properties": { "description": { "type": "string", - "example": "Made in CB-TB" + "example": "the infrastructure created for migration" }, "installMonAgent": { "description": "InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)", @@ -1944,11 +1440,11 @@ "label": { "description": "Label is for describing the mcis in a keyword (any string can be used)", "type": "string", - "example": "DynamicVM" + "example": "rehosting infra" }, "name": { "type": "string", - "example": "mcis01" + "example": "mig01" }, "systemLabel": { "description": "SystemLabel is for describing the mcis in a keyword (any string can be used) for special System purpose", @@ -1958,7 +1454,7 @@ "vm": { "type": "array", "items": { - "$ref": "#/definitions/cloudmodel.TbVmDynamicReq" + "$ref": "#/definitions/cloudmodel.HostMigrationReq" } } } @@ -1993,6 +1489,11 @@ }, "infra.CPU": { "type": "object", + "required": [ + "cores", + "cpus", + "threads" + ], "properties": { "cache": { "description": "KB", @@ -2024,6 +1525,10 @@ }, "infra.Compute": { "type": "object", + "required": [ + "compute_resource", + "os" + ], "properties": { "compute_resource": { "$ref": "#/definitions/infra.ComputeResource" @@ -2041,6 +1546,10 @@ }, "infra.ComputeResource": { "type": "object", + "required": [ + "cpu", + "memory" + ], "properties": { "cpu": { "$ref": "#/definitions/infra.CPU" @@ -2116,6 +1625,23 @@ } } }, + "infra.Infra": { + "type": "object", + "properties": { + "compute": { + "$ref": "#/definitions/infra.Compute" + }, + "gpu": { + "$ref": "#/definitions/infra.GPU" + }, + "network": { + "$ref": "#/definitions/network.Network" + }, + "storage": { + "$ref": "#/definitions/infra.Storage" + } + } + }, "infra.Kernel": { "type": "object", "properties": { @@ -2146,6 +1672,9 @@ }, "infra.Memory": { "type": "object", + "required": [ + "size" + ], "properties": { "size": { "description": "MB", @@ -2274,6 +1803,10 @@ }, "infra.OS": { "type": "object", + "required": [ + "release", + "vendor" + ], "properties": { "architecture": { "type": "string" @@ -2302,6 +1835,9 @@ }, "infra.System": { "type": "object", + "required": [ + "os" + ], "properties": { "kernel": { "$ref": "#/definitions/infra.Kernel" @@ -2328,6 +1864,31 @@ } } }, + "model.Response": { + "type": "object", + "properties": { + "details": { + "type": "string", + "example": "Any details" + }, + "list": { + "type": "array", + "items": {} + }, + "object": { + "type": "object", + "additionalProperties": true + }, + "success": { + "type": "boolean", + "example": true + }, + "text": { + "type": "string", + "example": "Any text" + } + } + }, "network.CSP": { "type": "object", "properties": { diff --git a/api/swagger.yaml b/api/swagger.yaml index 9bf19af..ce70978 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -1,5 +1,53 @@ basePath: /beetle definitions: + cloudmodel.HostMigrationReq: + properties: + commonImage: + description: CommonImage is field for id of a image in common namespace + example: ubuntu18.04 + type: string + commonSpec: + description: CommonSpec is field for id of a spec in common namespace + example: aws-ap-northeast-2-t2-small + type: string + connectionName: + description: |- + if ConnectionName is given, the VM tries to use associtated credential. + if not, it will use predefined ConnectionName in Spec objects + type: string + description: + example: description + type: string + label: + example: rehosted virtual machine + type: string + name: + description: VM name or subGroup name if is (not empty) && (> 0). If it is + a group, actual VM name will be generated with -N postfix. + example: g1-1 + type: string + rootDiskSize: + description: '"default", Integer (GB): ["50", ..., "1000"]' + example: default, 30, 42, ... + type: string + rootDiskType: + description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: + ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", + "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"], + TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]' + example: default, TYPE1, ... + type: string + subGroupSize: + description: if subGroupSize is (not empty) && (> 0), subGroup will be gernetad. + VMs will be created accordingly. + example: "3" + type: string + vmUserPassword: + type: string + required: + - commonImage + - commonSpec + type: object cloudmodel.RegionInfo: properties: region: @@ -133,67 +181,6 @@ definitions: description: CountUndefined is for counting Undefined type: integer type: object - cloudmodel.Subnet: - properties: - id: - type: string - ipv4CidrBlock: - type: string - ipv6CidrBlock: - type: string - name: - type: string - parentNetworkId: - type: string - type: object - cloudmodel.TbVmDynamicReq: - properties: - commonImage: - description: CommonImage is field for id of a image in common namespace - example: ubuntu18.04 - type: string - commonSpec: - description: CommonSpec is field for id of a spec in common namespace - example: aws-ap-northeast-2-t2-small - type: string - connectionName: - description: |- - if ConnectionName is given, the VM tries to use associtated credential. - if not, it will use predefined ConnectionName in Spec objects - type: string - description: - example: Description - type: string - label: - example: DynamicVM - type: string - name: - description: VM name or subGroup name if is (not empty) && (> 0). If it is - a group, actual VM name will be generated with -N postfix. - example: g1-1 - type: string - rootDiskSize: - description: '"default", Integer (GB): ["50", ..., "1000"]' - example: default, 30, 42, ... - type: string - rootDiskType: - description: '"", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: - ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", - "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"], - TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]' - example: default, TYPE1, ... - type: string - subGroupSize: - description: if subGroupSize is (not empty) && (> 0), subGroup will be gernetad. - VMs will be created accordingly. - example: "3" - type: string - vmUserPassword: - type: string - required: - - commonImage - - commonSpec - type: object cloudmodel.TbVmInfo: properties: connectionConfig: @@ -284,27 +271,6 @@ definitions: vmUserPassword: type: string type: object - common.ConfigInfo: - properties: - id: - example: SPIDER_REST_URL - type: string - name: - example: SPIDER_REST_URL - type: string - value: - example: http://localhost:1024/spider - type: string - type: object - common.ConfigReq: - properties: - name: - example: SPIDER_REST_URL - type: string - value: - example: http://localhost:1024/spider - type: string - type: object common.ConnConfig: properties: configName: @@ -379,14 +345,6 @@ definitions: example: ns01 type: string type: object - common.RestGetAllConfigResponse: - properties: - config: - description: Name string `json:"name"` - items: - $ref: '#/definitions/common.ConfigInfo' - type: array - type: object common.RestGetAllNsResponse: properties: ns: @@ -429,7 +387,7 @@ definitions: controller.MigrateInfraRequest: properties: description: - example: Made in CB-TB + example: the infrastructure created for migration type: string installMonAgent: default: "yes" @@ -443,10 +401,10 @@ definitions: label: description: Label is for describing the mcis in a keyword (any string can be used) - example: DynamicVM + example: rehosting infra type: string name: - example: mcis01 + example: mig01 type: string systemLabel: description: SystemLabel is for describing the mcis in a keyword (any string @@ -455,7 +413,7 @@ definitions: type: string vm: items: - $ref: '#/definitions/cloudmodel.TbVmDynamicReq' + $ref: '#/definitions/cloudmodel.HostMigrationReq' type: array required: - name @@ -522,88 +480,6 @@ definitions: $ref: '#/definitions/cloudmodel.TbVmInfo' type: array type: object - controller.MigrateInstanceRequest: - properties: - NetworkId: - type: string - id: - type: string - name: - type: string - os: - type: string - type: - type: string - type: object - controller.MigrateInstanceResponse: - properties: - NetworkId: - type: string - id: - type: string - name: - type: string - os: - type: string - type: - type: string - type: object - controller.MigrateNetworkRequest: - properties: - id: - type: string - ipv4CidrBlock: - type: string - ipv6CidrBlock: - type: string - name: - type: string - subnets: - items: - $ref: '#/definitions/cloudmodel.Subnet' - type: array - type: object - controller.MigrateNetworkResponse: - properties: - id: - type: string - ipv4CidrBlock: - type: string - ipv6CidrBlock: - type: string - name: - type: string - subnets: - items: - $ref: '#/definitions/cloudmodel.Subnet' - type: array - type: object - controller.MigrateStorageRequest: - properties: - NetworkId: - type: string - id: - type: string - name: - type: string - size: - type: string - type: - type: string - type: object - controller.MigrateStorageResponse: - properties: - NetworkId: - type: string - id: - type: string - name: - type: string - size: - type: string - type: - type: string - type: object controller.PatchUserRequest: properties: email: @@ -624,19 +500,17 @@ definitions: type: object controller.RecommendInfraRequest: properties: - compute: - $ref: '#/definitions/infra.Compute' - gpu: - $ref: '#/definitions/infra.GPU' - network: - $ref: '#/definitions/network.Network' - storage: - $ref: '#/definitions/infra.Storage' + servers: + items: + $ref: '#/definitions/infra.Infra' + type: array + required: + - servers type: object controller.RecommendInfraResponse: properties: description: - example: Made in CB-TB + example: the infrastructure created for migration type: string installMonAgent: default: "yes" @@ -650,10 +524,10 @@ definitions: label: description: Label is for describing the mcis in a keyword (any string can be used) - example: DynamicVM + example: rehosting infra type: string name: - example: mcis01 + example: mig01 type: string systemLabel: description: SystemLabel is for describing the mcis in a keyword (any string @@ -662,7 +536,7 @@ definitions: type: string vm: items: - $ref: '#/definitions/cloudmodel.TbVmDynamicReq' + $ref: '#/definitions/cloudmodel.HostMigrationReq' type: array required: - name @@ -707,6 +581,10 @@ definitions: type: integer vendor: type: string + required: + - cores + - cpus + - threads type: object infra.Compute: properties: @@ -718,6 +596,9 @@ definitions: type: array os: $ref: '#/definitions/infra.System' + required: + - compute_resource + - os type: object infra.ComputeResource: properties: @@ -731,6 +612,9 @@ definitions: $ref: '#/definitions/infra.Memory' root_disk: $ref: '#/definitions/infra.Disk' + required: + - cpu + - memory type: object infra.Connection: properties: @@ -769,6 +653,17 @@ definitions: $ref: '#/definitions/infra.NVIDIA' type: array type: object + infra.Infra: + properties: + compute: + $ref: '#/definitions/infra.Compute' + gpu: + $ref: '#/definitions/infra.GPU' + network: + $ref: '#/definitions/network.Network' + storage: + $ref: '#/definitions/infra.Storage' + type: object infra.Kernel: properties: architecture: @@ -797,6 +692,8 @@ definitions: type: integer type: type: string + required: + - size type: object infra.MountPoint: properties: @@ -885,6 +782,9 @@ definitions: type: string version: type: string + required: + - release + - vendor type: object infra.Storage: properties: @@ -899,6 +799,8 @@ definitions: $ref: '#/definitions/infra.Node' os: $ref: '#/definitions/infra.OS' + required: + - os type: object model.MyUser: properties: @@ -909,6 +811,24 @@ definitions: name: type: string type: object + model.Response: + properties: + details: + example: Any details + type: string + list: + items: {} + type: array + object: + additionalProperties: true + type: object + success: + example: true + type: boolean + text: + example: Any text + type: string + type: object network.CSP: properties: name: @@ -1080,133 +1000,6 @@ info: title: CM-Beetle REST API version: latest paths: - /config: - delete: - consumes: - - application/json - description: Init all configs - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.SimpleMsg' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Init all configs - tags: - - '[Admin] System environment' - get: - consumes: - - application/json - description: List all configs - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.RestGetAllConfigResponse' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: List all configs - tags: - - '[Admin] System environment' - post: - consumes: - - application/json - description: Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...) - parameters: - - description: Key and Value for configuration - in: body - name: config - required: true - schema: - $ref: '#/definitions/common.ConfigReq' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.ConfigInfo' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Create or Update config - tags: - - '[Admin] System environment' - /config/{configId}: - delete: - consumes: - - application/json - description: Init config - parameters: - - description: Config ID - in: path - name: configId - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.ConfigInfo' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Init config - tags: - - '[Admin] System environment' - get: - consumes: - - application/json - description: Get config - parameters: - - description: Config ID - in: path - name: configId - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.ConfigInfo' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Get config - tags: - - '[Admin] System environment' /httpVersion: get: consumes: @@ -1235,9 +1028,13 @@ paths: post: consumes: - application/json - description: It migrates an infrastructure on a cloud platform. Infrastructure - includes network, storage, compute, and so on. + description: It migrates an infrastructure on a cloud platform. parameters: + - description: Namespace ID + in: path + name: nsId + required: true + type: string - description: Specify network, disk, compute, security group, virtual machine, etc. in: body @@ -1255,137 +1052,87 @@ paths: "404": description: Not Found schema: - $ref: '#/definitions/common.SimpleMsg' + $ref: '#/definitions/model.Response' "500": description: Internal Server Error schema: - $ref: '#/definitions/common.SimpleMsg' + $ref: '#/definitions/model.Response' summary: Migrate an infrastructure on a cloud platform tags: - '[Migration] Infrastructure' - /migration/infra/instance: - post: + /migration/infra/{infraId}: + delete: consumes: - application/json - description: It migrates instance on a cloud platform. Storage includes name, - spec, OS, and so on. + description: It deletes the migrated infrastructure on a cloud platform. parameters: - - description: Specify name, spec, OS, and so on. - in: body - name: InstanceInfo + - description: a namespace ID + in: path + name: nsId required: true - schema: - $ref: '#/definitions/controller.MigrateInstanceRequest' - produces: - - application/json - responses: - "200": - description: Successfully migrated storage on a cloud platform - schema: - $ref: '#/definitions/controller.MigrateInstanceResponse' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: (Skeleton) Migrate instance on a cloud platform - tags: - - '[Migration] Infrastructure' - /migration/infra/network: - post: - consumes: - - application/json - description: It migrates network on a cloud platform. Network includes name, - ID, IPv4 CIDR block, IPv6 CIDR block, and so on. - parameters: - - description: Specify name, IPv4 CIDR block, etc. - in: body - name: NetworkInfo + type: string + - description: a infrastructure ID created for migration + in: path + name: infraId required: true - schema: - $ref: '#/definitions/controller.MigrateNetworkRequest' + type: string produces: - application/json responses: "200": - description: Successfully migrated network on a cloud platform + description: Successfully deleted the migrated infrastructure on a cloud + platform schema: - $ref: '#/definitions/controller.MigrateNetworkResponse' + $ref: '#/definitions/model.Response' "404": description: Not Found schema: - $ref: '#/definitions/common.SimpleMsg' + $ref: '#/definitions/model.Response' "500": description: Internal Server Error schema: - $ref: '#/definitions/common.SimpleMsg' - summary: (Skeleton) Migrate network on a cloud platform + $ref: '#/definitions/model.Response' + summary: Delete the migrated infrastructure on a cloud platform tags: - '[Migration] Infrastructure' - /migration/infra/storage: - post: + get: consumes: - application/json - description: It migrates storage on a cloud platform. Storage includes name, - ID, type, size, and so on. + description: It gets the migrated infrastructure on a cloud platform. parameters: - - description: Specify name, type, size, affiliated Network ID, and so on. - in: body - name: StorageInfo + - description: a namespace ID + in: path + name: nsId required: true - schema: - $ref: '#/definitions/controller.MigrateStorageRequest' + type: string + - description: a infrastructure ID created for migration + in: path + name: infraId + required: true + type: string produces: - application/json responses: "200": - description: Successfully migrated storage on a cloud platform + description: Successfully got the migrated infrastructure on a cloud platform schema: - $ref: '#/definitions/controller.MigrateStorageResponse' + $ref: '#/definitions/controller.MigrateInfraResponse' "404": description: Not Found schema: - $ref: '#/definitions/common.SimpleMsg' + $ref: '#/definitions/model.Response' "500": description: Internal Server Error schema: - $ref: '#/definitions/common.SimpleMsg' - summary: (Skeleton) Migrate storage on a cloud platform + $ref: '#/definitions/model.Response' + summary: Get the migrated infrastructure on a cloud platform tags: - '[Migration] Infrastructure' /ns: - delete: - consumes: - - application/json - description: Delete all namespaces - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.SimpleMsg' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Delete all namespaces - tags: - - '[Namespace] Namespace management' get: consumes: - application/json description: List all namespaces or namespaces' ID - parameters: - - description: Option - enum: - - id - in: query - name: option - type: string produces: - application/json responses: @@ -1495,41 +1242,6 @@ paths: summary: Get namespace tags: - '[Namespace] Namespace management' - put: - consumes: - - application/json - description: Update namespace - parameters: - - default: ns01 - description: Namespace ID - in: path - name: nsId - required: true - type: string - - description: Details to update existing namespace - in: body - name: namespace - required: true - schema: - $ref: '#/definitions/common.NsReq' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/common.NsInfo' - "404": - description: Not Found - schema: - $ref: '#/definitions/common.SimpleMsg' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/common.SimpleMsg' - summary: Update namespace - tags: - - '[Namespace] Namespace management' /readyz: get: consumes: @@ -1601,7 +1313,7 @@ paths: type: object summary: Get a list of users tags: - - '[Sample] Users' + - '[Sample API] Users' post: consumes: - application/json @@ -1627,7 +1339,7 @@ paths: type: object summary: Create a new user tags: - - '[Sample] Users' + - '[Sample API] Users' /sample/users/{id}: delete: consumes: @@ -1656,7 +1368,7 @@ paths: type: object summary: Delete a user tags: - - '[Sample] Users' + - '[Sample API] Users' get: consumes: - application/json @@ -1681,7 +1393,7 @@ paths: type: object summary: Get specific user information tags: - - '[Sample] Users' + - '[Sample API] Users' patch: consumes: - application/json @@ -1716,7 +1428,7 @@ paths: type: object summary: Patch a user tags: - - '[Sample] Users' + - '[Sample API] Users' put: consumes: - application/json @@ -1747,7 +1459,7 @@ paths: type: object summary: Update a user tags: - - '[Sample] Users' + - '[Sample API] Users' securityDefinitions: BasicAuth: type: basic diff --git a/cmd/cm-beetle/main.go b/cmd/cm-beetle/main.go index 6d4bdda..8b65060 100644 --- a/cmd/cm-beetle/main.go +++ b/cmd/cm-beetle/main.go @@ -53,8 +53,9 @@ func main() { } log.Debug().Msgf("port number: %s", *port) - common.SpiderRestUrl = common.NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider") - common.DragonflyRestUrl = common.NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly") + // common.SpiderRestUrl = common.NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider") + // common.DragonflyRestUrl = common.NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly") + common.TumblebugRestUrl = common.NVL(os.Getenv("TUMBLEBUG_REST_URL"), "http://localhost:1323/tumblebug") common.DBUrl = common.NVL(os.Getenv("DB_URL"), "localhost:3306") common.DBDatabase = common.NVL(os.Getenv("DB_DATABASE"), "cb_beetle") common.DBUser = common.NVL(os.Getenv("DB_USER"), "cb_beetle") diff --git a/conf/log_conf.yaml b/conf/log_conf.yaml index 4d64f32..aa4024e 100644 --- a/conf/log_conf.yaml +++ b/conf/log_conf.yaml @@ -8,11 +8,11 @@ cblog: loglevel: error # If loopcheck is true, You can set this online. ## true | false - logfile: true + logfile: true ## Config for File Output ## logfileinfo: - filename: $BEETLE_ROOT/log/cblogs.log + filename: $CMBEETLE_ROOT/log/cblogs.log maxsize: 10 # megabytes maxbackups: 50 - maxage: 31 # days \ No newline at end of file + maxage: 31 # days diff --git a/conf/setup.env b/conf/setup.env index ce6e57e..dee219c 100644 --- a/conf/setup.env +++ b/conf/setup.env @@ -6,8 +6,8 @@ export CBSTORE_ROOT=$CMBEETLE_ROOT export CBLOG_ROOT=$CMBEETLE_ROOT #export CBSPIDER_CALLMETHOD=REST #export CBSPIDER_REST_URL=http://localhost:1024/spider -#export CBTUMBLEBUG_CALLMETHOD=REST -#export CBTUMBLEBUG_REST_URL=http://localhost:1323/tumblebug +export CBTUMBLEBUG_CALLMETHOD=REST +export CBTUMBLEBUG_REST_URL=http://localhost:1323/tumblebug ## Logger configuration # Set log file path (default logfile path: ./cm-beetle.log) diff --git a/go.mod b/go.mod index 983e819..14a5e3a 100644 --- a/go.mod +++ b/go.mod @@ -1,80 +1,108 @@ module github.com/cloud-barista/cm-beetle -go 1.21 - -toolchain go1.21.4 +go 1.22.3 require ( - github.com/cloud-barista/cb-store v0.7.1 - github.com/cloud-barista/cm-honeybee v0.0.0-20231212101859-53110c631d7f - github.com/docker/docker v24.0.9+incompatible - github.com/fsnotify/fsnotify v1.6.0 - github.com/go-playground/validator/v10 v10.16.0 + github.com/cloud-barista/cb-store v0.8.0 + github.com/cloud-barista/cb-tumblebug v0.8.12 + github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240522171320-cb61f875f480 + github.com/docker/docker v26.1.3+incompatible + github.com/fsnotify/fsnotify v1.7.0 + github.com/go-playground/validator/v10 v10.17.0 github.com/go-resty/resty/v2 v2.11.0 - github.com/labstack/echo/v4 v4.11.3 - github.com/libvirt/libvirt-go-xml v7.4.0+incompatible - github.com/mattn/go-sqlite3 v1.14.17 + github.com/labstack/echo/v4 v4.12.0 + github.com/mattn/go-sqlite3 v1.14.19 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.32.0 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/viper v1.16.0 - github.com/swaggo/echo-swagger v1.4.0 - github.com/swaggo/swag v1.16.1 + github.com/spf13/viper v1.18.2 + github.com/swaggo/echo-swagger v1.4.1 + github.com/swaggo/swag v1.16.3 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v2 v2.4.0 - xorm.io/xorm v1.3.4 + xorm.io/xorm v1.3.6 ) require ( github.com/KyleBanks/depth v1.2.1 // indirect - github.com/NeowayLabs/drm v0.0.0-20190824133025-4939fc0ad345 // indirect - github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea // indirect + github.com/bwmarrin/snowflake v0.3.0 // indirect + github.com/cloud-barista/cb-log v0.8.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/spec v0.20.7 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/jollaman999/utils v1.0.10 // indirect + github.com/jedib0t/go-pretty/v6 v6.5.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/labstack/gommon v0.4.1 // indirect + github.com/labstack/gommon v0.4.2 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/swaggo/files/v2 v2.0.0 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect + github.com/tidwall/gjson v1.17.1 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + github.com/xujiajun/mmap-go v1.0.1 // indirect + github.com/xujiajun/nutsdb v0.11.1 // indirect + github.com/xujiajun/utils v0.0.0-20220904132955-5f7c5b914235 // indirect + go.etcd.io/etcd/api/v3 v3.5.11 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.11 // indirect + go.etcd.io/etcd/client/v3 v3.5.11 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.21.0 // indirect + google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/grpc v1.60.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect xorm.io/builder v0.3.13 // indirect ) diff --git a/go.sum b/go.sum index 1d3ac9e..665b2f0 100644 --- a/go.sum +++ b/go.sum @@ -1,41 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE= @@ -43,84 +5,73 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbL github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/NeowayLabs/drm v0.0.0-20190824133025-4939fc0ad345 h1:gsz1u5J8hnoPtBaA5dUdluC4lZNYgYRZmEchdxTuNxc= -github.com/NeowayLabs/drm v0.0.0-20190824133025-4939fc0ad345/go.mod h1:B8Pf8lJWIsLTs7oyWkXOWOGAZiQQVomlZurKAgx8HBA= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= +github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloud-barista/cb-store v0.7.1 h1:UGClLvXZ4nJmdLWH3mPgLoqTpLi9nUgRanr4kmBHrdA= -github.com/cloud-barista/cb-store v0.7.1/go.mod h1:xj7r3ciUm0dPLw1YcTROuhPBO5OJpfu3I0mdvv6289c= -github.com/cloud-barista/cm-honeybee v0.0.0-20231212101859-53110c631d7f h1:n+adt3u8LhZ+RTfsS+LLU16J9YP3LmFAvMRxjAaOpcA= -github.com/cloud-barista/cm-honeybee v0.0.0-20231212101859-53110c631d7f/go.mod h1:1XBK8z+GsA+MmbqK3d9vFqc0am7RayRyL/K6tieVRNg= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cloud-barista/cb-log v0.8.0 h1:ArWCs1EgpoD3ZnBgcC4cAw5ufI/JHmFKfJswlv4whgk= +github.com/cloud-barista/cb-log v0.8.0/go.mod h1:nGgfTFMPwl1MpCO3FBjexUkNdOYA0BNJoyM9Pd0lMms= +github.com/cloud-barista/cb-store v0.8.0 h1:0K47YEf+K3wx18D+m0XirlDbdTz229XxsTXw6WACjRA= +github.com/cloud-barista/cb-store v0.8.0/go.mod h1:6NuA5TdeVRExd59ULXv6LEhm4EE0ODn9L820g4VqApo= +github.com/cloud-barista/cb-tumblebug v0.8.12 h1:uc5aOI9q5XhMq7GQ9s7WyWyLoxtklcqib/gdDaSgumw= +github.com/cloud-barista/cb-tumblebug v0.8.12/go.mod h1:yOwgw7jXqMdSSgC2g0TvgCG1WyXNw6Q7J6JGfbsqEOw= +github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240522171320-cb61f875f480 h1:Y1UbgOowkkCSjj5WJ0Oq37Peyt98KeDSfSZ2/CgxbSc= +github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240522171320-cb61f875f480/go.mod h1:7RFAKgEd+awKYFwlU6JkKlZHf75wI+STxaYvlADIBoc= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= -github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea h1:+4n+kUVbPdu6qMI9SUnSKMC+D50gNW4L7Lhk9tI2lVo= -github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= +github.com/docker/docker v26.1.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= -github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= -github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= +github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= @@ -138,80 +89,32 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -252,21 +155,17 @@ github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0f github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jollaman999/utils v1.0.10 h1:LBXsM9fKH1tXACTgsRnSKHXkHE3TaCymwiMp2kFXg3I= -github.com/jollaman999/utils v1.0.10/go.mod h1:fb4x+o0k105MFIBBaNRN+tat7F3RbkolnURccQd3UEA= +github.com/jedib0t/go-pretty/v6 v6.5.6 h1:nKXVLqPfAwY7sWcYXdNZZZ2fjqDpAtj9UeWupgfUxSg= +github.com/jedib0t/go-pretty/v6 v6.5.6/go.mod h1:5LQIxa52oJ/DlDSLv0HEkWOFMDGoWkJb9ss5KqPpJBg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -275,10 +174,10 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.11.3 h1:Upyu3olaqSHkCjs1EJJwQ3WId8b8b1hxbogyommKktM= -github.com/labstack/echo/v4 v4.11.3/go.mod h1:UcGuQ8V6ZNRmSweBIJkPvGfwCMIlFmiqrPqiEBfPYws= -github.com/labstack/gommon v0.4.1 h1:gqEff0p/hTENGMABzezPoPSRtIh1Cvw0ueMOe0/dfOk= -github.com/labstack/gommon v0.4.1/go.mod h1:TyTrpPqxR5KMk8LKVtLmfMjeQ5FEkBYdxLYPw/WfrOM= +github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0= +github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -286,13 +185,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libvirt/libvirt-go-xml v7.4.0+incompatible h1:+BBo2XjlT8pAK4pm+aSX8mC/6nc/rdRac10ZukpW31U= -github.com/libvirt/libvirt-go-xml v7.4.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -306,19 +200,24 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= -github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= +github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -326,31 +225,36 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -359,16 +263,18 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d h1:4660u5vJtsyrn3QwJNfESwCws+TM1CMhRn123xjVyQ8= +github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d/go.mod h1:ZLVe3VfhAuMYLYWliGEydMBoRnfib8EFSqkBYu1ck9E= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -378,141 +284,107 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/swaggo/echo-swagger v1.4.0 h1:RCxLKySw1SceHLqnmc41pKyiIeE+OiD7NSI7FUOBlLo= -github.com/swaggo/echo-swagger v1.4.0/go.mod h1:Wh3VlwjZGZf/LH0s81tz916JokuPG7y/ZqaqnckYqoQ= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/swaggo/echo-swagger v1.4.1 h1:Yf0uPaJWp1uRtDloZALyLnvdBeoEL5Kc7DtnjzO/TUk= +github.com/swaggo/echo-swagger v1.4.1/go.mod h1:C8bSi+9yH2FLZsnhqMZLIZddpUxZdBYuNHbtaS1Hljc= github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw= github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM= -github.com/swaggo/swag v1.16.1 h1:fTNRhKstPKxcnoKsytm4sahr8FaYzUcT7i1/3nd/fBg= -github.com/swaggo/swag v1.16.1/go.mod h1:9/LMvHycG3NFHfR6LwvikHv5iFvmPADQ359cKikGxto= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= +github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/xujiajun/gorouter v1.2.0/go.mod h1:yJrIta+bTNpBM/2UT8hLOaEAFckO+m/qmR3luMIQygM= +github.com/xujiajun/mmap-go v1.0.1 h1:7Se7ss1fLPPRW+ePgqGpCkfGIZzJV6JPq9Wq9iv/WHc= +github.com/xujiajun/mmap-go v1.0.1/go.mod h1:CNN6Sw4SL69Sui00p0zEzcZKbt+5HtEnYUsc6BKKRMg= +github.com/xujiajun/nutsdb v0.11.1 h1:zLyIvp3ABHMohtcqi0sbt7gGOFWfse+ZbLv2GVb6ZYw= +github.com/xujiajun/nutsdb v0.11.1/go.mod h1:sAT5Kr8+53X2r1eFMHw2VSPLSAo/PiJCZPK5QtMsw7g= +github.com/xujiajun/utils v0.0.0-20220904132955-5f7c5b914235 h1:w0si+uee0iAaCJO9q86T6yrhdadgcsoNuh47LrUykzg= +github.com/xujiajun/utils v0.0.0-20220904132955-5f7c5b914235/go.mod h1:MR4+0R6A9NS5IABnIM3384FfOq8QFVnm7WDrBOhIaMU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.etcd.io/etcd/api/v3 v3.5.11 h1:B54KwXbWDHyD3XYAwprxNzTe7vlhR69LuBgZnMVvS7E= +go.etcd.io/etcd/api/v3 v3.5.11/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= +go.etcd.io/etcd/client/pkg/v3 v3.5.11 h1:bT2xVspdiCj2910T0V+/KHcVKjkUrCZVtk8J2JF2z1A= +go.etcd.io/etcd/client/pkg/v3 v3.5.11/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= +go.etcd.io/etcd/client/v3 v3.5.11 h1:ajWtgoNSZJ1gmS8k+icvPtqsqEav+iUorF7b0qozgUU= +go.etcd.io/etcd/client/v3 v3.5.11/go.mod h1:a6xQUEqFJ8vztO1agJh/KQKOMfFI8og52ZconzcDJwE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -520,94 +392,54 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -616,170 +448,47 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 h1:/IWabOtPziuXTEtI1KYCpM6Ss7vaAkeMxk+uXV/xvZs= +google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 h1:OPXtXn7fNMaXwO3JvOmF1QyTc00jsSFFz1vXXBOdCDo= +google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:B5xPO//w8qmBDjGReYLpR6UJPnkldGkCSMoH/2vxJeg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -798,32 +507,24 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= modernc.org/cc/v3 v3.38.1/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= -modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= modernc.org/ccgo/v3 v3.0.0-20220910160915-348f15de615a/go.mod h1:8p47QxPkdugex9J4n9P2tLZ9bK01yngIVp00g4nomW0= modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= -modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b h1:BnN1t+pb1cy61zbvSUV7SeI0PwosMhlAEi/vBY4qxp8= +modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= @@ -831,32 +532,30 @@ modernc.org/libc v1.19.0/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= -modernc.org/libc v1.37.0 h1:WerjebcsP6A7Jy+f2lCnHAkiSTLf7IaSftBYUtoswak= -modernc.org/libc v1.37.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= +modernc.org/libc v1.50.7 h1:25+61e/ZI1e53ynk8dvS/BvWie3lIJPR1KVlTdGkkCg= +modernc.org/libc v1.50.7/go.mod h1:8lr2m1THY5Z3ikGyUc3JhLEQg1oaIBz/AQixw8/eksQ= modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= -modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= +modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= +modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.20.4/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= -modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= -modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= +modernc.org/sqlite v1.29.10 h1:3u93dz83myFnMilBGCOLbr+HjklS6+5rJLx4q86RDAg= +modernc.org/sqlite v1.29.10/go.mod h1:ItX2a1OVGgNsFh6Dv60JQvGfJfTPHPVpV6DF59akYOA= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE= -modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= xorm.io/builder v0.3.13 h1:a3jmiVVL19psGeXx8GIurTp7p0IIgqeDmwhcR6BAOAo= xorm.io/builder v0.3.13/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= -xorm.io/xorm v1.3.4 h1:vWFKzR3DhGUDl5b4srhUjhDwjxkZAc4C7BFszpu0swI= -xorm.io/xorm v1.3.4/go.mod h1:qFJGFoVYbbIdnz2vaL5OxSQ2raleMpyRRalnq3n9OJo= +xorm.io/xorm v1.3.6 h1:hfpWHkDIWWqUi8FRF2H2M9O8lO3Ov47rwFcS9gPzPkU= +xorm.io/xorm v1.3.6/go.mod h1:qFJGFoVYbbIdnz2vaL5OxSQ2raleMpyRRalnq3n9OJo= diff --git a/go.work b/go.work index 1cd473e..1d08009 100644 --- a/go.work +++ b/go.work @@ -1,3 +1,3 @@ -go 1.21 +go 1.22.3 use . diff --git a/go.work.sum b/go.work.sum index ef60021..f4183b2 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,27 +1,298 @@ cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +cloud.google.com/go/accessapproval v1.7.4/go.mod h1:/aTEh45LzplQgFYdQdwPMR9YdX0UlhBmvB84uAmQKUc= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= +cloud.google.com/go/accesscontextmanager v1.8.4/go.mod h1:ParU+WbMpD34s5JFEnGAnPBYAgUHozaTmDJU7aCU9+M= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= +cloud.google.com/go/aiplatform v1.52.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= +cloud.google.com/go/aiplatform v1.58.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= +cloud.google.com/go/analytics v0.21.6/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= +cloud.google.com/go/analytics v0.22.0/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigateway v1.6.4/go.mod h1:0EpJlVGH5HwAN4VF4Iec8TAzGN1aQgbxAWGJsnPCGGY= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeconnect v1.6.4/go.mod h1:CapQCWZ8TCjnU0d7PobxhpOdVz/OVJ2Hr/Zcuu1xFx0= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= +cloud.google.com/go/apigeeregistry v0.8.2/go.mod h1:h4v11TDGdeXJDJvImtgK2AFVvMIgGWjSb0HRnBSjcX8= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= +cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +cloud.google.com/go/area120 v0.8.4/go.mod h1:jfawXjxf29wyBXr48+W+GyX/f8fflxp642D/bb9v68M= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= +cloud.google.com/go/artifactregistry v1.14.6/go.mod h1:np9LSFotNWHcjnOgh8UVK0RFPCTUGbO0ve3384xyHfE= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= +cloud.google.com/go/asset v1.15.3/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= +cloud.google.com/go/asset v1.17.0/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +cloud.google.com/go/assuredworkloads v1.11.4/go.mod h1:4pwwGNwy1RP0m+y12ef3Q/8PaiWrIDQ6nD2E8kvWI9U= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/automl v1.13.4/go.mod h1:ULqwX/OLZ4hBVfKQaMtxMSTlPx0GqGbWN8uA/1EqCP8= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/baremetalsolution v1.2.3/go.mod h1:/UAQ5xG3faDdy180rCUv47e0jvpp3BFxT+Cl0PFjw5g= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/batch v1.6.3/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= +cloud.google.com/go/batch v1.7.0/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= +cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= +cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= +cloud.google.com/go/billing v1.17.4/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= +cloud.google.com/go/billing v1.18.0/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/binaryauthorization v1.7.3/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= +cloud.google.com/go/binaryauthorization v1.8.0/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/certificatemanager v1.7.4/go.mod h1:FHAylPe/6IIKuaRmHbjbdLhGhVQ+CWHSD5Jq0k4+cCE= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= +cloud.google.com/go/channel v1.17.3/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= +cloud.google.com/go/channel v1.17.4/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= +cloud.google.com/go/cloudbuild v1.14.3/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= +cloud.google.com/go/cloudbuild v1.15.0/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +cloud.google.com/go/clouddms v1.7.3/go.mod h1:fkN2HQQNUYInAU3NQ3vRLkV2iWs8lIdmBKOx4nrL6Hc= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= +cloud.google.com/go/cloudtasks v1.12.4/go.mod h1:BEPu0Gtt2dU6FxZHNqqNdGqIG86qyWKBPGnsb7udGY0= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +cloud.google.com/go/contactcenterinsights v1.11.3/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= +cloud.google.com/go/contactcenterinsights v1.12.1/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= +cloud.google.com/go/container v1.27.1/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= +cloud.google.com/go/container v1.29.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= +cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= +cloud.google.com/go/datacatalog v1.18.3/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= +cloud.google.com/go/datacatalog v1.19.0/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +cloud.google.com/go/dataflow v0.9.4/go.mod h1:4G8vAkHYCSzU8b/kmsoR2lWyHJD85oMJPHMtan40K8w= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= +cloud.google.com/go/dataform v0.9.1/go.mod h1:pWTg+zGQ7i16pyn0bS1ruqIE91SdL2FDMvEYu/8oQxs= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +cloud.google.com/go/datafusion v1.7.4/go.mod h1:BBs78WTOLYkT4GVZIXQCZT3GFpkpDN4aBY4NDX/jVlM= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/datalabeling v0.8.4/go.mod h1:Z1z3E6LHtffBGrNUkKwbwbDxTiXEApLzIgmymj8A3S8= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= +cloud.google.com/go/dataplex v1.11.1/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= +cloud.google.com/go/dataplex v1.14.0/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataproc/v2 v2.2.3/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= +cloud.google.com/go/dataproc/v2 v2.3.0/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= +cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= +cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= +cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= +cloud.google.com/go/deploy v1.14.2/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= +cloud.google.com/go/deploy v1.16.0/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= +cloud.google.com/go/dialogflow v1.44.3/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= +cloud.google.com/go/dialogflow v1.48.0/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +cloud.google.com/go/dlp v1.11.1/go.mod h1:/PA2EnioBeXTL/0hInwgj0rfsQb3lpE3R8XUJxqUNKI= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= +cloud.google.com/go/documentai v1.23.5/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= +cloud.google.com/go/documentai v1.23.7/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +cloud.google.com/go/domains v0.9.4/go.mod h1:27jmJGShuXYdUNjyDG0SodTfT5RwLi7xmH334Gvi3fY= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= +cloud.google.com/go/edgecontainer v1.1.4/go.mod h1:AvFdVuZuVGdgaE5YvlL1faAoa1ndRR/5XhXZvPBHbsE= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/essentialcontacts v1.6.5/go.mod h1:jjYbPzw0x+yglXC890l6ECJWdYeZ5dlYACTFL0U/VuM= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= +cloud.google.com/go/eventarc v1.13.3/go.mod h1:RWH10IAZIRcj1s/vClXkBgMHwh59ts7hSWcqD3kaclg= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= +cloud.google.com/go/filestore v1.7.4/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= +cloud.google.com/go/filestore v1.8.0/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= +cloud.google.com/go/functions v1.15.4/go.mod h1:CAsTc3VlRMVvx+XqXxKqVevguqJpnVip4DdonFsX28I= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkebackup v1.3.4/go.mod h1:gLVlbM8h/nHIs09ns1qx3q3eaXcGSELgNu1DWXYz1HI= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +cloud.google.com/go/gkeconnect v0.8.4/go.mod h1:84hZz4UMlDCKl8ifVW8layK4WHlMAFeq8vbzjU0yJkw= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= +cloud.google.com/go/gkehub v0.14.4/go.mod h1:Xispfu2MqnnFt8rV/2/3o73SK1snL8s9dYJ9G2oQMfc= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +cloud.google.com/go/gkemulticloud v1.0.3/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= +cloud.google.com/go/gkemulticloud v1.1.0/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/gsuiteaddons v1.6.4/go.mod h1:rxtstw7Fx22uLOXBpsvb9DUbC+fiXs7rF4U29KHM/pE= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= +cloud.google.com/go/iap v1.9.3/go.mod h1:DTdutSZBqkkOm2HEOTBzhZxh2mwwxshfD/h3yofAiCw= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/ids v1.4.4/go.mod h1:z+WUc2eEl6S/1aZWzwtVNWoSZslgzPxAboS0lZX0HjI= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= +cloud.google.com/go/iot v1.7.4/go.mod h1:3TWqDVvsddYBG++nHSZmluoCAVGr1hAcabbWZNKEZLk= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= +cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +cloud.google.com/go/language v1.12.2/go.mod h1:9idWapzr/JKXBBQ4lWqVX/hcadxB194ry20m/bTrhWc= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/lifesciences v0.9.4/go.mod h1:bhm64duKhMi7s9jR9WYJYvjAFJwRqNj+Nia7hF0Z7JA= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/maps v1.6.1/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= +cloud.google.com/go/maps v1.6.2/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +cloud.google.com/go/mediatranslation v0.8.4/go.mod h1:9WstgtNVAdN53m6TQa5GjIjLqKQPXe74hwSCxUP6nj4= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +cloud.google.com/go/memcache v1.10.4/go.mod h1:v/d8PuC8d1gD6Yn5+I3INzLR01IDn0N4Ym56RgikSI0= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/metastore v1.13.3/go.mod h1:K+wdjXdtkdk7AQg4+sXS8bRrQa9gcOr+foOMF2tqINE= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= +cloud.google.com/go/monitoring v1.16.3/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= +cloud.google.com/go/monitoring v1.17.0/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= +cloud.google.com/go/networkconnectivity v1.14.3/go.mod h1:4aoeFdrJpYEXNvrnfyD5kIzs8YtHg945Og4koAjHQek= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +cloud.google.com/go/networkmanagement v1.9.3/go.mod h1:y7WMO1bRLaP5h3Obm4tey+NquUvB93Co1oh4wpL+XcU= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= +cloud.google.com/go/networksecurity v0.9.4/go.mod h1:E9CeMZ2zDsNBkr8axKSYm8XyTqNhiCHf1JO/Vb8mD1w= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= +cloud.google.com/go/notebooks v1.11.2/go.mod h1:z0tlHI/lREXC8BS2mIsUeR3agM1AkgLiS+Isov3SS70= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/optimization v1.6.2/go.mod h1:mWNZ7B9/EyMCcwNl1frUGEuY6CPijSkz88Fz2vwKPOY= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orchestration v1.8.4/go.mod h1:d0lywZSVYtIoSZXb0iFjv9SaL13PGyVOKDxqGxEf/qI= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +cloud.google.com/go/orgpolicy v1.11.4/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= +cloud.google.com/go/orgpolicy v1.12.0/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/phishingprotection v0.8.4/go.mod h1:6b3kNPAc2AQ6jZfFHioZKg9MQNybDg4ixFd4RPZZ2nE= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= +cloud.google.com/go/policytroubleshooter v1.10.2/go.mod h1:m4uF3f6LseVEnMV6nknlN2vYGRb+75ylQwJdnOXfnv0= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= +cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= +cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.3/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= +cloud.google.com/go/recaptchaenterprise/v2 v2.9.0/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +cloud.google.com/go/recommendationengine v0.8.4/go.mod h1:GEteCf1PATl5v5ZsQ60sTClUE0phbWmo3rQ1Js8louU= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +cloud.google.com/go/recommender v1.11.3/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= +cloud.google.com/go/recommender v1.12.0/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/redis v1.14.1/go.mod h1:MbmBxN8bEnQI4doZPC1BzADU4HGocHBk2de3SbgOkqs= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= +cloud.google.com/go/resourcemanager v1.9.4/go.mod h1:N1dhP9RFvo3lUfwtfLWVxfUWq8+KUQ+XLlHLH3BoFJ0= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +cloud.google.com/go/resourcesettings v1.6.4/go.mod h1:pYTTkWdv2lmQcjsthbZLNBP4QW140cs7wqA3DuqErVI= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/retail v1.14.4/go.mod h1:l/N7cMtY78yRnJqp5JW8emy7MB1nz8E4t2yfOmklYfg= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/run v1.3.3/go.mod h1:WSM5pGyJ7cfYyYbONVQBN4buz42zFqwG67Q3ch07iK4= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= +cloud.google.com/go/scheduler v1.10.4/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= +cloud.google.com/go/scheduler v1.10.5/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/secretmanager v1.11.4/go.mod h1:wreJlbS9Zdq21lMzWmJ0XhWW2ZxgPeahsqeV/vZoJ3w= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= +cloud.google.com/go/security v1.15.4/go.mod h1:oN7C2uIZKhxCLiAAijKUCuHLZbIt/ghYEo8MqwD/Ty4= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= +cloud.google.com/go/securitycenter v1.24.2/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= +cloud.google.com/go/securitycenter v1.24.3/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= +cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= +cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/spanner v1.54.0/go.mod h1:wZvSQVBgngF0Gq86fKup6KIYmN2be7uOKjtK97X+bQU= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= +cloud.google.com/go/speech v1.20.1/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= +cloud.google.com/go/speech v1.21.0/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= +cloud.google.com/go/storagetransfer v1.10.3/go.mod h1:Up8LY2p6X68SZ+WToswpQbQHnJpOty/ACcMafuey8gc= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/talent v1.6.5/go.mod h1:Mf5cma696HmE+P2BWJ/ZwYqeJXEeU0UqjHFXVLadEDI= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/texttospeech v1.7.4/go.mod h1:vgv0002WvR4liGuSd5BJbWy4nDn5Ozco0uJymY5+U74= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/tpu v1.6.4/go.mod h1:NAm9q3Rq2wIlGnOhpYICNI7+bpBebMJbh0yyp3aNw1Y= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= +cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.9.3/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= +cloud.google.com/go/translate v1.10.0/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.20.3/go.mod h1:TnH/mNZKVHeNtpamsSPygSR0iHtvrR/cW1/GDjN5+GU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +cloud.google.com/go/videointelligence v1.11.4/go.mod h1:kPBMAYsTPFiQxMLmmjpcZUMklJp3nC9+ipJJtprccD8= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= +cloud.google.com/go/vision/v2 v2.7.5/go.mod h1:GcviprJLFfK9OLf0z8Gm6lQb6ZFUulvpZws+mm6yPLM= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= +cloud.google.com/go/vmmigration v1.7.4/go.mod h1:yBXCmiLaB99hEl/G9ZooNx2GyzgsjKnw5fWcINRgD70= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= +cloud.google.com/go/vmwareengine v1.0.3/go.mod h1:QSpdZ1stlbfKtyt6Iu19M6XRxjmXO+vb5a/R6Fvy2y4= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +cloud.google.com/go/vpcaccess v1.7.4/go.mod h1:lA0KTvhtEOb/VOdnH/gwPuOzGgM+CWsmGu6bb4IoMKk= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/webrisk v1.9.4/go.mod h1:w7m4Ib4C+OseSr2GL66m0zMBywdrVNTDKsdEsfMl7X0= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +cloud.google.com/go/websecurityscanner v1.6.4/go.mod h1:mUiyMQ+dGpPPRkHgknIZeCzSHJ45+fY4F52nZFDHm2o= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +cloud.google.com/go/workflows v1.12.3/go.mod h1:fmOUeeqEwPzIU81foMjTRQIdwQHADi/vEr1cx9R1m5g= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/NeowayLabs/drm v0.0.0-20190824133025-4939fc0ad345/go.mod h1:B8Pf8lJWIsLTs7oyWkXOWOGAZiQQVomlZurKAgx8HBA= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= -github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= -github.com/cloud-barista/cb-log v0.6.3 h1:6FEzJFOOWl2a4oA1+fDvibgthChIEq7JH/Evnh6LlGY= -github.com/cloud-barista/cb-log v0.6.3/go.mod h1:nGgfTFMPwl1MpCO3FBjexUkNdOYA0BNJoyM9Pd0lMms= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloud-barista/cb-log v0.6.4 h1:HblyslcRLeD2tib4UcZszJ8ZNfB4W0CRVvbKlf9uY78= github.com/cloud-barista/cb-log v0.6.4/go.mod h1:nGgfTFMPwl1MpCO3FBjexUkNdOYA0BNJoyM9Pd0lMms= +github.com/cloud-barista/cb-tumblebug v0.0.0-20230724172618-8f225d0127e8 h1:3aao7cE0ntlhJwl4p9RBaFz6ulM2xXq/SGR/xPxfxYc= +github.com/cloud-barista/cb-tumblebug v0.0.0-20230724172618-8f225d0127e8/go.mod h1:RdSc2Ji06owVW3gwkBlZCSPrmxAyzstCWu9fa0emyco= github.com/cloud-barista/cm-beetle/src v0.0.0-20230724172618-8f225d0127e8/go.mod h1:XQuz7L64MNUu04FmG5gB0z41VcrfaLuQP80EGyQTDgo= +github.com/cloud-barista/mc-terrarium v0.0.6-0.20240516045927-43023b6a0e18/go.mod h1:qey9GFrJidyJ3tVfeL/gcImgWLqsF64j/fVmBfaddDI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-iptables v0.7.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= @@ -32,39 +303,73 @@ github.com/digitalocean/go-openvswitch v0.0.0-20230210190010-977d98586f70/go.mod github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e/go.mod h1:YTIHhz/QFSYnu/EhlF2SpU2Uk+32abacUYA5ZPljz1A= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= +github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-ping/ping v1.1.0/go.mod h1:xIFjORFzTxqIV/tDVGO4eDy/bLuSyawEeojSm3GfRGk= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/pprof v0.0.0-20230323073829-e72429f035bd/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jaypipes/ghw v0.12.0/go.mod h1:jeJGbkRB2lL3/gxYzNYzEDETV1ZJ56OKr+CSeSEym+g= github.com/jaypipes/pcidb v1.0.0/go.mod h1:TnYUvqhPBzCKnH34KrIX22kAeEbDCSRJ9cqLRCuNDfk= +github.com/jollaman999/utils v1.0.10/go.mod h1:fb4x+o0k105MFIBBaNRN+tat7F3RbkolnURccQd3UEA= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/knqyf263/go-rpmdb v0.0.0-20231206071317-a8af76a6220f/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= +github.com/knqyf263/go-rpmdb v0.1.0/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kumako/go-win64api v0.0.0-20200829071356-ddc2195639e5/go.mod h1:QErslf4fQWjLog9REVFLv/fOBHP3ceRkHde6hEngOIs= github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= +github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/libvirt/libvirt-go-xml v7.4.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A= github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= +github.com/lufia/plan9stats v0.0.0-20240513124658-fba389f38bae/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= +github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= @@ -72,71 +377,83 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/ovn-org/libovsdb v0.6.0/go.mod h1:5Ld4X+oWvMlbPAGvbJyE/wp8TAWdydI67jatQ3qbsVc= +github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= +github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/crypt v0.10.0/go.mod h1:gwTNHQVoOS3xp9Xvz5LLR+1AauC5M6880z5NWzdhOyQ= +github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg= github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d h1:4660u5vJtsyrn3QwJNfESwCws+TM1CMhRn123xjVyQ8= -github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d/go.mod h1:ZLVe3VfhAuMYLYWliGEydMBoRnfib8EFSqkBYu1ck9E= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a h1:kAe4YSu0O0UFn1DowNo2MY5p6xzqtJ/wQ7LZynSvGaY= +github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= +github.com/taigrr/systemctl v1.0.6/go.mod h1:TpeHkNuHgYT63FI5jVLBf5VNAGbxEFH3FHqg5ReXnd0= +github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= +github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= +github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xujiajun/mmap-go v1.0.1 h1:7Se7ss1fLPPRW+ePgqGpCkfGIZzJV6JPq9Wq9iv/WHc= -github.com/xujiajun/mmap-go v1.0.1/go.mod h1:CNN6Sw4SL69Sui00p0zEzcZKbt+5HtEnYUsc6BKKRMg= -github.com/xujiajun/nutsdb v0.10.0 h1:kSxd7MyZiAVQM2I79FK74WneGI+uaHsUdak8dbjzKJc= -github.com/xujiajun/nutsdb v0.10.0/go.mod h1:8ZdTTF0cEQO+wN940htfHYKswFql2iB6Osckx+GmOoU= -github.com/xujiajun/utils v0.0.0-20190123093513-8bf096c4f53b h1:jKG9OiL4T4xQN3IUrhUpc1tG+HfDXppkgVcrAiiaI/0= -github.com/xujiajun/utils v0.0.0-20190123093513-8bf096c4f53b/go.mod h1:AZd87GYJlUzl82Yab2kTjx1EyXSQCAfZDhpTo1SQC4k= github.com/yumaojun03/dmidecode v0.1.4/go.mod h1:34bbsMNMNjDbijDpRuqd+2ZapDKxvhO+FlgGgOgS6G8= +github.com/yumaojun03/dmidecode v0.1.5-0.20231113021359-c053d91d9679/go.mod h1:7iFa4NvM+dLZjKVs/prwGUXvXCBtaoPz6E0joTS7TXQ= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zcalusic/sysinfo v1.0.2/go.mod h1:kluzTYflRWo6/tXVMJPdEjShsbPpsFRyy+p1mBQPC30= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= diff --git a/pkg/api/rest/common/config.go b/pkg/api/rest/common/config.go index be461d7..18e9f70 100644 --- a/pkg/api/rest/common/config.go +++ b/pkg/api/rest/common/config.go @@ -14,146 +14,137 @@ limitations under the License. // Package common is to handle REST API for common funcitonalities package common -import ( - "fmt" - "net/http" - - "github.com/labstack/echo/v4" - - "github.com/cloud-barista/cm-beetle/pkg/core/common" -) - -// RestInitConfig godoc -// @Summary Init config -// @Description Init config -// @Tags [Admin] System environment -// @Accept json -// @Produce json -// @Param configId path string true "Config ID" -// @Success 200 {object} common.ConfigInfo -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /config/{configId} [delete] -func RestInitConfig(c echo.Context) error { - //id := c.Param("configId") - if err := Validate(c, []string{"configId"}); err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - err := common.InitConfig(c.Param("configId")) - if err != nil { - return SendMessage(c, http.StatusOK, "Failed to init the config "+c.Param("configId")) - } else { - return SendMessage(c, http.StatusOK, "The config "+c.Param("configId")+" has been initialized.") - } -} - -// RestGetConfig godoc -// @Summary Get config -// @Description Get config -// @Tags [Admin] System environment -// @Accept json -// @Produce json -// @Param configId path string true "Config ID" -// @Success 200 {object} common.ConfigInfo -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /config/{configId} [get] -func RestGetConfig(c echo.Context) error { - //id := c.Param("configId") - if err := Validate(c, []string{"configId"}); err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - res, err := common.GetConfig(c.Param("configId")) - if err != nil { - return SendMessage(c, http.StatusOK, "Failed to find the config "+c.Param("configId")) - } else { - return Send(c, http.StatusOK, res) - } -} - -// Response structure for RestGetAllConfig -type RestGetAllConfigResponse struct { - //Name string `json:"name"` - Config []common.ConfigInfo `json:"config"` -} - -// RestGetAllConfig godoc -// @Summary List all configs -// @Description List all configs -// @Tags [Admin] System environment -// @Accept json -// @Produce json -// @Success 200 {object} RestGetAllConfigResponse -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /config [get] -func RestGetAllConfig(c echo.Context) error { - - var content RestGetAllConfigResponse - - configList, err := common.ListConfig() - if err != nil { - return SendMessage(c, http.StatusOK, "Failed to list configs.") - } - - if configList == nil { - return Send(c, http.StatusOK, content) - } - - // When err == nil && resourceList != nil - content.Config = configList - return Send(c, http.StatusOK, content) - -} - -// RestPostConfig godoc -// @Summary Create or Update config -// @Description Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...) -// @Tags [Admin] System environment -// @Accept json -// @Produce json -// @Param config body common.ConfigReq true "Key and Value for configuration" -// @Success 200 {object} common.ConfigInfo -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /config [post] -func RestPostConfig(c echo.Context) error { - - u := &common.ConfigReq{} - if err := c.Bind(u); err != nil { - //return err - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - fmt.Println("[Creating or Updating Config]") - content, err := common.UpdateConfig(u) - if err != nil { - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - return Send(c, http.StatusOK, content) - -} - -// RestInitAllConfig godoc -// @Summary Init all configs -// @Description Init all configs -// @Tags [Admin] System environment -// @Accept json -// @Produce json -// @Success 200 {object} common.SimpleMsg -// @Failure 404 {object} common.SimpleMsg -// @Router /config [delete] -func RestInitAllConfig(c echo.Context) error { - - err := common.InitAllConfig() - if err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - return SendMessage(c, http.StatusOK, "All configs has been initialized.") -} +// // RestInitConfig godoc +// // @Summary Init config +// // @Description Init config +// // @Tags [Admin] System environment +// // @Accept json +// // @Produce json +// // @Param configId path string true "Config ID" +// // @Success 200 {object} common.ConfigInfo +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /config/{configId} [delete] +// func RestInitConfig(c echo.Context) error { +// //id := c.Param("configId") +// if err := Validate(c, []string{"configId"}); err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// err := common.InitConfig(c.Param("configId")) +// if err != nil { +// return SendMessage(c, http.StatusOK, "Failed to init the config "+c.Param("configId")) +// } else { +// return SendMessage(c, http.StatusOK, "The config "+c.Param("configId")+" has been initialized.") +// } +// } + +// // RestGetConfig godoc +// // @Summary Get config +// // @Description Get config +// // @Tags [Admin] System environment +// // @Accept json +// // @Produce json +// // @Param configId path string true "Config ID" +// // @Success 200 {object} common.ConfigInfo +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /config/{configId} [get] +// func RestGetConfig(c echo.Context) error { +// //id := c.Param("configId") +// if err := Validate(c, []string{"configId"}); err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// res, err := common.GetConfig(c.Param("configId")) +// if err != nil { +// return SendMessage(c, http.StatusOK, "Failed to find the config "+c.Param("configId")) +// } else { +// return Send(c, http.StatusOK, res) +// } +// } + +// // Response structure for RestGetAllConfig +// type RestGetAllConfigResponse struct { +// //Name string `json:"name"` +// Config []common.ConfigInfo `json:"config"` +// } + +// // RestGetAllConfig godoc +// // @Summary List all configs +// // @Description List all configs +// // @Tags [Admin] System environment +// // @Accept json +// // @Produce json +// // @Success 200 {object} RestGetAllConfigResponse +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /config [get] +// func RestGetAllConfig(c echo.Context) error { + +// var content RestGetAllConfigResponse + +// configList, err := common.ListConfig() +// if err != nil { +// return SendMessage(c, http.StatusOK, "Failed to list configs.") +// } + +// if configList == nil { +// return Send(c, http.StatusOK, content) +// } + +// // When err == nil && resourceList != nil +// content.Config = configList +// return Send(c, http.StatusOK, content) + +// } + +// // RestPostConfig godoc +// // @Summary Create or Update config +// // @Description Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...) +// // @Tags [Admin] System environment +// // @Accept json +// // @Produce json +// // @Param config body common.ConfigReq true "Key and Value for configuration" +// // @Success 200 {object} common.ConfigInfo +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /config [post] +// func RestPostConfig(c echo.Context) error { + +// u := &common.ConfigReq{} +// if err := c.Bind(u); err != nil { +// //return err +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// fmt.Println("[Creating or Updating Config]") +// content, err := common.UpdateConfig(u) +// if err != nil { +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } +// return Send(c, http.StatusOK, content) + +// } + +// // RestInitAllConfig godoc +// // @Summary Init all configs +// // @Description Init all configs +// // @Tags [Admin] System environment +// // @Accept json +// // @Produce json +// // @Success 200 {object} common.SimpleMsg +// // @Failure 404 {object} common.SimpleMsg +// // @Router /config [delete] +// func RestInitAllConfig(c echo.Context) error { + +// err := common.InitAllConfig() +// if err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// return SendMessage(c, http.StatusOK, "All configs has been initialized.") +// } diff --git a/pkg/api/rest/common/namespace.go b/pkg/api/rest/common/namespace.go index 20ed800..b420d32 100644 --- a/pkg/api/rest/common/namespace.go +++ b/pkg/api/rest/common/namespace.go @@ -15,55 +15,57 @@ limitations under the License. package common import ( + "fmt" "net/http" "github.com/cloud-barista/cm-beetle/pkg/core/common" "github.com/labstack/echo/v4" + "github.com/rs/zerolog/log" ) -func RestCheckNs(c echo.Context) error { - - if err := Validate(c, []string{"nsId"}); err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusNotFound, err.Error()) - } - - nsId := c.Param("nsId") - err := common.CheckString(nsId) - if err != nil { - common.CBLog.Error(err) - return err - } - exists, err := common.CheckNs(nsId) - if err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusNotFound, err.Error()) - } - - return SendExistence(c, http.StatusOK, exists) -} - -// RestDelAllNs godoc -// @Summary Delete all namespaces -// @Description Delete all namespaces -// @Tags [Namespace] Namespace management -// @Accept json -// @Produce json -// @Success 200 {object} common.SimpleMsg -// @Failure 404 {object} common.SimpleMsg -// @Router /ns [delete] -func RestDelAllNs(c echo.Context) error { - - err := common.DelAllNs() - if err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - return SendMessage(c, http.StatusOK, "All namespaces has been deleted") -} - -// RestDelNs godoc +// func RestCheckNs(c echo.Context) error { + +// if err := Validate(c, []string{"nsId"}); err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusNotFound, err.Error()) +// } + +// nsId := c.Param("nsId") +// err := common.CheckString(nsId) +// if err != nil { +// common.CBLog.Error(err) +// return err +// } +// exists, err := common.CheckNs(nsId) +// if err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusNotFound, err.Error()) +// } + +// return SendExistence(c, http.StatusOK, exists) +// } + +// // RestDelAllNs godoc +// // @Summary Delete all namespaces +// // @Description Delete all namespaces +// // @Tags [Namespace] Namespace management +// // @Accept json +// // @Produce json +// // @Success 200 {object} common.SimpleMsg +// // @Failure 404 {object} common.SimpleMsg +// // @Router /ns [delete] +// func RestDelAllNs(c echo.Context) error { + +// err := common.DelAllNs() +// if err != nil { +// common.CBLog.Error(err) +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// return SendMessage(c, http.StatusOK, "All namespaces has been deleted") +// } + +// RestDeleteNs godoc // @Summary Delete namespace // @Description Delete namespace // @Tags [Namespace] Namespace management @@ -73,20 +75,29 @@ func RestDelAllNs(c echo.Context) error { // @Success 200 {object} common.SimpleMsg // @Failure 404 {object} common.SimpleMsg // @Router /ns/{nsId} [delete] -func RestDelNs(c echo.Context) error { +func RestDeleteNs(c echo.Context) error { - if err := Validate(c, []string{"nsId"}); err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) + nsId := c.Param("nsId") + if nsId == "" { + err := fmt.Errorf("invalid request, namespace ID (nsId: %s) is required", nsId) + log.Warn().Msg(err.Error()) + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - err := common.DelNs(c.Param("nsId")) + ret, err := common.DeleteNamespace(nsId) if err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) + log.Error().Err(err).Msg("failed to delete namespace") + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } - return SendMessage(c, http.StatusOK, "The ns "+c.Param("nsId")+" has been deleted") + return c.JSON(http.StatusOK, ret) + } // JSONResult's data field will be overridden by the specific type @@ -96,52 +107,31 @@ type JSONResult struct { //Data interface{} `json:"data"` } -// Response structure for RestGetAllNs -type RestGetAllNsResponse struct { - //Name string `json:"name"` - Ns []common.NsInfo `json:"ns"` -} - // RestGetAllNs godoc // @Summary List all namespaces or namespaces' ID // @Description List all namespaces or namespaces' ID // @Tags [Namespace] Namespace management // @Accept json // @Produce json -// @Param option query string false "Option" Enums(id) // @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllNsResponse,[ID]=common.IdList} "Different return structures by the given option param" // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns [get] func RestGetAllNs(c echo.Context) error { - optionFlag := c.QueryParam("option") + // // @Param option query string false "Option" Enums(id) + // optionFlag := c.QueryParam("option") - var content RestGetAllNsResponse - if optionFlag == "id" { - content := common.IdList{} - - var err error - content.IdList, err = common.ListNsId() - if err != nil { - return SendMessage(c, http.StatusOK, "Failed to list namespaces' ID: "+err.Error()) - } - - return c.JSON(http.StatusOK, &content) - } else { - nsList, err := common.ListNs() - if err != nil { - return SendMessage(c, http.StatusOK, "Failed to list namespaces.") - } - - if nsList == nil { - return Send(c, http.StatusOK, content) + allNamespaces, err := common.GetAllNamespaces() + if err != nil { + log.Error().Err(err).Msg("failed to get all namespaces") + res := common.SimpleMsg{ + Message: err.Error(), } - - // When err == nil && resourceList != nil - content.Ns = nsList - return Send(c, http.StatusOK, content) + return c.JSON(http.StatusInternalServerError, res) } + + return c.JSON(http.StatusOK, allNamespaces) } // RestGetNs godoc @@ -156,18 +146,27 @@ func RestGetAllNs(c echo.Context) error { // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId} [get] func RestGetNs(c echo.Context) error { - //id := c.Param("nsId") - if err := Validate(c, []string{"nsId"}); err != nil { - common.CBLog.Error(err) - return SendMessage(c, http.StatusBadRequest, err.Error()) + + nsId := c.Param("nsId") + if nsId == "" { + err := fmt.Errorf("invalid request, namespace ID (nsId: %s) is required", nsId) + log.Warn().Msg(err.Error()) + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - res, err := common.GetNs(c.Param("nsId")) + nsInfo, err := common.GetNamespace(nsId) if err != nil { - return SendMessage(c, http.StatusOK, "Failed to find the namespace "+c.Param("nsId")) - } else { - return Send(c, http.StatusOK, res) + log.Error().Err(err).Msg("failed to get namespace") + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } + + return c.JSON(http.StatusOK, nsInfo) } // RestPostNs godoc @@ -183,41 +182,47 @@ func RestGetNs(c echo.Context) error { // @Router /ns [post] func RestPostNs(c echo.Context) error { - u := &common.NsReq{} - if err := c.Bind(u); err != nil { - //return err - return SendMessage(c, http.StatusBadRequest, err.Error()) + req := &common.NsReq{} + if err := c.Bind(req); err != nil { + log.Error().Err(err).Msg("failed to bind a request body") + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - content, err := common.CreateNs(u) + nsInfo, err := common.CreateNamespace(*req) if err != nil { - return SendMessage(c, http.StatusBadRequest, err.Error()) + log.Error().Err(err).Msg("failed to create namespace") + res := common.SimpleMsg{ + Message: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } - return Send(c, http.StatusOK, content) - + return c.JSON(http.StatusOK, nsInfo) } -// RestPutNs godoc -// @Summary Update namespace -// @Description Update namespace -// @Tags [Namespace] Namespace management -// @Accept json -// @Produce json -// @Param nsId path string true "Namespace ID" default(ns01) -// @Param namespace body common.NsReq true "Details to update existing namespace" -// @Success 200 {object} common.NsInfo -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /ns/{nsId} [put] -func RestPutNs(c echo.Context) error { - u := &common.NsReq{} - if err := c.Bind(u); err != nil { - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - - content, err := common.UpdateNs(c.Param("nsId"), u) - if err != nil { - return SendMessage(c, http.StatusBadRequest, err.Error()) - } - return Send(c, http.StatusOK, content) -} +// // RestPutNs godoc +// // @Summary Update namespace +// // @Description Update namespace +// // @Tags [Namespace] Namespace management +// // @Accept json +// // @Produce json +// // @Param nsId path string true "Namespace ID" default(ns01) +// // @Param namespace body common.NsReq true "Details to update existing namespace" +// // @Success 200 {object} common.NsInfo +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /ns/{nsId} [put] +// func RestPutNs(c echo.Context) error { +// u := &common.NsReq{} +// if err := c.Bind(u); err != nil { +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } + +// content, err := common.UpdateNs(c.Param("nsId"), u) +// if err != nil { +// return SendMessage(c, http.StatusBadRequest, err.Error()) +// } +// return Send(c, http.StatusOK, content) +// } diff --git a/pkg/api/rest/controller/migration.go b/pkg/api/rest/controller/migration.go index eb0f2c8..996dcec 100644 --- a/pkg/api/rest/controller/migration.go +++ b/pkg/api/rest/controller/migration.go @@ -17,11 +17,11 @@ package controller import ( "fmt" "net/http" - "time" + model "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/beetle" cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" "github.com/cloud-barista/cm-beetle/pkg/core/common" - "github.com/go-resty/resty/v2" + "github.com/cloud-barista/cm-beetle/pkg/core/migration" "github.com/labstack/echo/v4" // Black import (_) is for running a package's init() function without using its other contents. @@ -33,7 +33,7 @@ type MigrateInfraRequest struct { // [NOTE] Failed to embed the struct in CB-Tumblebug as follows: // mcis.TbMcisDynamicReq - cloudmodel.TbMcisDynamicReq + cloudmodel.InfraMigrationReq } type MigrateInfraResponse struct { @@ -42,255 +42,359 @@ type MigrateInfraResponse struct { // MigrateInfra godoc // @Summary Migrate an infrastructure on a cloud platform -// @Description It migrates an infrastructure on a cloud platform. Infrastructure includes network, storage, compute, and so on. +// @Description It migrates an infrastructure on a cloud platform. // @Tags [Migration] Infrastructure // @Accept json // @Produce json +// @Param nsId path string true "Namespace ID" // @Param InfrastructureInfo body MigrateInfraRequest true "Specify network, disk, compute, security group, virtual machine, etc." // @Success 200 {object} MigrateInfraResponse "Successfully migrated infrastructure on a cloud platform" -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg +// @Failure 404 {object} model.Response +// @Failure 500 {object} model.Response // @Router /migration/infra [post] func MigrateInfra(c echo.Context) error { // [Note] Input section + nsId := c.Param("nsId") + if nsId == "" { + err := fmt.Errorf("invalid request, namespace ID (nsId: %s) is required", nsId) + log.Warn().Msg(err.Error()) + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) + } + req := &MigrateInfraRequest{} if err := c.Bind(req); err != nil { return err } log.Trace().Msgf("req: %v\n", req) - log.Trace().Msgf("req.TbMcisDynamicReq: %v\n", req.TbMcisDynamicReq) - - // [Note] Process section - // Call CB-Tumblebug API, which can be "/mcisDynamic" - // Default nsId is "ns01" - nsId := "ns01" - result, err := createVMInfra(nsId, &req.TbMcisDynamicReq) - - log.Trace().Msgf("result: %v\n", result) + log.Trace().Msgf("req.TbMcisDynamicReq: %v\n", req.InfraMigrationReq) - // [Note] Ouput section + nsInfo, err := common.GetNamespace(nsId) if err != nil { - log.Error().Err(err).Msg("Failed to create VM infrastructure") - mapA := map[string]string{"message": err.Error()} - return c.JSON(http.StatusInternalServerError, &mapA) + log.Error().Err(err).Msg("failed to get the namespace") + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } - res := result - - return c.JSON(http.StatusOK, res) - -} - -func createVMInfra(nsId string, infraModel *cloudmodel.TbMcisDynamicReq) (cloudmodel.TbMcisInfo, error) { - - client := resty.New() - client.SetBasicAuth("default", "default") - method := "POST" - - // CB-Tumblebug API endpoint - cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug" - url := cbTumblebugApiEndpoint + fmt.Sprintf("/ns/%s/mcisDynamic", nsId) - // url := fmt.Sprintf("%s/ns/{nsId}/mcisDynamic%s", cbTumblebugApiEndpoint, idDetails.IdInSp) - - // Set request body - requestBody := *infraModel - - // Set response body - responseBody := cloudmodel.TbMcisInfo{} - - client.SetTimeout(5 * time.Minute) - - err := common.ExecuteHttpRequest( - client, - method, - url, - nil, - common.SetUseBody(requestBody), - &requestBody, - &responseBody, - common.MediumDuration, - ) - - if err != nil { - // common.CBLog.Error(err) - return cloudmodel.TbMcisInfo{}, err + if nsInfo.Id == "" { + err := fmt.Errorf("not found the namespace (nsId: %s), create a namespace first", nsId) + log.Error().Err(err).Msg("") + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - return responseBody, nil -} - -//////////////////////// - -type MigrateNetworkRequest struct { - cloudmodel.DummyNetwork -} - -type MigrateNetworkResponse struct { - cloudmodel.DummyNetwork -} - -// MigrateNetwork godoc -// @Summary (Skeleton) Migrate network on a cloud platform -// @Description It migrates network on a cloud platform. Network includes name, ID, IPv4 CIDR block, IPv6 CIDR block, and so on. -// @Tags [Migration] Infrastructure -// @Accept json -// @Produce json -// @Param NetworkInfo body MigrateNetworkRequest true "Specify name, IPv4 CIDR block, etc." -// @Success 200 {object} MigrateNetworkResponse "Successfully migrated network on a cloud platform" -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /migration/infra/network [post] -func MigrateNetwork(c echo.Context) error { - - // [Note] Input section - req := &MigrateNetworkRequest{} - if err := c.Bind(req); err != nil { - return err - } - - log.Trace().Msgf("req: %v\n", req) - log.Trace().Msgf("req.DummyNetwork: %v\n", req.DummyNetwork) - - // [Note] Process section - // Something to process here like, - // Perform some functions, - // Calls external APIs and so on - - res := &MigrateNetworkResponse{} - log.Trace().Msgf("res: %v\n", res) - log.Trace().Msgf("res.DummyNetwork: %v\n", res.DummyNetwork) + // Create the VM infrastructure for migration + infraInfo, err := migration.CreateVMInfra(nsId, &req.InfraMigrationReq) - // This is an intentionally created variable. - // You will have to delete this later. - var err error = nil + log.Trace().Msgf("infraInfo: %v\n", infraInfo) // [Note] Ouput section if err != nil { - log.Error().Err(err).Msg("Failed to migrate network on a cloud platform") - mapA := map[string]string{"message": err.Error()} - return c.JSON(http.StatusInternalServerError, &mapA) + log.Error().Err(err).Msg("failed to create VM infrastructure") + + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } + res := infraInfo return c.JSON(http.StatusOK, res) } -//////////////////////// - -//////////////////////// - -type MigrateStorageRequest struct { - cloudmodel.DummyStorage -} - -type MigrateStorageResponse struct { - cloudmodel.DummyStorage -} - -// MigrateStorage godoc -// @Summary (Skeleton) Migrate storage on a cloud platform -// @Description It migrates storage on a cloud platform. Storage includes name, ID, type, size, and so on. +// GetInfra godoc +// @Summary Get the migrated infrastructure on a cloud platform +// @Description It gets the migrated infrastructure on a cloud platform. // @Tags [Migration] Infrastructure // @Accept json // @Produce json -// @Param StorageInfo body MigrateStorageRequest true "Specify name, type, size, affiliated Network ID, and so on." -// @Success 200 {object} MigrateStorageResponse "Successfully migrated storage on a cloud platform" -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /migration/infra/storage [post] -func MigrateStorage(c echo.Context) error { +// @Param nsId path string true "a namespace ID" +// @Param infraId path string true "a infrastructure ID created for migration" +// @Success 200 {object} MigrateInfraResponse "Successfully got the migrated infrastructure on a cloud platform" +// @Failure 404 {object} model.Response +// @Failure 500 {object} model.Response +// @Router /migration/infra/{infraId} [get] +func GetInfra(c echo.Context) error { // [Note] Input section - req := &MigrateStorageRequest{} - if err := c.Bind(req); err != nil { - return err + nsId := c.Param("vsId") + if nsId == "" { + err := fmt.Errorf("invalid request, the nanespace ID (nsId: %s) is required", nsId) + log.Warn().Msg(err.Error()) + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - log.Trace().Msgf("req: %v\n", req) - log.Trace().Msgf("req.DummyStorage: %v\n", req.DummyStorage) + infraId := c.Param("infraId") + if infraId == "" { + err := fmt.Errorf("invalid request, the infrastructure ID (infraId: %s) is required", infraId) + log.Warn().Msg(err.Error()) + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) + } // [Note] Process section - // Something to process here like, - // Perform some functions, - // Calls external APIs and so on - - res := &MigrateStorageResponse{} - log.Trace().Msgf("res: %v\n", res) - log.Trace().Msgf("res.DummyStorage: %v\n", res.DummyStorage) - - // This is an intentionally created variable. - // You will have to delete this later. - var err error = nil - - // [Note] Ouput section + vmInfraInfo, err := migration.GetVMInfra(nsId, infraId) if err != nil { - log.Error().Err(err).Msg("Failed to migrate storage on a cloud platform") - mapA := map[string]string{"message": err.Error()} - return c.JSON(http.StatusInternalServerError, &mapA) + log.Error().Err(err).Msg("failed to get the migrated infrastructure") + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) } - return c.JSON(http.StatusOK, res) - -} - -//////////////////////// - -//////////////////////// - -type MigrateInstanceRequest struct { - cloudmodel.DummyInstance -} - -type MigrateInstanceResponse struct { - cloudmodel.DummyInstance + // [Note] Ouput section + return c.JSON(http.StatusOK, vmInfraInfo) } -// MigrateInstance godoc -// @Summary (Skeleton) Migrate instance on a cloud platform -// @Description It migrates instance on a cloud platform. Storage includes name, spec, OS, and so on. +// DeleteInfra godoc +// @Summary Delete the migrated infrastructure on a cloud platform +// @Description It deletes the migrated infrastructure on a cloud platform. // @Tags [Migration] Infrastructure // @Accept json // @Produce json -// @Param InstanceInfo body MigrateInstanceRequest true "Specify name, spec, OS, and so on." -// @Success 200 {object} MigrateInstanceResponse "Successfully migrated storage on a cloud platform" -// @Failure 404 {object} common.SimpleMsg -// @Failure 500 {object} common.SimpleMsg -// @Router /migration/infra/instance [post] -func MigrateInstance(c echo.Context) error { +// @Param nsId path string true "a namespace ID" +// @Param infraId path string true "a infrastructure ID created for migration" +// @Success 200 {object} model.Response "Successfully deleted the migrated infrastructure on a cloud platform" +// @Failure 404 {object} model.Response +// @Failure 500 {object} model.Response +// @Router /migration/infra/{infraId} [delete] +func DeleteInfra(c echo.Context) error { // [Note] Input section - req := &MigrateInstanceRequest{} - if err := c.Bind(req); err != nil { - return err + nsId := c.Param("vsId") + if nsId == "" { + err := fmt.Errorf("invalid request, the nanespace ID (nsId: %s) is required", nsId) + log.Warn().Msg(err.Error()) + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) } - log.Trace().Msgf("req: %v\n", req) - log.Trace().Msgf("req.DummyInstance: %v\n", req.DummyInstance) + infraId := c.Param("infraId") + if infraId == "" { + err := fmt.Errorf("invalid request, the infrastructure ID (infraId: %s) is required", infraId) + log.Warn().Msg(err.Error()) + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusBadRequest, res) + } // [Note] Process section - // Something to process here like, - // Perform some functions, - // Calls external APIs and so on + retMsg, err := migration.DeleteVMInfra(nsId, infraId) - res := &MigrateInstanceResponse{} - log.Trace().Msgf("res: %v\n", res) - log.Trace().Msgf("res.DummyInstance: %v\n", res.DummyInstance) - - // This is an intentionally created variable. - // You will have to delete this later. - var err error = nil + if err != nil { + log.Error().Err(err).Msg("failed to delete the migrated infrastructure") + res := model.Response{ + Success: false, + Text: err.Error(), + } + return c.JSON(http.StatusInternalServerError, res) + } // [Note] Ouput section - if err != nil { - log.Error().Err(err).Msg("Failed to migrate instance on a cloud platform") - mapA := map[string]string{"message": err.Error()} - return c.JSON(http.StatusInternalServerError, &mapA) + res := model.Response{ + Success: true, + Text: retMsg.Message, } return c.JSON(http.StatusOK, res) - } //////////////////////// + +// type MigrateNetworkRequest struct { +// cloudmodel.DummyNetwork +// } + +// type MigrateNetworkResponse struct { +// cloudmodel.DummyNetwork +// } + +// // MigrateNetwork godoc +// // @Summary (Skeleton) Migrate network on a cloud platform +// // @Description It migrates network on a cloud platform. Network includes name, ID, IPv4 CIDR block, IPv6 CIDR block, and so on. +// // @Tags [Migration] Infrastructure +// // @Accept json +// // @Produce json +// // @Param NetworkInfo body MigrateNetworkRequest true "Specify name, IPv4 CIDR block, etc." +// // @Success 200 {object} MigrateNetworkResponse "Successfully migrated network on a cloud platform" +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /migration/infra/network [post] +// func MigrateNetwork(c echo.Context) error { + +// // [Note] Input section +// req := &MigrateNetworkRequest{} +// if err := c.Bind(req); err != nil { +// return err +// } + +// log.Trace().Msgf("req: %v\n", req) +// log.Trace().Msgf("req.DummyNetwork: %v\n", req.DummyNetwork) + +// // [Note] Process section +// // Something to process here like, +// // Perform some functions, +// // Calls external APIs and so on + +// res := &MigrateNetworkResponse{} +// log.Trace().Msgf("res: %v\n", res) +// log.Trace().Msgf("res.DummyNetwork: %v\n", res.DummyNetwork) + +// // This is an intentionally created variable. +// // You will have to delete this later. +// var err error = nil + +// // [Note] Ouput section +// if err != nil { +// log.Error().Err(err).Msg("Failed to migrate network on a cloud platform") +// mapA := map[string]string{"message": err.Error()} +// return c.JSON(http.StatusInternalServerError, &mapA) +// } + +// return c.JSON(http.StatusOK, res) + +// } + +// //////////////////////// + +// //////////////////////// + +// type MigrateStorageRequest struct { +// cloudmodel.DummyStorage +// } + +// type MigrateStorageResponse struct { +// cloudmodel.DummyStorage +// } + +// // MigrateStorage godoc +// // @Summary (Skeleton) Migrate storage on a cloud platform +// // @Description It migrates storage on a cloud platform. Storage includes name, ID, type, size, and so on. +// // @Tags [Migration] Infrastructure +// // @Accept json +// // @Produce json +// // @Param StorageInfo body MigrateStorageRequest true "Specify name, type, size, affiliated Network ID, and so on." +// // @Success 200 {object} MigrateStorageResponse "Successfully migrated storage on a cloud platform" +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /migration/infra/storage [post] +// func MigrateStorage(c echo.Context) error { + +// // [Note] Input section +// req := &MigrateStorageRequest{} +// if err := c.Bind(req); err != nil { +// return err +// } + +// log.Trace().Msgf("req: %v\n", req) +// log.Trace().Msgf("req.DummyStorage: %v\n", req.DummyStorage) + +// // [Note] Process section +// // Something to process here like, +// // Perform some functions, +// // Calls external APIs and so on + +// res := &MigrateStorageResponse{} +// log.Trace().Msgf("res: %v\n", res) +// log.Trace().Msgf("res.DummyStorage: %v\n", res.DummyStorage) + +// // This is an intentionally created variable. +// // You will have to delete this later. +// var err error = nil + +// // [Note] Ouput section +// if err != nil { +// log.Error().Err(err).Msg("Failed to migrate storage on a cloud platform") +// mapA := map[string]string{"message": err.Error()} +// return c.JSON(http.StatusInternalServerError, &mapA) +// } + +// return c.JSON(http.StatusOK, res) + +// } + +// //////////////////////// + +// //////////////////////// + +// type MigrateInstanceRequest struct { +// cloudmodel.DummyInstance +// } + +// type MigrateInstanceResponse struct { +// cloudmodel.DummyInstance +// } + +// // MigrateInstance godoc +// // @Summary (Skeleton) Migrate instance on a cloud platform +// // @Description It migrates instance on a cloud platform. Storage includes name, spec, OS, and so on. +// // @Tags [Migration] Infrastructure +// // @Accept json +// // @Produce json +// // @Param InstanceInfo body MigrateInstanceRequest true "Specify name, spec, OS, and so on." +// // @Success 200 {object} MigrateInstanceResponse "Successfully migrated storage on a cloud platform" +// // @Failure 404 {object} common.SimpleMsg +// // @Failure 500 {object} common.SimpleMsg +// // @Router /migration/infra/instance [post] +// func MigrateInstance(c echo.Context) error { + +// // [Note] Input section +// req := &MigrateInstanceRequest{} +// if err := c.Bind(req); err != nil { +// return err +// } + +// log.Trace().Msgf("req: %v\n", req) +// log.Trace().Msgf("req.DummyInstance: %v\n", req.DummyInstance) + +// // [Note] Process section +// // Something to process here like, +// // Perform some functions, +// // Calls external APIs and so on + +// res := &MigrateInstanceResponse{} +// log.Trace().Msgf("res: %v\n", res) +// log.Trace().Msgf("res.DummyInstance: %v\n", res.DummyInstance) + +// // This is an intentionally created variable. +// // You will have to delete this later. +// var err error = nil + +// // [Note] Ouput section +// if err != nil { +// log.Error().Err(err).Msg("Failed to migrate instance on a cloud platform") +// mapA := map[string]string{"message": err.Error()} +// return c.JSON(http.StatusInternalServerError, &mapA) +// } + +// return c.JSON(http.StatusOK, res) + +// } + +// //////////////////////// diff --git a/pkg/api/rest/controller/recommendation.go b/pkg/api/rest/controller/recommendation.go index 9d015d4..7cc9a21 100644 --- a/pkg/api/rest/controller/recommendation.go +++ b/pkg/api/rest/controller/recommendation.go @@ -17,8 +17,9 @@ package controller import ( "net/http" - "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" + cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/onprem/infra" + "github.com/cloud-barista/cm-beetle/pkg/core/common" "github.com/cloud-barista/cm-beetle/pkg/core/recommendation" "github.com/labstack/echo/v4" @@ -28,20 +29,20 @@ import ( "github.com/rs/zerolog/log" ) -type Infrastructure struct { - Network string - Disk string - Compute string - SecurityGroup string - VirtualMachine string -} +// type Infrastructure struct { +// Network string +// Disk string +// Compute string +// SecurityGroup string +// VirtualMachine string +// } type RecommendInfraRequest struct { - infra.Infra + Servers []infra.Infra `json:"servers" validate:"required"` } type RecommendInfraResponse struct { - cloudmodel.TbMcisDynamicReq + cloudmodel.InfraMigrationReq } // RecommendInfra godoc @@ -66,13 +67,10 @@ func RecommendInfra(c echo.Context) error { } log.Trace().Msgf("req: %v\n", req) - log.Trace().Msgf("req.Infra.Compute: %v\n", req.Infra.Compute) - // log.Trace().Msgf("req.Infra.Network: %v\n", req.Infra.Network) - // log.Trace().Msgf("req.Infra.GPU: %v\n", req.Infra.GPU) // Process - recommendedInfra, err := recommendation.Recommend(req.Infra) - recommendedInfra.Name = "recomm-infra01" + recommendedInfra, err := recommendation.Recommend(req.Servers) + recommendedInfra.Name = "recommended-target-infra-model01" // Ouput if err != nil { diff --git a/pkg/api/rest/controller/sample.go b/pkg/api/rest/controller/sample.go index 6d50174..3aeeb33 100644 --- a/pkg/api/rest/controller/sample.go +++ b/pkg/api/rest/controller/sample.go @@ -31,7 +31,7 @@ type GetUsersResponse struct { // GetUsers godoc // @Summary Get a list of users // @Description Get information of all users. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Success 200 {object} GetUsersResponse "(sample) This is a sample description for success response in Swagger UI" @@ -60,7 +60,7 @@ type GetUserResponse struct { // GetUser godoc // @Summary Get specific user information // @Description Get information of a user with a specific ID. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Param id path int true "User ID" @@ -98,7 +98,7 @@ type CreateUserResponse struct { // CreateUser godoc // @Summary Create a new user // @Description Create a new user with the given information. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Param User body CreateUserRequest true "User information" @@ -132,7 +132,7 @@ type UpdateUserResponse struct { // UpdateUser godoc // @Summary Update a user // @Description Update a user with the given information. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Param id path int true "User ID" @@ -172,7 +172,7 @@ type PatchUserResponse struct { // PatchUser godoc // @Summary Patch a user // @Description Patch a user with the given information. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Param id path int true "User ID" @@ -207,7 +207,7 @@ func PatchUser(c echo.Context) error { // DeleteUser godoc // @Summary Delete a user // @Description Delete a user with the given information. -// @Tags [Sample] Users +// @Tags [Sample API] Users // @Accept json // @Produce json // @Param id path int true "User ID" diff --git a/pkg/api/rest/model/README.md b/pkg/api/rest/model/README.md index 4874709..d25f855 100644 --- a/pkg/api/rest/model/README.md +++ b/pkg/api/rest/model/README.md @@ -1,12 +1,12 @@ ## Model synchronization for on-premise ### Synchronization Date -- Date: Fri May 24 04:47:39 PM KST 2024 +- Date: Mon May 27 19:28:28 KST 2024 ### Repository Details - Repository: [cloud-barista/cm-honeybee](https://github.com/cloud-barista/cm-honeybee.git) - Branch: main -- Latest Commit Hash: 0963d03537a4bd0eaaf504cb30965b3137a79834 +- Latest Commit Hash: f22d87db289592463240bd886bcbf71c2bd41bd7 ### Usage Instructions - Update the models with the command below: diff --git a/pkg/api/rest/model/beetle/response.go b/pkg/api/rest/model/beetle/response.go new file mode 100644 index 0000000..0c64f92 --- /dev/null +++ b/pkg/api/rest/model/beetle/response.go @@ -0,0 +1,9 @@ +package model + +type Response struct { + Success bool `json:"success" example:"true"` + Text string `json:"text" example:"Any text"` + Detail string `json:"details,omitempty" example:"Any details"` + Object map[string]interface{} `json:"object,omitempty"` + List []interface{} `json:"list,omitempty"` +} diff --git a/pkg/api/rest/model/cloud/infra/mci.go b/pkg/api/rest/model/cloud/infra/mci.go index da2fb21..22666bd 100644 --- a/pkg/api/rest/model/cloud/infra/mci.go +++ b/pkg/api/rest/model/cloud/infra/mci.go @@ -29,35 +29,33 @@ import ( // VirtualMachine string // } -// TbMcisDynamicReq is sturct for requirements to create MCIS dynamically (with default resource option) -type TbMcisDynamicReq struct { - Name string `json:"name" validate:"required" example:"mcis01"` - +// InfraMigrationReq is sturct for requirements to create MCIS dynamically (with default resource option) +type InfraMigrationReq struct { + Description string `json:"description" example:"the infrastructure created for migration"` + Name string `json:"name" validate:"required" example:"mig01"` // InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes) InstallMonAgent string `json:"installMonAgent" example:"no" default:"yes" enums:"yes,no"` // yes or no // Label is for describing the mcis in a keyword (any string can be used) - Label string `json:"label" example:"DynamicVM" default:""` + Label string `json:"label" example:"rehosting infra" default:""` // SystemLabel is for describing the mcis in a keyword (any string can be used) for special System purpose SystemLabel string `json:"systemLabel" example:"" default:""` - Description string `json:"description" example:"Made in CB-TB"` - - Vm []TbVmDynamicReq `json:"vm" validate:"required"` + Vm []HostMigrationReq `json:"vm" validate:"required"` } -// TbVmDynamicReq is struct to get requirements to create a new server instance dynamically (with default resource option) -type TbVmDynamicReq struct { +// HostMigrationReq is struct to get requirements to create a new server instance dynamically (with default resource option) +type HostMigrationReq struct { // VM name or subGroup name if is (not empty) && (> 0). If it is a group, actual VM name will be generated with -N postfix. Name string `json:"name" example:"g1-1"` // if subGroupSize is (not empty) && (> 0), subGroup will be gernetad. VMs will be created accordingly. SubGroupSize string `json:"subGroupSize" example:"3" default:""` - Label string `json:"label" example:"DynamicVM"` + Label string `json:"label" example:"rehosted virtual machine"` - Description string `json:"description" example:"Description"` + Description string `json:"description" example:"description"` // CommonSpec is field for id of a spec in common namespace CommonSpec string `json:"commonSpec" validate:"required" example:"aws-ap-northeast-2-t2-small"` diff --git a/pkg/api/rest/model/get-onprem-models.sh b/pkg/api/rest/model/get-onprem-models.sh index 8e2f0fa..8b7fd3b 100755 --- a/pkg/api/rest/model/get-onprem-models.sh +++ b/pkg/api/rest/model/get-onprem-models.sh @@ -3,7 +3,7 @@ # Set the repository URL and the target directories REPO_URL="https://github.com/cloud-barista/cm-honeybee.git" BRANCH="main" -MODEL_DIR="model" +MODEL_DIR="agent/pkg/api/rest/model/onprem" TARGET_DIR="./onprem" README_FILE="./README.md" @@ -18,8 +18,11 @@ git clone -b $BRANCH --single-branch $REPO_URL # Remove previous target directory rm -rf $TARGET_DIR +# Create the target directory if it doesn't exist +mkdir -p $TARGET_DIR + # Copy the model directory contents to the target directory -cp -r cm-honeybee/agent/pkg/api/rest/$MODEL_DIR/* $TARGET_DIR/ +cp -r cm-honeybee/$MODEL_DIR/* $TARGET_DIR/ # Get the latest commit hash cd cm-honeybee diff --git a/pkg/api/rest/model/onprem/infra/compute.go b/pkg/api/rest/model/onprem/infra/compute.go index acf0f53..bf0a7b9 100644 --- a/pkg/api/rest/model/onprem/infra/compute.go +++ b/pkg/api/rest/model/onprem/infra/compute.go @@ -2,9 +2,9 @@ package infra type OS struct { Name string `json:"name"` - Vendor string `json:"vendor"` + Vendor string `json:"vendor" validate:"required"` Version string `json:"version"` - Release string `json:"release"` + Release string `json:"release" validate:"required"` Architecture string `json:"architecture"` } @@ -22,7 +22,7 @@ type Node struct { } type System struct { - OS OS `json:"os"` + OS OS `json:"os" validate:"required"` Kernel Kernel `json:"kernel"` Node Node `json:"node"` } @@ -30,17 +30,17 @@ type System struct { type CPU struct { Vendor string `json:"vendor"` Model string `json:"model"` - MaxSpeed uint `json:"max_speed"` // MHz - Cache uint `json:"cache"` // KB - Cpus uint `json:"cpus"` // ea - Cores uint `json:"cores"` // ea - Threads uint `json:"threads"` // ea + MaxSpeed uint `json:"max_speed"` // MHz + Cache uint `json:"cache"` // KB + Cpus uint `json:"cpus" validate:"required"` // ea + Cores uint `json:"cores" validate:"required"` // ea + Threads uint `json:"threads" validate:"required"` // ea } type Memory struct { Type string `json:"type"` - Speed uint `json:"speed"` // MHz - Size uint `json:"size"` // MB + Speed uint `json:"speed"` // MHz + Size uint `json:"size" validate:"required"` // MB } type Disk struct { @@ -50,8 +50,8 @@ type Disk struct { } type ComputeResource struct { - CPU CPU `json:"cpu"` - Memory Memory `json:"memory"` + CPU CPU `json:"cpu" validate:"required"` + Memory Memory `json:"memory" validate:"required"` RootDisk Disk `json:"root_disk"` DataDisk []Disk `json:"data_disk"` } @@ -69,7 +69,7 @@ type Connection struct { } type Compute struct { - OS System `json:"os"` - ComputeResource ComputeResource `json:"compute_resource"` + OS System `json:"os" validate:"required"` + ComputeResource ComputeResource `json:"compute_resource" validate:"required"` Connection []Connection `json:"connection"` } diff --git a/pkg/api/rest/route/namespace.go b/pkg/api/rest/route/namespace.go new file mode 100644 index 0000000..b7308c3 --- /dev/null +++ b/pkg/api/rest/route/namespace.go @@ -0,0 +1,14 @@ +package route + +import ( + "github.com/cloud-barista/cm-beetle/pkg/api/rest/common" + "github.com/labstack/echo/v4" +) + +// /beetle/ns/* +func RegisterNamespaceRoutes(g *echo.Group) { + g.POST("", common.RestPostNs) + g.GET("", common.RestGetAllNs) + g.GET("/:nsId", common.RestGetNs) + g.DELETE("/:nsId", common.RestDeleteNs) +} diff --git a/pkg/api/rest/server/server.go b/pkg/api/rest/server/server.go index 479b897..b8ab931 100644 --- a/pkg/api/rest/server/server.go +++ b/pkg/api/rest/server/server.go @@ -179,6 +179,10 @@ func RunServer(port string) { groupSample := groupBase.Group("/sample") route.RegisterSampleRoutes(groupSample) + // Sample API group (for developers to add new API) + groupNamespace := groupBase.Group("/ns") + route.RegisterNamespaceRoutes(groupNamespace) + // Recommendation API group groupRecommendation := groupBase.Group("/recommendation") route.RegisterRecommendationRoutes(groupRecommendation) diff --git a/pkg/core/common/client.go b/pkg/core/common/client.go index 7b12514..e352689 100644 --- a/pkg/core/common/client.go +++ b/pkg/core/common/client.go @@ -15,12 +15,17 @@ limitations under the License. package common import ( + "bytes" "encoding/json" "fmt" + "io" + "net/http" "sync" "time" "github.com/go-resty/resty/v2" + "github.com/labstack/echo/v4" + "github.com/rs/zerolog/log" ) // CacheItem is a struct to store cached item @@ -29,9 +34,15 @@ type CacheItem[T any] struct { ExpiresAt time.Time } +// clientCache is a map for cache items of intenal calls var clientCache = sync.Map{} +// clientRequestCounter is a map for request counters of intenal calls +var clientRequestCounter = sync.Map{} + const ( + // VeryShortDuration is a duration for very short-term cache + VeryShortDuration = 1 * time.Second // ShortDuration is a duration for short-term cache ShortDuration = 2 * time.Second // MediumDuration is a duration for medium-term cache @@ -51,6 +62,33 @@ func SetUseBody(requestBody interface{}) bool { return true } +// limitConcurrentRequests limits the number of Concurrent requests to the given limit +func limitConcurrentRequests(requestKey string, limit int) bool { + count, _ := clientRequestCounter.LoadOrStore(requestKey, 0) + currentCount := count.(int) + + if currentCount >= limit { + fmt.Printf("[%s] requests for %s \n", currentCount, requestKey) + return false + } + + clientRequestCounter.Store(requestKey, currentCount+1) + return true +} + +// requestDone decreases the request counter +func requestDone(requestKey string) { + count, _ := clientRequestCounter.Load(requestKey) + if count == nil { + return + } + currentCount := count.(int) + + if currentCount > 0 { + clientRequestCounter.Store(requestKey, currentCount-1) + } +} + // ExecuteHttpRequest performs the HTTP request and fills the result (var requestBody interface{} = nil for empty body) func ExecuteHttpRequest[B any, T any]( client *resty.Client, @@ -64,7 +102,7 @@ func ExecuteHttpRequest[B any, T any]( ) error { // Generate cache key for GET method only - cacheKey := "" + requestKey := "" if method == "GET" { if useBody { @@ -74,16 +112,16 @@ func ExecuteHttpRequest[B any, T any]( return fmt.Errorf("JSON marshaling failed: %w", err) } // Create cache key using both URL and body - cacheKey = fmt.Sprintf("%s_%s_%s", method, url, string(bodyString)) + requestKey = fmt.Sprintf("%s_%s_%s", method, url, string(bodyString)) } else { // Create cache key using only URL - cacheKey = fmt.Sprintf("%s_%s", method, url) + requestKey = fmt.Sprintf("%s_%s", method, url) } - if item, found := clientCache.Load(cacheKey); found { + if item, found := clientCache.Load(requestKey); found { cachedItem := item.(CacheItem[T]) // Generic type if time.Now().Before(cachedItem.ExpiresAt) { - fmt.Println("Cache hit! Expires: ", time.Now().Sub(cachedItem.ExpiresAt)) + log.Trace().Msgf("Cache hit! Expires: %v", time.Now().Sub(cachedItem.ExpiresAt)) *result = cachedItem.Response //val := reflect.ValueOf(result).Elem() //cachedVal := reflect.ValueOf(cachedItem.Response) @@ -91,14 +129,42 @@ func ExecuteHttpRequest[B any, T any]( return nil } else { - fmt.Println("Cache item expired!") - clientCache.Delete(cacheKey) + log.Trace().Msg("Cache item expired!") + clientCache.Delete(requestKey) + } + } + + // Limit the number of concurrent requests + concurrencyLimit := 10 + retryWait := 5 * time.Second + retryLimit := 3 + retryCount := 0 + // try to wait for the upcomming cached result when sending que is full + for { + if !limitConcurrentRequests(requestKey, concurrencyLimit) { + if retryCount >= retryLimit { + log.Debug().Msgf("Too many same requests: %s\n", requestKey) + return fmt.Errorf("Too many same requests: %s", requestKey) + } + time.Sleep(retryWait) + + if item, found := clientCache.Load(requestKey); found { + cachedItem := item.(CacheItem[T]) + *result = cachedItem.Response + // release the request count for parallel requests limit + requestDone(requestKey) + log.Debug().Msg("Got the cached result while waiting") + return nil + } + retryCount++ + } else { + break } } } // Perform the HTTP request using Resty - client.SetDebug(true) + //client.SetDebug(true) // SetAllowGetMethodPayload should be set to true for GET method to allow payload // NOTE: Need to removed when cb-spider api is stopped to use GET method with payload client.SetAllowGetMethodPayload(true) @@ -130,11 +196,17 @@ func ExecuteHttpRequest[B any, T any]( } if err != nil { + if method == "GET" { + requestDone(requestKey) + } return fmt.Errorf("[Error from: %s] Message: %s", url, err.Error()) } if resp.IsError() { - return fmt.Errorf("[Error from: %s] Status code: %s", url, resp.Status()) + if method == "GET" { + requestDone(requestKey) + } + return fmt.Errorf("[Error from: %s] Status code: %s, Message: %s", url, resp.Status(), resp.Body()) } // Update the cache for GET method only @@ -143,14 +215,151 @@ func ExecuteHttpRequest[B any, T any]( //val := reflect.ValueOf(result).Elem() //newCacheItem := val.Interface() + // release the request count for parallel requests limit + requestDone(requestKey) + // Check if result is nil if result == nil { - fmt.Println("Warning: result is nil, not caching.") + log.Trace().Msg("Fesult is nil, not caching") } else { - clientCache.Store(cacheKey, CacheItem[T]{Response: *result, ExpiresAt: time.Now().Add(cacheDuration)}) - fmt.Println("Cached successfully!") + clientCache.Store(requestKey, CacheItem[T]{Response: *result, ExpiresAt: time.Now().Add(cacheDuration)}) + log.Trace().Msg("Cached successfully!") } } return nil } + +// RequestInfo stores the essential details of an HTTP request. +type RequestInfo struct { + Method string `json:"method"` // HTTP method (GET, POST, etc.), indicating the request's action type. + URL string `json:"url"` // The URL the request is made to. + Header map[string]string `json:"header"` // Key-value pairs of the request headers. + Body interface{} `json:"body,omitempty"` // Optional: request body +} + +// RequestDetails contains detailed information about an HTTP request and its processing status. +type RequestDetails struct { + StartTime time.Time `json:"startTime"` // The time when the request was received by the server. + EndTime time.Time `json:"endTime"` // The time when the request was fully processed. + Status string `json:"status"` // The current status of the request (e.g., "Handling", "Error", "Success"). + RequestInfo RequestInfo `json:"requestInfo"` // Extracted information about the request. + ResponseData interface{} `json:"responseData"` // The data sent back in response to the request. + ErrorResponse string `json:"errorResponse"` // A message describing any error that occurred during request processing. +} + +// RequestMap is a map for request details +var RequestMap = sync.Map{} + +// ExtractRequestInfo extracts necessary information from http.Request +func ExtractRequestInfo(r *http.Request) RequestInfo { + headerInfo := make(map[string]string) + for name, headers := range r.Header { + headerInfo[name] = headers[0] + } + + //var bodyString string + var bodyObject interface{} + if r.Body != nil { // Check if the body is not nil + bodyBytes, err := io.ReadAll(r.Body) + if err == nil { + //bodyString = string(bodyBytes) + json.Unmarshal(bodyBytes, &bodyObject) // Try to unmarshal to a JSON object + + // Important: Write the body back for further processing + r.Body = io.NopCloser(bytes.NewBuffer(bodyBytes)) + } + } + + return RequestInfo{ + Method: r.Method, + URL: r.URL.String(), + Header: headerInfo, + Body: bodyObject, // Use the JSON object if parsing was successful, otherwise it's nil + } +} + +// StartRequestWithLog initializes request tracking details +func StartRequestWithLog(c echo.Context) (string, error) { + reqID := c.Request().Header.Get("x-request-id") + if reqID == "" { + reqID = fmt.Sprintf("%d", time.Now().UnixNano()) + } + if _, ok := RequestMap.Load(reqID); ok { + return reqID, fmt.Errorf("The x-request-id is already in use") + } + + details := RequestDetails{ + StartTime: time.Now(), + Status: "Handling", + RequestInfo: ExtractRequestInfo(c.Request()), + } + RequestMap.Store(reqID, details) + return reqID, nil +} + +// EndRequestWithLog updates the request details and sends the final response. +func EndRequestWithLog(c echo.Context, reqID string, err error, responseData interface{}) error { + if v, ok := RequestMap.Load(reqID); ok { + details := v.(RequestDetails) + details.EndTime = time.Now() + + c.Response().Header().Set("X-Request-ID", reqID) + + if err != nil { + details.Status = "Error" + details.ErrorResponse = err.Error() + RequestMap.Store(reqID, details) + if responseData == nil { + return c.JSON(http.StatusBadRequest, map[string]string{"message": err.Error()}) + } else { + return c.JSON(http.StatusInternalServerError, map[string]string{"message": err.Error()}) + } + } + + details.Status = "Success" + details.ResponseData = responseData + RequestMap.Store(reqID, details) + return c.JSON(http.StatusOK, responseData) + } + + return c.JSON(http.StatusNotFound, map[string]string{"message": "Invalid Request ID"}) +} + +// // ForwardRequestToAny forwards the given request to the specified path +// func ForwardRequestToAny(reqPath string, method string, requestBody interface{}) (interface{}, error) { +// client := resty.New() +// var callResult interface{} + +// url := SpiderRestUrl + "/" + reqPath + +// var requestBodyBytes []byte +// var ok bool +// if requestBodyBytes, ok = requestBody.([]byte); !ok { +// return nil, fmt.Errorf("requestBody is not []byte type") +// } + +// var requestBodyMap map[string]interface{} +// err := json.Unmarshal(requestBodyBytes, &requestBodyMap) +// if err != nil { +// return nil, fmt.Errorf("JSON unmarshal error: %v", err) +// } + +// err = ExecuteHttpRequest( +// client, +// method, +// url, +// nil, +// SetUseBody(requestBodyMap), +// &requestBodyMap, +// &callResult, +// MediumDuration, +// ) + +// if err != nil { +// log.Error().Err(err).Msg("") +// return nil, err +// } + +// return callResult, nil +// } diff --git a/pkg/core/common/common.go b/pkg/core/common/common.go index 6d9a73d..9f298fd 100644 --- a/pkg/core/common/common.go +++ b/pkg/core/common/common.go @@ -38,8 +38,9 @@ var SystemReady bool var CBLog *logrus.Logger var CBStore icbs.Store -var SpiderRestUrl string -var DragonflyRestUrl string +// var SpiderRestUrl string +// var DragonflyRestUrl string +var TumblebugRestUrl string var DBUrl string var DBDatabase string var DBUser string @@ -50,8 +51,9 @@ var err error var ORM *xorm.Engine const ( - StrSpiderRestUrl string = "SPIDER_REST_URL" - StrDragonflyRestUrl string = "DRAGONFLY_REST_URL" + // StrSpiderRestUrl string = "SPIDER_REST_URL" + // StrDragonflyRestUrl string = "DRAGONFLY_REST_URL" + StrTumblebugRestUrl string = "TUMBLEBUG_REST_URL" StrDBUrl string = "DB_URL" StrDBDatabase string = "DB_DATABASE" StrDBUser string = "DB_USER" diff --git a/pkg/core/common/config.go b/pkg/core/common/config.go index d999004..77800d8 100644 --- a/pkg/core/common/config.go +++ b/pkg/core/common/config.go @@ -136,12 +136,15 @@ func UpdateGlobalVariable(id string) error { } switch id { - case StrSpiderRestUrl: - SpiderRestUrl = configInfo.Value - fmt.Println(" " + SpiderRestUrl) - case StrDragonflyRestUrl: - DragonflyRestUrl = configInfo.Value - fmt.Println(" " + DragonflyRestUrl) + // case StrSpiderRestUrl: + // SpiderRestUrl = configInfo.Value + // fmt.Println(" " + SpiderRestUrl) + // case StrDragonflyRestUrl: + // DragonflyRestUrl = configInfo.Value + // fmt.Println(" " + DragonflyRestUrl) + case StrTumblebugRestUrl: + TumblebugRestUrl = configInfo.Value + fmt.Println(" " + TumblebugRestUrl) case StrDBUrl: DBUrl = configInfo.Value fmt.Println(" " + DBUrl) @@ -167,12 +170,15 @@ func UpdateGlobalVariable(id string) error { func InitConfig(id string) error { switch id { - case StrSpiderRestUrl: - SpiderRestUrl = NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider") - fmt.Println(" " + SpiderRestUrl) - case StrDragonflyRestUrl: - DragonflyRestUrl = NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly") - fmt.Println(" " + DragonflyRestUrl) + // case StrSpiderRestUrl: + // SpiderRestUrl = NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider") + // fmt.Println(" " + SpiderRestUrl) + // case StrDragonflyRestUrl: + // DragonflyRestUrl = NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly") + // fmt.Println(" " + DragonflyRestUrl) + case StrTumblebugRestUrl: + TumblebugRestUrl = NVL(os.Getenv("TUMBLEBUG_REST_URL"), "http://localhost:1323/tumblebug") + fmt.Println(" " + TumblebugRestUrl) case StrDBUrl: DBUrl = NVL(os.Getenv("DB_URL"), "localhost:3306") fmt.Println(" " + DBUrl) diff --git a/pkg/core/common/namespace.go b/pkg/core/common/namespace.go index 6494c40..87a01f4 100644 --- a/pkg/core/common/namespace.go +++ b/pkg/core/common/namespace.go @@ -15,17 +15,13 @@ limitations under the License. package common import ( - "encoding/json" "fmt" - "net/http" - "strconv" - "strings" + "os" + "github.com/go-resty/resty/v2" + "github.com/rs/zerolog/log" //"github.com/cloud-barista/cm-beetle/src/core/mcir" //"github.com/cloud-barista/cm-beetle/src/core/mcis" - "github.com/labstack/echo/v4" - - cbstore_utils "github.com/cloud-barista/cb-store/utils" ) type NsReq struct { @@ -40,382 +36,624 @@ type NsInfo struct { Description string `json:"description" example:"Description for this namespace"` } -func NsValidation() echo.MiddlewareFunc { - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - fmt.Printf("%v\n", "[Handle API Request]") - nsId := c.Param("nsId") - if nsId == "" { - return next(c) - } - - err := CheckString(nsId) - if err != nil { - return echo.NewHTTPError(http.StatusNotFound, "The first character of name must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.") - } - - check, err := CheckNs(nsId) - - if !check || err != nil { - return echo.NewHTTPError(http.StatusNotFound, "Not valid namespace") - } - return next(c) - } - } +// Response structure for RestGetAllNs +type RestGetAllNsResponse struct { + //Name string `json:"name"` + Ns []NsInfo `json:"ns"` } -func CreateNs(u *NsReq) (NsInfo, error) { - err := CheckString(u.Name) - if err != nil { - temp := NsInfo{} - CBLog.Error(err) - return temp, err - } - - check, err := CheckNs(u.Name) - - if check { - temp := NsInfo{} - err := fmt.Errorf("CreateNs(); The namespace " + u.Name + " already exists.") - return temp, err - } - - if err != nil { - temp := NsInfo{} - CBLog.Error(err) - return temp, err - } - - content := NsInfo{} - //content.Id = GenUid() - content.Id = u.Name - content.Name = u.Name - content.Description = u.Description - - // TODO here: implement the logic - - fmt.Println("CreateNs();") - Key := "/ns/" + content.Id - //mapA := map[string]string{"name": content.Name, "description": content.Description} - Val, _ := json.Marshal(content) - err = CBStore.Put(Key, string(Val)) - if err != nil { - CBLog.Error(err) - return content, err - } - keyValue, _ := CBStore.Get(Key) - fmt.Println("CreateNs(); ===========================") - fmt.Println("CreateNs(); Key: " + keyValue.Key + "\nValue: " + keyValue.Value) - fmt.Println("CreateNs(); ===========================") - return content, nil -} - -// UpdateNs is func to update namespace info -func UpdateNs(id string, u *NsReq) (NsInfo, error) { - - res := NsInfo{} - emptyInfo := NsInfo{} - - err := CheckString(id) - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } - check, err := CheckNs(id) - - if !check { - errString := "The namespace " + id + " does not exist." - err := fmt.Errorf(errString) - return emptyInfo, err - } - - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } +func CreateNamespace(nsInfo NsReq) (NsInfo, error) { + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/readyz", epTumblebug) + reqReadyz := NoBody + resReadyz := new(SimpleMsg) + + err := ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqReadyz), + &reqReadyz, + resReadyz, + VeryShortDuration, + ) - key := "/ns/" + id - keyValue, err := CBStore.Get(key) if err != nil { - CBLog.Error(err) - return emptyInfo, err - } + log.Err(err).Msg("") + return NsInfo{}, err + } + log.Debug().Msgf("resReadyz: %+v", resReadyz.Message) + + // check readyz + method = "POST" + url = fmt.Sprintf("%s/ns", epTumblebug) + reqNs := nsInfo + resNs := new(NsInfo) + + err = ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqNs), + &reqNs, + resNs, + VeryShortDuration, + ) - err = json.Unmarshal([]byte(keyValue.Value), &res) if err != nil { - CBLog.Error(err) - return emptyInfo, err + log.Err(err).Msg("") + return NsInfo{}, err } + log.Debug().Msgf("resNs: %+v", resNs) - res.Id = id - res.Name = u.Name - res.Description = u.Description - - Key := "/ns/" + id - //mapA := map[string]string{"name": content.Name, "description": content.Description} - Val, err := json.Marshal(res) - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } - err = CBStore.Put(Key, string(Val)) - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } - keyValue, err = CBStore.Get(Key) - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } - err = json.Unmarshal([]byte(keyValue.Value), &res) - if err != nil { - CBLog.Error(err) - return emptyInfo, err - } - return res, nil + return *resNs, nil } -func GetNs(id string) (NsInfo, error) { - - res := NsInfo{} +func GetAllNamespaces() (RestGetAllNsResponse, error) { + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/readyz", epTumblebug) + reqReadyz := NoBody + resReadyz := new(SimpleMsg) + + err := ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqReadyz), + &reqReadyz, + resReadyz, + VeryShortDuration, + ) - err := CheckString(id) if err != nil { - temp := NsInfo{} - CBLog.Error(err) - return temp, err - } - check, err := CheckNs(id) - - if !check { - errString := "The namespace " + id + " does not exist." - //mapA := map[string]string{"message": errString} - //mapB, _ := json.Marshal(mapA) - err := fmt.Errorf(errString) - return res, err - } + log.Err(err).Msg("") + return RestGetAllNsResponse{}, err + } + log.Debug().Msgf("resReadyz: %+v", resReadyz.Message) + + // check readyz + method = "GET" + url = fmt.Sprintf("%s/ns", epTumblebug) + reqNs := NoBody + resAllNs := new(RestGetAllNsResponse) + + err = ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqNs), + &reqNs, + resAllNs, + VeryShortDuration, + ) if err != nil { - temp := NsInfo{} - CBLog.Error(err) - return temp, err + log.Err(err).Msg("") + return RestGetAllNsResponse{}, err } + log.Debug().Msgf("resAllNs: %+v", resAllNs) - fmt.Println("[Get namespace] " + id) - key := "/ns/" + id - fmt.Println(key) - - keyValue, err := CBStore.Get(key) - if err != nil { - CBLog.Error(err) - return res, err - } - - fmt.Println("<" + keyValue.Key + "> \n" + keyValue.Value) - fmt.Println("===============================================") - - err = json.Unmarshal([]byte(keyValue.Value), &res) - if err != nil { - CBLog.Error(err) - return res, err - } - return res, nil + return *resAllNs, nil } -func ListNs() ([]NsInfo, error) { - fmt.Println("[List namespace]") - key := "/ns" - fmt.Println(key) - - keyValue, err := CBStore.GetList(key, true) - keyValue = cbstore_utils.GetChildList(keyValue, key) +func GetNamespace(nsId string) (NsInfo, error) { + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/readyz", epTumblebug) + reqReadyz := NoBody + resReadyz := new(SimpleMsg) + + err := ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqReadyz), + &reqReadyz, + resReadyz, + VeryShortDuration, + ) if err != nil { - CBLog.Error(err) - return nil, err - } - if keyValue != nil { - res := []NsInfo{} - for _, v := range keyValue { - tempObj := NsInfo{} - err = json.Unmarshal([]byte(v.Value), &tempObj) - if err != nil { - CBLog.Error(err) - return nil, err - } - res = append(res, tempObj) - } - return res, nil - //return true, nil - } - return nil, nil // When err == nil && keyValue == nil -} - -func AppendIfMissing(slice []string, i string) []string { - for _, ele := range slice { - if ele == i { - return slice - } - } - return append(slice, i) -} - -func ListNsId() ([]string, error) { - - key := "/ns" - - var nsList []string - - // Implementation Option 1 - // keyValue, _ := CBStore.GetList(key, true) - - // r, _ := regexp.Compile("/ns/[a-z]([-a-z0-9]*[a-z0-9])?$") - - // for _, v := range keyValue { - - // if v.Key == "" { - // continue - // } - - // filtered := r.FindString(v.Key) - - // if filtered != v.Key { - // continue - // } else { - // trimmedString := strings.TrimPrefix(v.Key, "/ns/") - // nsList = AppendIfMissing(nsList, trimmedString) - // } - // } - // EOF of Implementation Option 1 - - // Implementation Option 2 - keyValue, err := CBStore.GetList(key, true) - keyValue = cbstore_utils.GetChildList(keyValue, key) + log.Err(err).Msg("") + return NsInfo{}, err + } + log.Debug().Msgf("resReadyz: %+v", resReadyz.Message) + + // check readyz + method = "GET" + url = fmt.Sprintf("%s/ns/%s", epTumblebug, nsId) + reqNs := NoBody + resNsInfo := new(NsInfo) + + err = ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqNs), + &reqNs, + resNsInfo, + VeryShortDuration, + ) if err != nil { - CBLog.Error(err) - return nil, err - } - if keyValue != nil { - for _, v := range keyValue { - trimmedString := strings.TrimPrefix(v.Key, "/ns/") - nsList = append(nsList, trimmedString) - } + log.Err(err).Msg("") + return NsInfo{}, err } - // EOF of Implementation Option 2 - - return nsList, nil + log.Debug().Msgf("resNsInfo: %+v", resNsInfo) + return *resNsInfo, nil } -func DelNs(id string) error { - - err := CheckString(id) - if err != nil { - CBLog.Error(err) - return err - } - - check, err := CheckNs(id) - - if !check { - errString := "The namespace " + id + " does not exist." - err := fmt.Errorf(errString) - return err - } +func DeleteNamespace(nsId string) (SimpleMsg, error) { + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/readyz", epTumblebug) + reqReadyz := NoBody + resReadyz := new(SimpleMsg) + + err := ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqReadyz), + &reqReadyz, + resReadyz, + VeryShortDuration, + ) if err != nil { - CBLog.Error(err) - return err - } + log.Err(err).Msg("") + return SimpleMsg{}, err + } + log.Debug().Msgf("resReadyz: %+v", resReadyz.Message) + + // check readyz + method = "DELETE" + url = fmt.Sprintf("%s/ns/%s", epTumblebug, nsId) + reqNs := NoBody + resMsg := new(SimpleMsg) + + err = ExecuteHttpRequest( + client, + method, + url, + nil, + SetUseBody(reqNs), + &reqNs, + resMsg, + VeryShortDuration, + ) - fmt.Println("[Delete ns] " + id) - key := "/ns/" + id - fmt.Println(key) - - mcisList := GetChildIdList(key + "/mcis") - imageList := GetChildIdList(key + "/resources/image") - vNetList := GetChildIdList(key + "/resources/vNet") - //subnetList := GetChildIdList(key + "/resources/subnet") - //publicIpList := GetChildIdList(key + "/resources/publicIp") - securityGroupList := GetChildIdList(key + "/resources/securityGroup") - specList := GetChildIdList(key + "/resources/spec") - sshKeyList := GetChildIdList(key + "/resources/sshKey") - //vNicList := GetChildIdList(key + "/resources/vNic") - - if len(mcisList)+ - len(imageList)+ - len(vNetList)+ - //len(subnetList) - len(securityGroupList)+ - len(specList)+ - len(sshKeyList) > 0 { - errString := "Cannot delete NS " + id + ", which is not empty. There exists at least one MCIS or one of resources." - errString += " \n len(mcisList): " + strconv.Itoa(len(mcisList)) - errString += " \n len(imageList): " + strconv.Itoa(len(imageList)) - errString += " \n len(vNetList): " + strconv.Itoa(len(vNetList)) - //errString += " \n len(publicIpList): " + strconv.Itoa(len(publicIpList)) - errString += " \n len(securityGroupList): " + strconv.Itoa(len(securityGroupList)) - errString += " \n len(specList): " + strconv.Itoa(len(specList)) - errString += " \n len(sshKeyList): " + strconv.Itoa(len(sshKeyList)) - //errString += " \n len(subnetList): " + strconv.Itoa(len(subnetList)) - //errString += " \n len(vNicList): " + strconv.Itoa(len(vNicList)) - - err := fmt.Errorf(errString) - CBLog.Error(err) - return err - } - - // delete ns info - err = CBStore.Delete(key) if err != nil { - CBLog.Error(err) - return err + log.Err(err).Msg("") + return SimpleMsg{}, err } + log.Debug().Msgf("resMsg: %+v", resMsg) - return nil + return *resMsg, nil } -func DelAllNs() error { - fmt.Printf("DelAllNs() called;") - - nsIdList, err := ListNsId() - if err != nil { - return err - } - - if len(nsIdList) == 0 { - return nil - } - - for _, v := range nsIdList { - err := DelNs(v) - if err != nil { - return err - } - } - return nil -} - -func CheckNs(id string) (bool, error) { - - if id == "" { - err := fmt.Errorf("CheckNs failed; nsId given is null.") - return false, err - } - - err := CheckString(id) - if err != nil { - CBLog.Error(err) - return false, err - } - - key := "/ns/" + id - - keyValue, _ := CBStore.Get(key) - if keyValue != nil { - return true, nil - } - return false, nil -} +// func NsValidation() echo.MiddlewareFunc { +// return func(next echo.HandlerFunc) echo.HandlerFunc { +// return func(c echo.Context) error { +// fmt.Printf("%v\n", "[Handle API Request]") +// nsId := c.Param("nsId") +// if nsId == "" { +// return next(c) +// } + +// err := CheckString(nsId) +// if err != nil { +// return echo.NewHTTPError(http.StatusNotFound, "The first character of name must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.") +// } + +// check, err := CheckNs(nsId) + +// if !check || err != nil { +// return echo.NewHTTPError(http.StatusNotFound, "Not valid namespace") +// } +// return next(c) +// } +// } +// } + +// func CreateNs(u *NsReq) (NsInfo, error) { +// err := CheckString(u.Name) +// if err != nil { +// temp := NsInfo{} +// CBLog.Error(err) +// return temp, err +// } + +// check, err := CheckNs(u.Name) + +// if check { +// temp := NsInfo{} +// err := fmt.Errorf("CreateNs(); The namespace " + u.Name + " already exists.") +// return temp, err +// } + +// if err != nil { +// temp := NsInfo{} +// CBLog.Error(err) +// return temp, err +// } + +// content := NsInfo{} +// //content.Id = GenUid() +// content.Id = u.Name +// content.Name = u.Name +// content.Description = u.Description + +// // TODO here: implement the logic + +// fmt.Println("CreateNs();") +// Key := "/ns/" + content.Id +// //mapA := map[string]string{"name": content.Name, "description": content.Description} +// Val, _ := json.Marshal(content) +// err = CBStore.Put(Key, string(Val)) +// if err != nil { +// CBLog.Error(err) +// return content, err +// } +// keyValue, _ := CBStore.Get(Key) +// fmt.Println("CreateNs(); ===========================") +// fmt.Println("CreateNs(); Key: " + keyValue.Key + "\nValue: " + keyValue.Value) +// fmt.Println("CreateNs(); ===========================") +// return content, nil +// } + +// // UpdateNs is func to update namespace info +// func UpdateNs(id string, u *NsReq) (NsInfo, error) { + +// res := NsInfo{} +// emptyInfo := NsInfo{} + +// err := CheckString(id) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } +// check, err := CheckNs(id) + +// if !check { +// errString := "The namespace " + id + " does not exist." +// err := fmt.Errorf(errString) +// return emptyInfo, err +// } + +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } + +// key := "/ns/" + id +// keyValue, err := CBStore.Get(key) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } + +// err = json.Unmarshal([]byte(keyValue.Value), &res) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } + +// res.Id = id +// res.Name = u.Name +// res.Description = u.Description + +// Key := "/ns/" + id +// //mapA := map[string]string{"name": content.Name, "description": content.Description} +// Val, err := json.Marshal(res) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } +// err = CBStore.Put(Key, string(Val)) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } +// keyValue, err = CBStore.Get(Key) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } +// err = json.Unmarshal([]byte(keyValue.Value), &res) +// if err != nil { +// CBLog.Error(err) +// return emptyInfo, err +// } +// return res, nil +// } + +// func GetNs(id string) (NsInfo, error) { + +// res := NsInfo{} + +// err := CheckString(id) +// if err != nil { +// temp := NsInfo{} +// CBLog.Error(err) +// return temp, err +// } +// check, err := CheckNs(id) + +// if !check { +// errString := "The namespace " + id + " does not exist." +// //mapA := map[string]string{"message": errString} +// //mapB, _ := json.Marshal(mapA) +// err := fmt.Errorf(errString) +// return res, err +// } + +// if err != nil { +// temp := NsInfo{} +// CBLog.Error(err) +// return temp, err +// } + +// fmt.Println("[Get namespace] " + id) +// key := "/ns/" + id +// fmt.Println(key) + +// keyValue, err := CBStore.Get(key) +// if err != nil { +// CBLog.Error(err) +// return res, err +// } + +// fmt.Println("<" + keyValue.Key + "> \n" + keyValue.Value) +// fmt.Println("===============================================") + +// err = json.Unmarshal([]byte(keyValue.Value), &res) +// if err != nil { +// CBLog.Error(err) +// return res, err +// } +// return res, nil +// } + +// func ListNs() ([]NsInfo, error) { +// fmt.Println("[List namespace]") +// key := "/ns" +// fmt.Println(key) + +// keyValue, err := CBStore.GetList(key, true) +// keyValue = cbstore_utils.GetChildList(keyValue, key) + +// if err != nil { +// CBLog.Error(err) +// return nil, err +// } +// if keyValue != nil { +// res := []NsInfo{} +// for _, v := range keyValue { +// tempObj := NsInfo{} +// err = json.Unmarshal([]byte(v.Value), &tempObj) +// if err != nil { +// CBLog.Error(err) +// return nil, err +// } +// res = append(res, tempObj) +// } +// return res, nil +// //return true, nil +// } +// return nil, nil // When err == nil && keyValue == nil +// } + +// func AppendIfMissing(slice []string, i string) []string { +// for _, ele := range slice { +// if ele == i { +// return slice +// } +// } +// return append(slice, i) +// } + +// func ListNsId() ([]string, error) { + +// key := "/ns" + +// var nsList []string + +// // Implementation Option 1 +// // keyValue, _ := CBStore.GetList(key, true) + +// // r, _ := regexp.Compile("/ns/[a-z]([-a-z0-9]*[a-z0-9])?$") + +// // for _, v := range keyValue { + +// // if v.Key == "" { +// // continue +// // } + +// // filtered := r.FindString(v.Key) + +// // if filtered != v.Key { +// // continue +// // } else { +// // trimmedString := strings.TrimPrefix(v.Key, "/ns/") +// // nsList = AppendIfMissing(nsList, trimmedString) +// // } +// // } +// // EOF of Implementation Option 1 + +// // Implementation Option 2 +// keyValue, err := CBStore.GetList(key, true) +// keyValue = cbstore_utils.GetChildList(keyValue, key) + +// if err != nil { +// CBLog.Error(err) +// return nil, err +// } +// if keyValue != nil { +// for _, v := range keyValue { +// trimmedString := strings.TrimPrefix(v.Key, "/ns/") +// nsList = append(nsList, trimmedString) +// } +// } +// // EOF of Implementation Option 2 + +// return nsList, nil + +// } + +// func DelNs(id string) error { + +// err := CheckString(id) +// if err != nil { +// CBLog.Error(err) +// return err +// } + +// check, err := CheckNs(id) + +// if !check { +// errString := "The namespace " + id + " does not exist." +// err := fmt.Errorf(errString) +// return err +// } + +// if err != nil { +// CBLog.Error(err) +// return err +// } + +// fmt.Println("[Delete ns] " + id) +// key := "/ns/" + id +// fmt.Println(key) + +// mcisList := GetChildIdList(key + "/mcis") +// imageList := GetChildIdList(key + "/resources/image") +// vNetList := GetChildIdList(key + "/resources/vNet") +// //subnetList := GetChildIdList(key + "/resources/subnet") +// //publicIpList := GetChildIdList(key + "/resources/publicIp") +// securityGroupList := GetChildIdList(key + "/resources/securityGroup") +// specList := GetChildIdList(key + "/resources/spec") +// sshKeyList := GetChildIdList(key + "/resources/sshKey") +// //vNicList := GetChildIdList(key + "/resources/vNic") + +// if len(mcisList)+ +// len(imageList)+ +// len(vNetList)+ +// //len(subnetList) +// len(securityGroupList)+ +// len(specList)+ +// len(sshKeyList) > 0 { +// errString := "Cannot delete NS " + id + ", which is not empty. There exists at least one MCIS or one of resources." +// errString += " \n len(mcisList): " + strconv.Itoa(len(mcisList)) +// errString += " \n len(imageList): " + strconv.Itoa(len(imageList)) +// errString += " \n len(vNetList): " + strconv.Itoa(len(vNetList)) +// //errString += " \n len(publicIpList): " + strconv.Itoa(len(publicIpList)) +// errString += " \n len(securityGroupList): " + strconv.Itoa(len(securityGroupList)) +// errString += " \n len(specList): " + strconv.Itoa(len(specList)) +// errString += " \n len(sshKeyList): " + strconv.Itoa(len(sshKeyList)) +// //errString += " \n len(subnetList): " + strconv.Itoa(len(subnetList)) +// //errString += " \n len(vNicList): " + strconv.Itoa(len(vNicList)) + +// err := fmt.Errorf(errString) +// CBLog.Error(err) +// return err +// } + +// // delete ns info +// err = CBStore.Delete(key) +// if err != nil { +// CBLog.Error(err) +// return err +// } + +// return nil +// } + +// func DelAllNs() error { +// fmt.Printf("DelAllNs() called;") + +// nsIdList, err := ListNsId() +// if err != nil { +// return err +// } + +// if len(nsIdList) == 0 { +// return nil +// } + +// for _, v := range nsIdList { +// err := DelNs(v) +// if err != nil { +// return err +// } +// } +// return nil +// } + +// func CheckNs(id string) (bool, error) { + +// if id == "" { +// err := fmt.Errorf("CheckNs failed; nsId given is null.") +// return false, err +// } + +// err := CheckString(id) +// if err != nil { +// CBLog.Error(err) +// return false, err +// } + +// key := "/ns/" + id + +// keyValue, _ := CBStore.Get(key) +// if keyValue != nil { +// return true, nil +// } +// return false, nil +// } diff --git a/pkg/core/common/utility.go b/pkg/core/common/utility.go index dc36248..0b00272 100644 --- a/pkg/core/common/utility.go +++ b/pkg/core/common/utility.go @@ -20,7 +20,6 @@ import ( "os" "regexp" "runtime" - "strconv" "strings" "time" @@ -32,8 +31,6 @@ import ( "encoding/csv" "encoding/json" "fmt" - - "github.com/go-resty/resty/v2" ) // MCIS utilities @@ -405,219 +402,219 @@ func GetCloudLocation(cloudType string, nativeRegion string) GeoLocation { return location } -// GetConnConfig is func to get connection config from CB-Spider -func GetConnConfig(ConnConfigName string) (ConnConfig, error) { - - url := SpiderRestUrl + "/connectionconfig/" + ConnConfigName - - client := resty.New().SetCloseConnection(true) - - resp, err := client.R(). - SetResult(&ConnConfig{}). - //SetError(&SimpleMsg{}). - Get(url) - - if err != nil { - CBLog.Error(err) - content := ConnConfig{} - err := fmt.Errorf("an error occurred while requesting to CB-Spider") - return content, err - } - - switch { - case resp.StatusCode() >= 400 || resp.StatusCode() < 200: - fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) - err := fmt.Errorf(string(resp.Body())) - CBLog.Error(err) - content := ConnConfig{} - return content, err - } - - temp, _ := resp.Result().(*ConnConfig) - - // Get geolocation - nativeRegion, err := GetNativeRegion(temp.ConfigName) - if err != nil { - CBLog.Error(err) - content := ConnConfig{} - return content, err - } - - location := GetCloudLocation(strings.ToLower(temp.ProviderName), strings.ToLower(nativeRegion)) - temp.Location = location - - return *temp, nil - -} - -// ConnConfigList is struct for containing a CB-Spider struct for connection config list -type ConnConfigList struct { // Spider - Connectionconfig []ConnConfig `json:"connectionconfig"` -} - -// GetConnConfigList is func to list connection configs from CB-Spider -func GetConnConfigList() (ConnConfigList, error) { - - var callResult ConnConfigList - client := resty.New() - url := SpiderRestUrl + "/connectionconfig" - method := "GET" - requestBody := NoBody - - err := ExecuteHttpRequest( - client, - method, - url, - nil, - SetUseBody(requestBody), - &requestBody, - &callResult, - MediumDuration, - ) - - if err != nil { - CBLog.Error(err) - content := ConnConfigList{} - return content, err - } - - // Get geolocations - for i, connConfig := range callResult.Connectionconfig { - nativeRegion, err := GetNativeRegion(connConfig.ConfigName) - if err != nil { - CBLog.Error(err) - content := ConnConfigList{} - return content, err - } - - location := GetCloudLocation(strings.ToLower(connConfig.ProviderName), strings.ToLower(nativeRegion)) - callResult.Connectionconfig[i].Location = location - } - - return callResult, nil - -} - -// Region is struct for containing region struct of CB-Spider -type Region struct { - RegionName string // ex) "region01" - ProviderName string // ex) "GCP" - KeyValueInfoList []KeyValue // ex) { {region, us-east1}, {zone, us-east1-c} } -} - -// GetRegion is func to get region from CB-Spider -func GetRegion(RegionName string) (Region, error) { - - url := SpiderRestUrl + "/region/" + RegionName - - client := resty.New().SetCloseConnection(true) - - resp, err := client.R(). - SetResult(&Region{}). - //SetError(&SimpleMsg{}). - Get(url) - - if err != nil { - CBLog.Error(err) - content := Region{} - err := fmt.Errorf("an error occurred while requesting to CB-Spider") - return content, err - } - - switch { - case resp.StatusCode() >= 400 || resp.StatusCode() < 200: - fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) - err := fmt.Errorf(string(resp.Body())) - CBLog.Error(err) - content := Region{} - return content, err - } - - temp, _ := resp.Result().(*Region) - return *temp, nil - -} - -// GetRegion is func to get NativRegion from file -func GetNativeRegion(connectionName string) (string, error) { - // Read default resources from file and create objects - // HEADER: ProviderName, CONN_CONFIG, RegionName, NativeRegionName, RegionLocation, DriverLibFileName, DriverName - file, fileErr := os.Open("../assets/cloudconnection.csv") - defer file.Close() - if fileErr != nil { - CBLog.Error(fileErr) - return "", fileErr - } - - rdr := csv.NewReader(bufio.NewReader(file)) - rows, err := rdr.ReadAll() - if err != nil { - CBLog.Error(err) - return "", err - } - - nativeRegionName := "" - - for _, row := range rows[1:] { - if connectionName != "" { - // find only given connectionName (if not skip) - if connectionName != row[1] { - continue - } - //fmt.Println("Found a line for the connectionName from file: " + row[1]) - } - - if connectionName != "" { - // After finish handling line for the connectionName, break - if connectionName == row[1] { - nativeRegionName = row[3] - //fmt.Println("Handled for the connectionName from file: " + row[1]) - break - } - } - - } - return nativeRegionName, nil - -} - -// RegionList is array struct for Region -type RegionList struct { - Region []Region `json:"region"` -} - -// GetRegionList is func to retrieve region list -func GetRegionList() (RegionList, error) { - - url := SpiderRestUrl + "/region" - - client := resty.New().SetCloseConnection(true) - - resp, err := client.R(). - SetResult(&RegionList{}). - //SetError(&SimpleMsg{}). - Get(url) - - if err != nil { - CBLog.Error(err) - content := RegionList{} - err := fmt.Errorf("an error occurred while requesting to CB-Spider") - return content, err - } - - switch { - case resp.StatusCode() >= 400 || resp.StatusCode() < 200: - fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) - err := fmt.Errorf(string(resp.Body())) - CBLog.Error(err) - content := RegionList{} - return content, err - } - - temp, _ := resp.Result().(*RegionList) - return *temp, nil - -} +// // GetConnConfig is func to get connection config from CB-Spider +// func GetConnConfig(ConnConfigName string) (ConnConfig, error) { + +// url := SpiderRestUrl + "/connectionconfig/" + ConnConfigName + +// client := resty.New().SetCloseConnection(true) + +// resp, err := client.R(). +// SetResult(&ConnConfig{}). +// //SetError(&SimpleMsg{}). +// Get(url) + +// if err != nil { +// CBLog.Error(err) +// content := ConnConfig{} +// err := fmt.Errorf("an error occurred while requesting to CB-Spider") +// return content, err +// } + +// switch { +// case resp.StatusCode() >= 400 || resp.StatusCode() < 200: +// fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) +// err := fmt.Errorf(string(resp.Body())) +// CBLog.Error(err) +// content := ConnConfig{} +// return content, err +// } + +// temp, _ := resp.Result().(*ConnConfig) + +// // Get geolocation +// nativeRegion, err := GetNativeRegion(temp.ConfigName) +// if err != nil { +// CBLog.Error(err) +// content := ConnConfig{} +// return content, err +// } + +// location := GetCloudLocation(strings.ToLower(temp.ProviderName), strings.ToLower(nativeRegion)) +// temp.Location = location + +// return *temp, nil + +// } + +// // ConnConfigList is struct for containing a CB-Spider struct for connection config list +// type ConnConfigList struct { // Spider +// Connectionconfig []ConnConfig `json:"connectionconfig"` +// } + +// // GetConnConfigList is func to list connection configs from CB-Spider +// func GetConnConfigList() (ConnConfigList, error) { + +// var callResult ConnConfigList +// client := resty.New() +// url := SpiderRestUrl + "/connectionconfig" +// method := "GET" +// requestBody := NoBody + +// err := ExecuteHttpRequest( +// client, +// method, +// url, +// nil, +// SetUseBody(requestBody), +// &requestBody, +// &callResult, +// MediumDuration, +// ) + +// if err != nil { +// CBLog.Error(err) +// content := ConnConfigList{} +// return content, err +// } + +// // Get geolocations +// for i, connConfig := range callResult.Connectionconfig { +// nativeRegion, err := GetNativeRegion(connConfig.ConfigName) +// if err != nil { +// CBLog.Error(err) +// content := ConnConfigList{} +// return content, err +// } + +// location := GetCloudLocation(strings.ToLower(connConfig.ProviderName), strings.ToLower(nativeRegion)) +// callResult.Connectionconfig[i].Location = location +// } + +// return callResult, nil + +// } + +// // Region is struct for containing region struct of CB-Spider +// type Region struct { +// RegionName string // ex) "region01" +// ProviderName string // ex) "GCP" +// KeyValueInfoList []KeyValue // ex) { {region, us-east1}, {zone, us-east1-c} } +// } + +// // GetRegion is func to get region from CB-Spider +// func GetRegion(RegionName string) (Region, error) { + +// url := SpiderRestUrl + "/region/" + RegionName + +// client := resty.New().SetCloseConnection(true) + +// resp, err := client.R(). +// SetResult(&Region{}). +// //SetError(&SimpleMsg{}). +// Get(url) + +// if err != nil { +// CBLog.Error(err) +// content := Region{} +// err := fmt.Errorf("an error occurred while requesting to CB-Spider") +// return content, err +// } + +// switch { +// case resp.StatusCode() >= 400 || resp.StatusCode() < 200: +// fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) +// err := fmt.Errorf(string(resp.Body())) +// CBLog.Error(err) +// content := Region{} +// return content, err +// } + +// temp, _ := resp.Result().(*Region) +// return *temp, nil + +// } + +// // GetRegion is func to get NativRegion from file +// func GetNativeRegion(connectionName string) (string, error) { +// // Read default resources from file and create objects +// // HEADER: ProviderName, CONN_CONFIG, RegionName, NativeRegionName, RegionLocation, DriverLibFileName, DriverName +// file, fileErr := os.Open("../assets/cloudconnection.csv") +// defer file.Close() +// if fileErr != nil { +// CBLog.Error(fileErr) +// return "", fileErr +// } + +// rdr := csv.NewReader(bufio.NewReader(file)) +// rows, err := rdr.ReadAll() +// if err != nil { +// CBLog.Error(err) +// return "", err +// } + +// nativeRegionName := "" + +// for _, row := range rows[1:] { +// if connectionName != "" { +// // find only given connectionName (if not skip) +// if connectionName != row[1] { +// continue +// } +// //fmt.Println("Found a line for the connectionName from file: " + row[1]) +// } + +// if connectionName != "" { +// // After finish handling line for the connectionName, break +// if connectionName == row[1] { +// nativeRegionName = row[3] +// //fmt.Println("Handled for the connectionName from file: " + row[1]) +// break +// } +// } + +// } +// return nativeRegionName, nil + +// } + +// // RegionList is array struct for Region +// type RegionList struct { +// Region []Region `json:"region"` +// } + +// // GetRegionList is func to retrieve region list +// func GetRegionList() (RegionList, error) { + +// url := SpiderRestUrl + "/region" + +// client := resty.New().SetCloseConnection(true) + +// resp, err := client.R(). +// SetResult(&RegionList{}). +// //SetError(&SimpleMsg{}). +// Get(url) + +// if err != nil { +// CBLog.Error(err) +// content := RegionList{} +// err := fmt.Errorf("an error occurred while requesting to CB-Spider") +// return content, err +// } + +// switch { +// case resp.StatusCode() >= 400 || resp.StatusCode() < 200: +// fmt.Println(" - HTTP Status: " + strconv.Itoa(resp.StatusCode()) + " in " + GetFuncName()) +// err := fmt.Errorf(string(resp.Body())) +// CBLog.Error(err) +// content := RegionList{} +// return content, err +// } + +// temp, _ := resp.Result().(*RegionList) +// return *temp, nil + +// } // ConvertToMessage is func to change input data to gRPC message func ConvertToMessage(inType string, inData string, obj interface{}) error { diff --git a/pkg/core/migration/migration.go b/pkg/core/migration/migration.go index 02e57f8..5de1758 100644 --- a/pkg/core/migration/migration.go +++ b/pkg/core/migration/migration.go @@ -14,6 +14,17 @@ limitations under the License. // Package migration is to privision targat multi-cloud infra for migration package migration +import ( + "fmt" + "os" + "time" + + cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" + "github.com/cloud-barista/cm-beetle/pkg/core/common" + "github.com/go-resty/resty/v2" + "github.com/rs/zerolog/log" +) + //"log" //csv file handling @@ -84,6 +95,132 @@ const ( // DefaultSystemLabel is const for string to specify the Default System Label const DefaultSystemLabel string = "Managed by CM-Beetle" +func CreateVMInfra(nsId string, infraModel *cloudmodel.InfraMigrationReq) (cloudmodel.TbMcisInfo, error) { + + client := resty.New() + client.SetBasicAuth("default", "default") + method := "POST" + + // CB-Tumblebug API endpoint + cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug" + url := cbTumblebugApiEndpoint + fmt.Sprintf("/ns/%s/mcisDynamic", nsId) + // url := fmt.Sprintf("%s/ns/{nsId}/mcisDynamic%s", cbTumblebugApiEndpoint, idDetails.IdInSp) + + // Set request body + requestBody := *infraModel + + // Set response body + responseBody := cloudmodel.TbMcisInfo{} + + client.SetTimeout(5 * time.Minute) + + err := common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(requestBody), + &requestBody, + &responseBody, + common.MediumDuration, + ) + + if err != nil { + // common.CBLog.Error(err) + return cloudmodel.TbMcisInfo{}, err + } + + return responseBody, nil +} + +func GetVMInfra(nsId, infraId string) (cloudmodel.TbMcisInfo, error) { + + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := common.TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/ns/%s/mcis/%s", epTumblebug, nsId, infraId) + + // Set request body + requestBody := common.NoBody + + // Set response body + responseBody := new(cloudmodel.TbMcisInfo) + + client.SetTimeout(5 * time.Minute) + + err := common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(requestBody), + &requestBody, + responseBody, + common.MediumDuration, + ) + + if err != nil { + log.Error().Err(err).Msgf("failed to get the infrastructure info (nsId: %s, infraId: %s)", nsId, infraId) + return cloudmodel.TbMcisInfo{}, err + } + + return *responseBody, nil +} + +func DeleteVMInfra(nsId, infraId string) (common.SimpleMsg, error) { + + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) + + // set endpoint + epTumblebug := common.TumblebugRestUrl + + // check readyz + method := "GET" + url := fmt.Sprintf("%s/ns/%s/mcis/%s", epTumblebug, nsId, infraId) + options := "option=force" + if options != "" { + url += "?" + options + } + + // Set request body + requestBody := common.NoBody + + // Set response body + responseBody := new(common.SimpleMsg) + + client.SetTimeout(5 * time.Minute) + + err := common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(requestBody), + &requestBody, + responseBody, + common.MediumDuration, + ) + + if err != nil { + log.Error().Err(err).Msgf("failed to delete the infrastructure (nsId: %s, infraId: %s)", nsId, infraId) + return common.SimpleMsg{}, err + } + + return *responseBody, nil +} + // // RegionInfo is struct for region information // type RegionInfo struct { // Region string diff --git a/pkg/core/recommendation/recommendation.go b/pkg/core/recommendation/recommendation.go index cc2f8cc..67a19fe 100644 --- a/pkg/core/recommendation/recommendation.go +++ b/pkg/core/recommendation/recommendation.go @@ -1,76 +1,280 @@ package recommendation import ( - "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" + "encoding/json" + "fmt" + "os" + "strings" + + "github.com/cloud-barista/cb-tumblebug/src/core/mcir" + "github.com/cloud-barista/cb-tumblebug/src/core/mcis" + cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra" "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/onprem/infra" + "github.com/cloud-barista/cm-beetle/pkg/core/common" + "github.com/go-resty/resty/v2" + "github.com/rs/zerolog/log" ) -func Recommend(source infra.Infra) (cloudmodel.TbMcisDynamicReq, error) { - - // { - // "description": "Made in CB-TB", - // "installMonAgent": "no", - // "label": "DynamicVM", - // "name": "mcis01", - // "systemLabel": "", - // "vm": [ - // { - // "commonImage": "ubuntu18.04", - // "commonSpec": "aws-ap-northeast-2-t2-small", - // "connectionName": "string", - // "description": "Description", - // "label": "DynamicVM", - // "name": "g1-1", - // "rootDiskSize": "default, 30, 42, ...", - // "rootDiskType": "default, TYPE1, ...", - // "subGroupSize": "3", - // "vmUserPassword default:": "string" - // } - // ] - // } - - // Instance with deafult values - targetVM := cloudmodel.TbVmDynamicReq{ - ConnectionName: "", - Description: "Description", - Label: "DynamicVM", - Name: "recomm-vm", - RootDiskSize: "default", - RootDiskType: "default", - SubGroupSize: "1", - VmUserPassword: "", - } +func Recommend(srcInfra []infra.Infra) (cloudmodel.InfraMigrationReq, error) { + + // Initialize resty client with basic auth + client := resty.New() + apiUser := os.Getenv("API_USERNAME") + apiPass := os.Getenv("API_PASSWORD") + client.SetBasicAuth(apiUser, apiPass) - // Match source and target + // set endpoint + epTumblebug := common.TumblebugRestUrl - // Do something for matching VM image - // (example) lower case and remove space - // (example) select common image from a list of images with the lower cased OS name - // Sample code - // lowerCaseOSName := strings.ToLower(source.Compute.OS.OS.Name) - targetVM.CommonImage = "ubuntu22.04" + // check readyz + method := "GET" + url := fmt.Sprintf("%s/readyz", epTumblebug) + reqReadyz := common.NoBody + resReadyz := new(common.SimpleMsg) - // Do something - // Do something for matching instance spec - // (example) get the number of cores from the source instance spec - // (example) select the instance spec with the with similar or appropriate number of cores from a list of instance specs + err := common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(reqReadyz), + &reqReadyz, + resReadyz, + common.VeryShortDuration, + ) + + if err != nil { + log.Err(err).Msg("") + return cloudmodel.InfraMigrationReq{}, err + } + log.Debug().Msgf("resReadyz: %+v", resReadyz.Message) - // Sample code - // if source.Compute.ComputeResource.CPU.Cores == 1 && source.Compute.ComputeResource.Memory.Size == 2 { - targetVM.CommonSpec = "aws-ap-northeast-2-t3-small" - // } + // Set a deployment plan to recommand virtual machines + // Ref: https://github.com/cloud-barista/cb-tumblebug/discussions/1234 + planDocstring := `{ + "filter": { + "policy": [ + { + "condition": [ + { + "operand": "%d", + "operator": ">=" + }, + { + "operand": "%d", + "operator": "<=" + } + ], + "metric": "vCPU" + }, + { + "condition": [ + { + "operand": "%d", + "operator": ">=" + }, + { + "operand": "%d", + "operator": "<=" + } + ], + "metric": "memoryGiB" + }, + { + "condition": [ + { + "operand": "%s" + } + ], + "metric": "providerName" + }, + { + "condition": [ + { + "operand": "%s" + } + ], + "metric": "regionName" + } + ] + }, + "limit": "5", + "priority": { + "policy": [ + { + "metric": "performance" + } + ] + } +}` - // Instance with deafult values - targetInfra := cloudmodel.TbMcisDynamicReq{ + // A target infrastructure by recommendation + targetInfra := cloudmodel.InfraMigrationReq{ Description: "A cloud infra recommended by CM-Beetle", InstallMonAgent: "no", Label: "DynamicVM", Name: "", SystemLabel: "", - Vm: []cloudmodel.TbVmDynamicReq{}, + Vm: []cloudmodel.HostMigrationReq{}, } - targetInfra.Vm = append(targetInfra.Vm, targetVM) + // Recommand VMs + for _, server := range srcInfra { + + // Extract server info from source computing infra info + cores := server.Compute.ComputeResource.CPU.Cores + memory := MBtoGiB(float64(server.Compute.ComputeResource.Memory.Size)) + + coreUpperLimit := cores << 1 + var coreLowerLimit uint + if cores > 1 { + coreLowerLimit = cores >> 1 + } else { + coreLowerLimit = 1 + } + + memoryUpperLimit := memory << 1 + var memoryLowerLimit uint32 + if memory > 1 { + memoryLowerLimit = memory >> 1 + } else { + memoryLowerLimit = 1 + } + + providerName := "aws" + regionName := "ap-northeast-2" + + osVendor := server.Compute.OS.OS.Vendor + osVersion := server.Compute.OS.OS.Release + osNameWithVersion := strings.ToLower(osVendor + osVersion) + + log.Debug(). + Uint("coreUpperLimit", coreUpperLimit). + Uint("coreLowerLimit", coreLowerLimit). + Uint32("memoryUpperLimit (GiB)", memoryUpperLimit). + Uint32("memoryLowerLimit (GiB)", memoryLowerLimit). + Str("providerName", providerName). + Str("regionName", regionName). + Str("osNameWithVersion", osNameWithVersion). + Msg("Source computing infrastructure info") + + // To search proper VMs with the server info, set a deployment plan + planToSearchProperVm := fmt.Sprintf(planDocstring, + coreLowerLimit, + coreUpperLimit, + memoryLowerLimit, + memoryUpperLimit, + providerName, + regionName, + ) + + //////////////////////////////////////// + // Search and set a target VM spec + method := "POST" + url := fmt.Sprintf("%s/mcisRecommendVm", epTumblebug) + + // Request body + reqRecommVm := new(mcis.DeploymentPlan) + err := json.Unmarshal([]byte(planToSearchProperVm), reqRecommVm) + if err != nil { + log.Err(err).Msg("") + return cloudmodel.InfraMigrationReq{}, err + } + log.Trace().Msgf("deployment plan for the VM recommendation: %+v", reqRecommVm) + + // Response body + resRecommVmList := []mcir.TbSpecInfo{} + + err = common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(*reqRecommVm), + reqRecommVm, + &resRecommVmList, + common.VeryShortDuration, + ) + + if err != nil { + log.Err(err).Msg("") + return cloudmodel.InfraMigrationReq{}, err + } + + numRecommenedVm := len(resRecommVmList) + + log.Debug().Msgf("the number of recommended VM specs: %d (for the inserted PM/VM with spec (cores: %d, memory (GiB): %d))", numRecommenedVm, cores, memory) + log.Trace().Msgf("recommendedVmList for the inserted PM/VM with spec (cores: %d, memory (GiB): %d): %+v", cores, memory, resRecommVmList) + + if numRecommenedVm == 0 { + log.Warn().Msgf("no VM spec recommended for the inserted PM/VM with spec (cores: %d, memory (GiB): %d)", cores, memory) + continue + } + log.Debug().Msgf("select the 1st recommended virtual machine: %+v", resRecommVmList[0]) + recommendedSpec := resRecommVmList[0].Id + + name := fmt.Sprintf("rehosted-%s-%s", server.Compute.OS.Node.Hostname, server.Compute.OS.Node.Machineid) + + //////////////////////////////////////// + // Search and set target OS image (e.g. ubuntu22.04) + method = "POST" + url = fmt.Sprintf("%s/mcisDynamicCheckRequest", epTumblebug) + + // Request body + reqMcisDynamicCheck := new(mcis.McisConnectionConfigCandidatesReq) + reqMcisDynamicCheck.CommonSpecs = []string{recommendedSpec} + + // Response body + resMcisDynamicCheck := new(mcis.CheckMcisDynamicReqInfo) + + err = common.ExecuteHttpRequest( + client, + method, + url, + nil, + common.SetUseBody(*reqMcisDynamicCheck), + reqMcisDynamicCheck, + resMcisDynamicCheck, + common.VeryShortDuration, + ) + + if err != nil { + log.Err(err).Msg("") + return cloudmodel.InfraMigrationReq{}, err + } + + log.Trace().Msgf("resMcisDynamicCheck: %+v", resMcisDynamicCheck) + + // candidateImages := resMcisDynamicCheck.ReqCheck[0].Image + + // [TBD] Select VM image by TextSimilarity + + image := fmt.Sprintf("%s+%s+%s", providerName, regionName, osNameWithVersion) + + vm := cloudmodel.HostMigrationReq{ + ConnectionName: "", + CommonImage: image, + CommonSpec: recommendedSpec, + Description: "a recommended virtual machine", + Label: "rehosted", + Name: name, + RootDiskSize: "default", + RootDiskType: "default", + SubGroupSize: "1", + VmUserPassword: "", + } + + targetInfra.Vm = append(targetInfra.Vm, vm) + } + + log.Trace().Msgf("targetInfra: %+v", targetInfra) return targetInfra, nil } + +func MBtoGiB(mb float64) uint32 { + const bytesInMB = 1000000.0 + const bytesInGiB = 1073741824.0 + gib := (mb * bytesInMB) / bytesInGiB + return uint32(gib) +}