I'm not a fan of this type especially since the methods on this type return `[]APPort` and this type only exists for these two methods.  

It's much better to have to functions `func sortByPrivatePort([]APIPort) []APIPort` and `func sortByPublicPort([]APIPort)[]APIPort`.