MCPcopy
hub / github.com/minio/minio-go / processBucketNotificationResponse

Function processBucketNotificationResponse

api-bucket-notification.go:109–120  ·  view source on GitHub ↗

processes the GetNotification http response from the server.

(bucketName string, resp *http.Response)

Source from the content-addressed store, hash-verified

107
108// processes the GetNotification http response from the server.
109func processBucketNotificationResponse(bucketName string, resp *http.Response) (notification.Configuration, error) {
110 if resp.StatusCode != http.StatusOK {
111 errResponse := httpRespToErrorResponse(resp, bucketName, "")
112 return notification.Configuration{}, errResponse
113 }
114 var bucketNotification notification.Configuration
115 err := xmlDecoder(resp.Body, &bucketNotification)
116 if err != nil {
117 return notification.Configuration{}, err
118 }
119 return bucketNotification, nil
120}
121
122// ListenNotification listen for all events, this is a MinIO specific API
123func (c *Client) ListenNotification(ctx context.Context, prefix, suffix string, events []string) <-chan notification.Info {

Callers 1

getBucketNotificationMethod · 0.85

Calls 2

httpRespToErrorResponseFunction · 0.85
xmlDecoderFunction · 0.70

Tested by

no test coverage detected