atlassian / go-artifactory

Go library for artifactory REST API
Apache License 2.0
23 stars 28 forks source link

Get replication configuration fixed for repos with only one replication #15

Closed jamestoyer closed 5 years ago

jamestoyer commented 5 years ago

The GET /api/replications/<repo-key> endpoint can return both a single object or an array of objects. The current implementation can only handle arrays which makes it problematic when you use pull replication or only have one replication set up.

In order to do this, the HTTP body needs to be buffered and then copied to a new buffer. This prevents weird EOF errors from preventing type checking. The body is then marshalled into an interface to determine if it's an array or not, and then properly marshalled in to the correct type

jamestoyer commented 5 years ago

Hey @dillon-giacoppo is it possible to get a review on this?

dillon-giacoppo commented 5 years ago

Hi @jamestoyer sorry for the delay, getting time roadmapped to improve the OSS projects is not always easy. I'll endeavour to give it a thorough review by weeks end.