Versions in this module Expand all Collapse all v0 v0.17.1 Oct 26, 2019 Changes in this version + const Ascending + const DefaultRevisionField + const Descending + var NewCollection = newCollection + var OpenCensusViews = oc.Views(pkgName, latencyMeasure) + func Increment(amount interface{}) interface + type Action struct + func (a *Action) String() string + type ActionList struct + func (l *ActionList) BeforeDo(f func(asFunc func(interface{}) bool) error) *ActionList + func (l *ActionList) Create(doc Document) *ActionList + func (l *ActionList) Delete(doc Document) *ActionList + func (l *ActionList) Do(ctx context.Context) error + func (l *ActionList) Get(doc Document, fps ...FieldPath) *ActionList + func (l *ActionList) Put(doc Document) *ActionList + func (l *ActionList) Replace(doc Document) *ActionList + func (l *ActionList) String() string + func (l *ActionList) Update(doc Document, mods Mods) *ActionList + type ActionListError []struct + func (e ActionListError) Error() string + func (e ActionListError) Unwrap() error + type Collection struct + func OpenCollection(ctx context.Context, urlstr string) (*Collection, error) + func (c *Collection) Actions() *ActionList + func (c *Collection) As(i interface{}) bool + func (c *Collection) Close() error + func (c *Collection) Create(ctx context.Context, doc Document) error + func (c *Collection) Delete(ctx context.Context, doc Document) error + func (c *Collection) ErrorAs(err error, i interface{}) bool + func (c *Collection) Get(ctx context.Context, doc Document, fps ...FieldPath) error + func (c *Collection) Put(ctx context.Context, doc Document) error + func (c *Collection) Query() *Query + func (c *Collection) Replace(ctx context.Context, doc Document) error + func (c *Collection) RevisionToString(rev interface{}) (string, error) + func (c *Collection) StringToRevision(s string) (interface{}, error) + func (c *Collection) Update(ctx context.Context, doc Document, mods Mods) error + type CollectionURLOpener interface + OpenCollectionURL func(ctx context.Context, u *url.URL) (*Collection, error) + type Document = interface + type DocumentIterator struct + func (it *DocumentIterator) As(i interface{}) bool + func (it *DocumentIterator) Next(ctx context.Context, dst Document) error + func (it *DocumentIterator) Stop() + type FieldPath string + type Mods map[FieldPath]interface + type Query struct + func (q *Query) BeforeQuery(f func(asFunc func(interface{}) bool) error) *Query + func (q *Query) Get(ctx context.Context, fps ...FieldPath) *DocumentIterator + func (q *Query) Limit(n int) *Query + func (q *Query) OrderBy(field, direction string) *Query + func (q *Query) Plan(fps ...FieldPath) (string, error) + func (q *Query) Where(fp FieldPath, op string, value interface{}) *Query + type URLMux struct + func DefaultURLMux() *URLMux + func (mux *URLMux) CollectionSchemes() []string + func (mux *URLMux) OpenCollection(ctx context.Context, urlstr string) (*Collection, error) + func (mux *URLMux) OpenCollectionURL(ctx context.Context, u *url.URL) (*Collection, error) + func (mux *URLMux) RegisterCollection(scheme string, opener CollectionURLOpener) + func (mux *URLMux) ValidCollectionScheme(scheme string) bool