Conversation
…s known to the API server
obelisk
left a comment
There was a problem hiding this comment.
This should probably also be able to filter somehow otherwise this would be a crazy call on large deployments.
| http.Handle("/scheduleQuery", samlSP.RequireAccount(sq)) | ||
| http.Handle("/fetchResults", samlSP.RequireAccount(fr)) | ||
| http.Handle("/checkHost", samlSP.RequireAccount(_checkHost)) | ||
| http.Handle("/listHosts", _listHosts) |
There was a problem hiding this comment.
This needs to be protected by SAML
Any ideas on the parameters this might take? This will be a part of the spec contract a 'goserver'/mock server needs to implement. I'm thinking either a query param for "search" working as a glob search on any of the host fields, or a set of limit + offset parameters. |
| // is blind to the implementation for code separation purposes. | ||
| type GoQueryAPI interface { | ||
| CheckHost(string) (hosts.Host, error) | ||
| ListHosts() (utils.Rows, error) |
There was a problem hiding this comment.
Is there a reason why this is utils.Rows and not []hosts.Host?
There was a problem hiding this comment.
Hi Zachary, it is because this branch is out of date with master, which recently had the big rewrite
There was a problem hiding this comment.
Sorry I missed the point of your question. No there is no reason, this was implemented as if this function expected the standard query response rows structure from the server. Since it is a specific goquery endpoint then yes, you are right, the shape of returned JSON from the server (or whatever is implementing this) should be of type []hosts.Host
Thanks for the catch, will update
This PR closes #93