config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boundaries

type Boundaries struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

type Config

type Config struct {
	Cluster    *gocb.Cluster `json:"cluster"`
	Bucket     string        `json:"bucket"`
	Parameters Parameters    `json:"parameters"`
}

type Error

type Error struct {
	Code    int    `json:"status"`
	Message string `json:"message"`
}

type Flags

type Flags struct {
	BeginningOfResults bool `json:"beginning_of_results"`
	EndOfResults       bool `json:"end_of_results"`
}

type Join

type Join struct {
	// Bucket where the joined table is located.
	Bucket string `json:"bucket" required:"true"`
	// Reference key in the parent table.
	ForeignKey string `json:"foreign_key"`
	// Key to assign joined fields in the result tuple.
	DestinationKey string `json:"destination_key"`
	// Fields to filter.
	Fields []string `json:"fields" required:"true"`
	// Specify parent if not main bucket (for nested joins).
	ForeignParent string `json:"foreign_parent"`
	// Reference key in the joined table.
	JoinKey string `json:"join_key"`
	// Nest another request in the join
	JoinQuery *JoinQuery `json:"join_query"`
}

type JoinQuery

type JoinQuery struct {
	Config  Config  `json:"config"`
	Options Options `json:"options"`
	Start   int64   `json:"start"`
	End     int64   `json:"end"`
}

type LabelOption

type LabelOption struct {
	Analyzer     string `json:"analyzer"`
	Fuzziness    string `json:"fuzziness"`
	Out          string `json:"out"`
	PrefixLength string `json:"prefix_length"`
	PhraseMode   bool   `json:"phrase_mode"`
	RegexpMode   bool   `json:"regexp_mode"`
	Weight       string `json:"weight"`
	Bucket       string `json:"bucket"`
}

type Options

type Options struct {
	Fields        []string               `json:"fields"`
	Where         []string               `json:"where"`
	Joins         []Join                 `json:"joins"`
	Order         map[string]string      `json:"order"`
	QueryString   string                 `json:"query_string"`
	Labels        map[string][]string    `json:"labels"`
	LabelsOptions map[string]LabelOption `json:"labels_options"`
	Config        Config                 `json:"config"`
}

type Parameters

type Parameters struct {
	MaxQueryLength int  `json:"max_query_length" default:"1000"`
	Debug          bool `json:"debug" default:"false"`
}

type QueryResults

type QueryResults struct {
	Results    []interface{} `json:"results"`
	Boundaries Boundaries    `json:"boundaries"`
	Flags      Flags         `json:"flags"`
}

Jump to

Keyboard shortcuts

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