(client *api.Client, host string, path safeurl.SafeURL, payload interface{})
| 73 | } |
| 74 | |
| 75 | func putSecret(client *api.Client, host string, path safeurl.SafeURL, payload interface{}) error { |
| 76 | payloadBytes, err := json.Marshal(payload) |
| 77 | if err != nil { |
| 78 | return fmt.Errorf("failed to serialize: %w", err) |
| 79 | } |
| 80 | requestBody := bytes.NewReader(payloadBytes) |
| 81 | |
| 82 | return client.REST(host, "PUT", path.String(), requestBody, nil) |
| 83 | } |
| 84 | |
| 85 | func putOrgSecret(client *api.Client, host string, pk *PubKey, orgName, visibility, secretName, eValue string, repositoryIDs []int64, app shared.App) error { |
| 86 | path, err := safeurl.JoinPath("orgs", orgName, string(app), "secrets", secretName) |
no test coverage detected