Documentation ¶
Index ¶
- Constants
- func BoolValue(val bool) *value
- func Condition(field string) *queryExpressionBuilder
- func DoubleValue(val float64) *value
- func NumberValue(val int) *value
- func StringValue(val string) *value
- type CollectionGroupRef
- type CollectionRef
- type DecodeOption
- type Document
- type DocumentIter
- type DocumentRef
- type Documents
- type FetchResult
- type Query
Constants ¶
View Source
const MaxCollectionDepth int = 1
Variables ¶
This section is empty.
Functions ¶
func DoubleValue ¶
func DoubleValue(val float64) *value
DoubleValue - Create a DoubleValue for a Query
func StringValue ¶
func StringValue(val string) *value
StringValue - Create a StringValue for a Query
Types ¶
type CollectionGroupRef ¶ added in v0.7.1
type CollectionGroupRef interface { // Query - Create a query for this collection group reference Query() Query // Parent - Get the parent collection of this collection group reference Parent() CollectionGroupRef // Name - Get the name of this collection group reference Name() string }
CollectionGroupRef - A reference to a chain of collections not tied to document keys for building sub collection queries
type CollectionRef ¶
type CollectionRef interface { Name() string Doc(string) DocumentRef Query() Query Parent() DocumentRef Collection(string) CollectionGroupRef ToWire() *v1.Collection }
Collection
type DecodeOption ¶
type DecodeOption interface {
Apply(c *mapstructure.DecoderConfig)
}
type Document ¶
type Document interface { // Ref - Retrieve the original DocumentRef for this document Ref() DocumentRef // Content - Retrieve the documents content as a Map Content() map[string]interface{} // Decode - Decode document content into the given reference Decode(interface{}, ...DecodeOption) error }
Document - Interface for interacing with document API results
type DocumentIter ¶
type DocumentIter interface { // Next - Retrieve the next document in the iterator Next() (Document, error) }
DocumentIter - An iterator for lazy document retrieval
type DocumentRef ¶
type DocumentRef interface { Parent() CollectionRef Id() string // Get - Retrieve the value of the document Get() (Document, error) // Set - Sets the value of the document Set(map[string]interface{}) error // Delete - Deletes the document Delete() error // Collection - Retrieve a child collection of this document Collection(string) (CollectionRef, error) // contains filtered or unexported methods }
DocumentRef - Represents a reference to a document
type Documents ¶
type Documents interface { // Collection - Create a new collection reference Collection(string) CollectionRef }
Documents
type FetchResult ¶
type FetchResult struct { Documents []Document PagingToken interface{} }
type Query ¶
type Query interface { // Where - Append one or more expressions to the query Where(...*queryExpression) Query // Limit - limit the max result size of the query Limit(int) Query // FromPagingToken - Start from a given entry FromPagingToken(interface{}) Query // Fetch - Return paged values Fetch() (*FetchResult, error) // Stream - Return an iterator containing values Stream() (DocumentIter, error) }
Query - Query interface for Document Service
Click to show internal directories.
Click to hide internal directories.