All URIs are relative to https://app.koyeb.com
Method | HTTP request | Description |
---|---|---|
CreateSecret | Post /v1/secrets | |
DeleteSecret | Delete /v1/secrets/{id} | |
GetSecret | Get /v1/secrets/{id} | |
ListSecrets | Get /v1/secrets | |
RevealSecret | Post /v1/secrets/{id}/reveal | |
UpdateSecret | Put /v1/secrets/{id} | |
UpdateSecret2 | Patch /v1/secrets/{id} |
CreateSecretReply CreateSecret(ctx).Secret(secret).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
secret := *openapiclient.NewCreateSecret() // CreateSecret |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.CreateSecret(context.Background()).Secret(secret).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.CreateSecret``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSecret`: CreateSecretReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.CreateSecret`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateSecretRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
secret | CreateSecret |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} DeleteSecret(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.DeleteSecret(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.DeleteSecret``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteSecret`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.DeleteSecret`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiDeleteSecretRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]interface{}
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSecretReply GetSecret(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.GetSecret(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.GetSecret``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSecret`: GetSecretReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.GetSecret`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiGetSecretRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListSecretsReply ListSecrets(ctx).Name(name).Limit(limit).Offset(offset).Types(types).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
name := "name_example" // string | (optional)
limit := "limit_example" // string | (optional)
offset := "offset_example" // string | (optional)
types := []string{"Types_example"} // []string | Filter by secret types (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.ListSecrets(context.Background()).Name(name).Limit(limit).Offset(offset).Types(types).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.ListSecrets``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSecrets`: ListSecretsReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.ListSecrets`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListSecretsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
name | string | ||
limit | string | ||
offset | string | ||
types | []string | Filter by secret types |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RevealSecretReply RevealSecret(ctx, id).Body(body).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.RevealSecret(context.Background(), id).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.RevealSecret``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RevealSecret`: RevealSecretReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.RevealSecret`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiRevealSecretRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | map[string]interface{} | |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSecretReply UpdateSecret(ctx, id).Secret(secret).UpdateMask(updateMask).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
secret := *openapiclient.NewSecret() // Secret |
updateMask := "updateMask_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.UpdateSecret(context.Background(), id).Secret(secret).UpdateMask(updateMask).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.UpdateSecret``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSecret`: UpdateSecretReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.UpdateSecret`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiUpdateSecretRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
secret | Secret | | updateMask | string | |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSecretReply UpdateSecret2(ctx, id).Secret(secret).UpdateMask(updateMask).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
secret := *openapiclient.NewSecret() // Secret |
updateMask := "updateMask_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecretsApi.UpdateSecret2(context.Background(), id).Secret(secret).UpdateMask(updateMask).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecretsApi.UpdateSecret2``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSecret2`: UpdateSecretReply
fmt.Fprintf(os.Stdout, "Response from `SecretsApi.UpdateSecret2`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiUpdateSecret2Request struct via the builder pattern
Name | Type | Description | Notes |
---|
secret | Secret | | updateMask | string | |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]