Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Defaults *Defaults `json:"defaults"` Requests []BatchedRequest `json:"requests"` }
https://docs.kinto-storage.org/en/stable/api/1.x/batch.html
func NewBatch ¶
func NewBatch(records []interface{}, perms *authz.Permissions, method, path string) *Batch
NewBatch returns a Batch whose inner requests are homogenous (Kinto allows for mixing requests within batch operations (say, for example, two POSTs of records and one GET of a collection)) however this API does not.
func NewBatches ¶
func NewBatches(records []interface{}, maxRequests int, perms *authz.Permissions, method, path string) []*Batch
NewBatches returns a slice of Batch whose inner requests are homogenous (Kinto allows for mixing requests within batch operations (say, for example, two POSTs of records and one GET of a collection)) however this API does not.
maxRequest must be less-than-or equal to Kinto's configured "batch_max_requests". See Client.BatchMaxRequests for more information on how to retrieve this value programatically.