Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionResource ¶
type CollectionResource struct { Resource TotalItems uint `json:"totalItems"` ItemPerPage uint `json:"itemPerPage,omitempty"` CurrentPage uint `json:"currentPage,omitempty"` FirstPage string `json:"firstPage,omitempty"` NextPage string `json:"nextPage,omitempty"` PreviousPage string `json:"previousPage,omitempty"` LastPage string `json:"lastPage,omitempty"` }
CollectionResource represents the JSON-LD header
func NewCollection ¶
func NewCollection(context, id string) *CollectionResource
NewCollection returns a JSONLD Collection resource
func (*CollectionResource) SetPaginator ¶
func (j *CollectionResource) SetPaginator(r *http.Request, paginator *api.Pagination)
SetPaginator defines values of the JSONLD Collection according to pagination request.
type Error ¶
type Error struct { Resource StatusCode int `json:"statusCode,omitempty"` Code string `json:"code,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` }
Error is the error holder
type Resource ¶
type Resource struct { Context string `json:"@context,omitempty"` NodeID string `json:"@id,omitempty"` Type string `json:"@type,omitempty"` }
Resource represents the JSON-LD header
func NewResource ¶
NewResource returns a JSONLD resource
Click to show internal directories.
Click to hide internal directories.