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
27 lines
619 B
Go
27 lines
619 B
Go
package api
|
|
|
|
import (
|
|
"github.com/go-resty/resty/v2"
|
|
"github.com/hanzokms/go-sdk/packages/errors"
|
|
)
|
|
|
|
const callGetSshHostsOperation = "CallGetSshHostsV1"
|
|
|
|
func GetSshHostsV1(httpClient *resty.Client, _ GetSshHostsV1Request) (GetSshHostsV1Response, error) {
|
|
var getSshHostsResponse GetSshHostsV1Response
|
|
|
|
res, err := httpClient.R().
|
|
SetResult(&getSshHostsResponse).
|
|
Get("/v1/ssh/hosts")
|
|
|
|
if err != nil {
|
|
return nil, errors.NewRequestError(callGetSshHostsOperation, err)
|
|
}
|
|
|
|
if res.IsError() {
|
|
return nil, errors.NewAPIErrorWithResponse(callGetSshHostsOperation, res)
|
|
}
|
|
|
|
return getSshHostsResponse, nil
|
|
}
|