Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteResponse ¶
type Payload ¶
type Payload struct { Data interface{} `json:"data"` Permissions *authz.Permissions `json:"permissions,omitempty"` }
func NewPayload ¶
func NewPayload(data interface{}, perms *authz.Permissions) *Payload
type Record ¶
type Record struct { Id string `json:"id,omitempty"` LastModified uint64 `json:"last_modified,omitempty"` }
Every Record in Kinto has attached to it an ID and last-modified data. The best way to use this struct is to embed a pointer to it within your own schema.
type LegoSet struct { branding string legos []Lego *api.Record }
This enables you to leave the Kinto metadata out in your in code while receiving it in full from Kinto when using your struct as a serde target.
starWars := NewLegoSet(...) fmt.Println(starWars.Record) client.NewRecord(&starWars) fmt.Println(starWars.Record.LastModified)
For more details see https://docs.kinto-storage.org/en/stable/api/1.x/records.html
type Resourcer ¶
type Resourcer interface {
Resource() string
}
A Resourcer returns the REST API resource for accessing a given endpoint. The returned string should fulfill all paths BEYOND the base path and "rest" resource (proto>://<hostname>/rest).
E.G. If we are bucket a resource at "https://firefox.settings.services.mozilla.com/v1" then this method should return "/buckets/<name>"