Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Body []byte // usually the POST JSON content Feeds []interface{} Input *transfer.Input // contains filtered or unexported fields }
Request represents the server-side post-processed information about a request. There is no strict struct for request payload since some of the keys of the request are dynamically generated based on the model inputs. See shared/client.Message for client-side perspective.
func (*Request) UnmarshalJSONObject ¶
implements gojay.UnmarshalJSONObject see service.(*Handler).serveHTTP() There is some polymorphism involved, as well as loose-typing. Model inputs aren't strictly typed from the perspective of the request. The primary polymorphism comes from the support for multiple rows worth of inputs. There are 2 optional keys that aren't part of the model input: "batch_size" and "cache_key". If the key "batch_size" is provided, then the keys' values should be an array of scalars; otherwise, the keys' values can be a single scalar. The key "cache_key" is used for caching, and should be an array of strings if "batch_size" is provided.