-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathlist.go
More file actions
28 lines (21 loc) · 749 Bytes
/
list.go
File metadata and controls
28 lines (21 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package osnadmin
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
)
// ListAllChannels that an OSN is a member of.
func ListAllChannels(osnURL string, caCertPool *x509.CertPool, tlsClientCert tls.Certificate) (*http.Response, error) {
url := fmt.Sprintf("%s/participation/v1/channels", osnURL)
return httpGet(url, caCertPool, tlsClientCert)
}
// ListSingleChannel that an OSN is a member of.
func ListSingleChannel(osnURL, channelID string, caCertPool *x509.CertPool, tlsClientCert tls.Certificate) (*http.Response, error) {
url := fmt.Sprintf("%s/participation/v1/channels/%s", osnURL, channelID)
return httpGet(url, caCertPool, tlsClientCert)
}