firestore

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FireStore

type FireStore struct {
	// contains filtered or unexported fields
}

func NewFireStore

func NewFireStore(ctx context.Context, projectID, namespace, environment string, opts ...Option) (*FireStore, error)

func (*FireStore) Close

func (s *FireStore) Close() error

func (*FireStore) Create

func (s *FireStore) Create(ctx context.Context, col datastore.Collection, id string, entity interface{}) error

func (*FireStore) Find

func (*FireStore) Get

func (s *FireStore) Get(ctx context.Context, col datastore.Collection, id string, v interface{}) error

func (*FireStore) Update

func (s *FireStore) Update(ctx context.Context, col datastore.Collection, id string, updater datastore.Updater) error

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func (*Iterator) Cursor

func (it *Iterator) Cursor() (string, error)

Cursor builds a base 64 string (encode from string in map[string]interface{} format). The cursor contains only values attached with the fields used as ordering fields.

func (*Iterator) Next

func (it *Iterator) Next(dst interface{}) error

type Option

type Option func(*FireStore)

func WithCollectionNamePrefix

func WithCollectionNamePrefix(prefix string) Option

func WithCredentialsFile

func WithCredentialsFile(path string) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

Jump to

Keyboard shortcuts

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