Skip to content

Commit 128eea3

Browse files
feat(function): add support for SecretEnvironmentVariables (#1055)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 476593a commit 128eea3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

api/function/v1beta1/function_sdk.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ type Function struct {
573573

574574
Description *string `json:"description"`
575575

576+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
577+
576578
Region scw.Region `json:"region"`
577579
}
578580

@@ -649,9 +651,17 @@ type Namespace struct {
649651

650652
Description *string `json:"description"`
651653

654+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
655+
652656
Region scw.Region `json:"region"`
653657
}
654658

659+
type Secret struct {
660+
Key string `json:"key"`
661+
662+
Value *string `json:"value"`
663+
}
664+
655665
type Token struct {
656666
Token string `json:"token"`
657667

@@ -777,6 +787,8 @@ type CreateNamespaceRequest struct {
777787
ProjectID string `json:"project_id"`
778788

779789
Description *string `json:"description"`
790+
791+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
780792
}
781793

782794
// CreateNamespace: create a new namespace
@@ -829,6 +841,8 @@ type UpdateNamespaceRequest struct {
829841
EnvironmentVariables *map[string]string `json:"environment_variables"`
830842

831843
Description *string `json:"description"`
844+
845+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
832846
}
833847

834848
// UpdateNamespace: update an existing namespace
@@ -1041,6 +1055,8 @@ type CreateFunctionRequest struct {
10411055
Privacy FunctionPrivacy `json:"privacy"`
10421056

10431057
Description *string `json:"description"`
1058+
1059+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
10441060
}
10451061

10461062
// CreateFunction: create a new function
@@ -1104,6 +1120,8 @@ type UpdateFunctionRequest struct {
11041120
Privacy FunctionPrivacy `json:"privacy"`
11051121

11061122
Description *string `json:"description"`
1123+
1124+
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
11071125
}
11081126

11091127
// UpdateFunction: update an existing function

0 commit comments

Comments
 (0)