mirror of
https://github.com/hanzokms/go-sdk.git
synced 2026-10-30 19:44:54 +00:00
- Module path: github.com/infisical/go-sdk -> github.com/hanzokms/go-sdk - Package name: infisical -> kms - Types: InfisicalClient -> Client, NewInfisicalClient -> NewClient - Default URL: app.infisical.com -> kms.hanzo.ai - Env vars: INFISICAL_ prefix -> KMS_ prefix - User agent: infisical-go-sdk -> hanzo-kms-go-sdk - Copyright: Hanzo AI Inc. - go build ./... passes clean
22 lines
513 B
Go
22 lines
513 B
Go
package api
|
|
|
|
import (
|
|
"github.com/go-resty/resty/v2"
|
|
"github.com/hanzokms/go-sdk/packages/errors"
|
|
)
|
|
|
|
func GetSshHostHostCaPublicKeyV1(httpClient *resty.Client, sshHostId string) (string, error) {
|
|
res, err := httpClient.R().
|
|
Get("/v1/ssh/hosts/" + sshHostId + "/host-ca-public-key")
|
|
|
|
if err != nil {
|
|
return "", errors.NewRequestError("GetSshHostHostCaPublicKeyV1", err)
|
|
}
|
|
|
|
if res.IsError() {
|
|
return "", errors.NewAPIErrorWithResponse("GetSshHostHostCaPublicKeyV1", res)
|
|
}
|
|
|
|
return res.String(), nil
|
|
}
|