Versions in this module Expand all Collapse all v0 v0.17.1 Oct 26, 2019 Changes in this version + const EqualOp + func AsFunc(val interface{}) func(interface{}) bool + func CompareNumbers(n1, n2 interface{}) (int, error) + func CompareTimes(t1, t2 time.Time) int + func Decode(v reflect.Value, d Decoder) error + func Encode(v reflect.Value, e Encoder) error + func FieldPathEqualsField(fp []string, s string) bool + func FieldPathsEqual(fp1, fp2 []string) bool + func GroupByFieldPath(gets []*Action) [][]*Action + func IsEmptyValue(v reflect.Value) bool + func SplitActions(actions []*Action, split func(a, b *Action) bool) [][]*Action + func UniqueString() string + type Action struct + Doc Document + FieldPaths [][]string + Index int + Key interface{} + Kind ActionKind + Mods []Mod + func GroupActions(actions []*Action) (beforeGets, getList, writeList, afterGets []*Action) + type ActionKind int + const Create + const Delete + const Get + const Put + const Replace + const Update + func (i ActionKind) String() string + type ActionListError []struct + func NewActionListError(errs []error) ActionListError + type Collection interface + As func(i interface{}) bool + BytesToRevision func([]byte) (interface{}, error) + Close func() error + ErrorAs func(err error, i interface{}) bool + ErrorCode func(error) gcerr.ErrorCode + Key func(Document) (interface{}, error) + QueryPlan func(*Query) (string, error) + RevisionField func() string + RevisionToBytes func(interface{}) ([]byte, error) + RunActions func(ctx context.Context, actions []*Action, opts *RunActionsOptions) ActionListError + RunGetQuery func(context.Context, *Query) (DocumentIterator, error) + type Decoder interface + AsBool func() (bool, bool) + AsBytes func() ([]byte, bool) + AsFloat func() (float64, bool) + AsInt func() (int64, bool) + AsInterface func() (interface{}, error) + AsNull func() bool + AsSpecial func(reflect.Value) (bool, interface{}, error) + AsString func() (string, bool) + AsUint func() (uint64, bool) + DecodeList func(func(int, Decoder) bool) + DecodeMap func(func(string, Decoder, bool) bool) + ListLen func() (int, bool) + MapLen func() (int, bool) + String func() string + type DeleteQueryer interface + RunDeleteQuery func(context.Context, *Query) error + type Document struct + Origin interface{} + func NewDocument(doc interface{}) (Document, error) + func (d Document) Decode(dec Decoder) error + func (d Document) Encode(e Encoder) error + func (d Document) FieldNames() []string + func (d Document) Get(fp []string) (interface{}, error) + func (d Document) GetField(field string) (interface{}, error) + func (d Document) HasField(field string) bool + func (d Document) HasFieldFold(field string) bool + func (d Document) Set(fp []string, val interface{}) error + func (d Document) SetField(field string, value interface{}) error + type DocumentIterator interface + As func(i interface{}) bool + Next func(context.Context, Document) error + Stop func() + type Encoder interface + EncodeBool func(bool) + EncodeBytes func([]byte) + EncodeFloat func(float64) + EncodeInt func(int64) + EncodeList func(n int) Encoder + EncodeMap func(n int) Encoder + EncodeNil func() + EncodeSpecial func(v reflect.Value) (bool, error) + EncodeString func(string) + EncodeUint func(uint64) + ListIndex func(i int) + MapKey func(string) + type Filter struct + FieldPath []string + Op string + Value interface{} + type IncOp struct + Amount interface{} + type Mod struct + FieldPath []string + Value interface{} + type Query struct + BeforeQuery func(asFunc func(interface{}) bool) error + FieldPaths [][]string + Filters []Filter + Limit int + OrderAscending bool + OrderByField string + type RunActionsOptions struct + BeforeDo func(asFunc func(interface{}) bool) error + type Throttle struct + func NewThrottle(max int) *Throttle + func (t *Throttle) Acquire() + func (t *Throttle) Release() + func (t *Throttle) Wait() + type UpdateQueryer interface + RunUpdateQuery func(context.Context, *Query, []Mod) error