mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 18:28:12 +00:00
Feat: Added project slug support
This commit is contained in:
@@ -153,7 +153,7 @@ func CallGetDecryptedSecretsV3(httpClient *resty.Client, request GetDecryptedSec
|
|||||||
SetResult(&decryptedSecretsResponse).
|
SetResult(&decryptedSecretsResponse).
|
||||||
SetHeader("User-Agent", USER_AGENT_NAME).
|
SetHeader("User-Agent", USER_AGENT_NAME).
|
||||||
SetQueryParam("secretPath", request.SecretPath).
|
SetQueryParam("secretPath", request.SecretPath).
|
||||||
SetQueryParam("workspaceId", request.ProjectID).
|
SetQueryParam("workspaceSlug", request.ProjectSlug).
|
||||||
SetQueryParam("environment", request.Environment).
|
SetQueryParam("environment", request.Environment).
|
||||||
Get(fmt.Sprintf("%v/v3/secrets/raw", API_HOST_URL))
|
Get(fmt.Sprintf("%v/v3/secrets/raw", API_HOST_URL))
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ type GetDecryptedSecretsV3Response struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetDecryptedSecretsV3Request struct {
|
type GetDecryptedSecretsV3Request struct {
|
||||||
ProjectID string `json:"projectId"`
|
ProjectSlug string `json:"workspaceSlug"`
|
||||||
Environment string `json:"environment"`
|
Environment string `json:"environment"`
|
||||||
SecretPath string `json:"secretPath"`
|
SecretPath string `json:"secretPath"`
|
||||||
ETag string `json:"etag,omitempty"`
|
ETag string `json:"etag,omitempty"`
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func GetPlainTextSecretsViaUniversalAuthMachineIdentity(accessToken string, etag
|
|||||||
httpClient.SetAuthToken(accessToken)
|
httpClient.SetAuthToken(accessToken)
|
||||||
|
|
||||||
secretsResponse, err := api.CallGetDecryptedSecretsV3(httpClient, api.GetDecryptedSecretsV3Request{
|
secretsResponse, err := api.CallGetDecryptedSecretsV3(httpClient, api.GetDecryptedSecretsV3Request{
|
||||||
ProjectID: secretScope.ProjectId,
|
ProjectSlug: secretScope.ProjectSlug,
|
||||||
Environment: secretScope.EnvSlug,
|
Environment: secretScope.EnvSlug,
|
||||||
SecretPath: secretScope.SecretsPath,
|
SecretPath: secretScope.SecretsPath,
|
||||||
ETag: etag,
|
ETag: etag,
|
||||||
|
|||||||
Reference in New Issue
Block a user