common

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// PageParam is the name of the page query parameter.
	PageParam = "page"
	// SizeParam is the name fo the size query parameter.
	SizeParam = "size"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeSet

type AttributeSet map[string]interface{}

AttributeSet represents set of attributes.

type DataSet

type DataSet struct {
	Type            string    `json:"type"`
	ID              uuid.UUID `json:"id"`
	AttributeSet    `json:"attributes"`
	RelationshipSet `json:"relationships"`
	Meta            `json:"meta"`
}

DataSet represents a set of data for an entity.

type ListOption

type ListOption func(*http.Request)

ListOption modifies a list request.

func WithPage

func WithPage(page int) ListOption

WithPage sets the page of entities included in the list response.

func WithSize

func WithSize(size int) ListOption

WithSize sets the maximum number of entities included in the list response.

type Meta

type Meta map[string]interface{}

Meta represents metadata.

type RelationshipSet

type RelationshipSet map[string]interface{}

RelationshipSet represents set of relationships.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL