/
zhendosina
/
obshell
Обзор
Документация
Войти
/
zhendosina
/
obshell
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ob/agent/secure/handler.go
44 строки
1 KB
Junkrat77
PullRequest: 614 feat: support seekdb
31 окт 2025, 11:06
31 окт 2025, 11:06
55d9f3e
Код
Авторство
О чём код?
/* * Copyright (c) 2024 OceanBase. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package secure import ( "context" log "github.com/sirupsen/logrus" "github.com/oceanbase/obshell/ob/agent/lib/http" "github.com/oceanbase/obshell/ob/agent/meta" ) type GetPasswordResp struct { Password string `json:"password"` } func GetSecret(ctx context.Context) *meta.AgentSecret { return meta.NewAgentSecretByAgentInfo(meta.OCS_AGENT, Public()) } func sendGetSecretApi(agentInfo meta.AgentInfoInterface) *meta.AgentSecret { log.Infof("Send get secret request from '%s'", agentInfo.String()) ret := &meta.AgentSecret{} err := http.SendGetRequest(agentInfo, "/api/v1/secret", nil, ret) if err != nil { log.WithError(err).Error("Get secret failed") } return ret }