query

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_LIMIT = 15
)

Variables

This section is empty.

Functions

func Account

func Account(v string) func(*Query)

func After

func After(v string) func(*Query)

func Destination

func Destination(v string) func(*Query)

func Limit

func Limit(n int) func(*Query)

func Reference

func Reference(v string) func(*Query)

func Source

func Source(v string) func(*Query)

Types

type Cursor

type Cursor struct {
	PageSize  int         `json:"page_size"`
	HasMore   bool        `json:"has_more"`
	Total     int64       `json:"total,omitempty"`
	Remaining int         `json:"remaining_results"`
	Previous  string      `json:"previous,omitempty"`
	Next      string      `json:"next,omitempty"`
	Data      interface{} `json:"data"`
}

type Query

type Query struct {
	Limit  int
	After  string
	Params map[string]interface{}
}

func New

func New(qms ...[]QueryModifier) Query

func (*Query) Apply

func (q *Query) Apply(modifiers []QueryModifier)

func (*Query) HasParam

func (q *Query) HasParam(name string) bool

func (*Query) Modify

func (q *Query) Modify(modifier QueryModifier)

type QueryModifier

type QueryModifier func(*Query)

Jump to

Keyboard shortcuts

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