(client *api.Client, host, path string)
| 31 | } |
| 32 | |
| 33 | func getPubKey(client *api.Client, host, path string) (*PubKey, error) { |
| 34 | pk := PubKey{} |
| 35 | err := client.REST(host, "GET", path, nil, &pk) |
| 36 | if err != nil { |
| 37 | return nil, err |
| 38 | } |
| 39 | return &pk, nil |
| 40 | } |
| 41 | |
| 42 | func getOrgPublicKey(client *api.Client, host, orgName string, app shared.App) (*PubKey, error) { |
| 43 | return getPubKey(client, host, fmt.Sprintf("orgs/%s/%s/secrets/public-key", orgName, app)) |
no test coverage detected