cloudfirestore

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 14 Imported by: 3 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStartWith

func AddStartWith(q firestore.Query, key string, word string) firestore.Query

AddStartWith ... 前方一致クエリを追加する

func BtCreate

func BtCreate(ctx context.Context, bt *firestore.WriteBatch, colRef *firestore.CollectionRef, src interface{})

BtCreate ... 作成する(バッチ書き込み)

func BtDelete

func BtDelete(ctx context.Context, bt *firestore.WriteBatch, docRef *firestore.DocumentRef)

BtDelete ... 削除する(バッチ書き込み)

func BtSet

func BtSet(ctx context.Context, bt *firestore.WriteBatch, docRef *firestore.DocumentRef, src interface{})

BtSet ... 上書きする(バッチ書き込み)

func BtUpdate

func BtUpdate(ctx context.Context, bt *firestore.WriteBatch, docRef *firestore.DocumentRef, kv map[string]interface{})

BtUpdate ... 更新する(バッチ書き込み)

func Create

func Create(ctx context.Context, colRef *firestore.CollectionRef, src interface{}) error

Create ... 作成する

func Delete

func Delete(ctx context.Context, docRef *firestore.DocumentRef) error

Delete ... 削除する

func GenerateDocumentRef

func GenerateDocumentRef(fCli *firestore.Client, docRefs []*DocRef) *firestore.DocumentRef

GenerateDocumentRef ... ドキュメント参照を作成する

func Get

func Get(ctx context.Context, docRef *firestore.DocumentRef, dst interface{}) (bool, error)

Get ... 1つ取得する

func GetByQuery

func GetByQuery(ctx context.Context, query firestore.Query, dst interface{}) (bool, error)

GetByQuery ... クエリで1つ取得する

func GetMulti

func GetMulti(ctx context.Context, fCli *firestore.Client, docRefs []*firestore.DocumentRef, dsts interface{}) error

GetMulti ... 複数取得する

func ListByQuery

func ListByQuery(ctx context.Context, query firestore.Query, dsts interface{}) error

ListByQuery ... クエリで複数取得する

func ListByQueryCursor

func ListByQueryCursor(ctx context.Context, query firestore.Query, limit int, cursor *firestore.DocumentSnapshot, dsts interface{}) (*firestore.DocumentSnapshot, error)

ListByQueryCursor ... クエリで複数取得する(ページング)

func NewClient

func NewClient(projectID string) *firestore.Client

NewClient ... Firestoreのクライアントを取得する

func Set

func Set(ctx context.Context, docRef *firestore.DocumentRef, src interface{}) error

Set ... 上書きする

func TxCreate

func TxCreate(ctx context.Context, tx *firestore.Transaction, colRef *firestore.CollectionRef, src interface{}) error

TxCreate ... 作成する(トランザクション)

func TxDelete

func TxDelete(ctx context.Context, tx *firestore.Transaction, docRef *firestore.DocumentRef) error

TxDelete ... 削除する(トランザクション)

func TxGet

func TxGet(ctx context.Context, tx *firestore.Transaction, docRef *firestore.DocumentRef, dst interface{}) (bool, error)

TxGet ... 1つ取得する(トランザクション)

func TxGetByQuery

func TxGetByQuery(ctx context.Context, tx *firestore.Transaction, query firestore.Query, dst interface{}) (bool, error)

TxGetByQuery ... クエリで1つ取得する(トランザクション)

func TxGetMulti

func TxGetMulti(ctx context.Context, tx *firestore.Transaction, docRefs []*firestore.DocumentRef, dsts interface{}) error

TxGetMulti ... 複数取得する(トランザクション)

func TxListByQuery

func TxListByQuery(ctx context.Context, tx *firestore.Transaction, query firestore.Query, dsts interface{}) error

TxListByQuery ... クエリで複数取得する(トランザクション)

func TxSet

func TxSet(ctx context.Context, tx *firestore.Transaction, docRef *firestore.DocumentRef, src interface{}) error

TxSet ... 上書きする(トランザクション)

func TxUpdate

func TxUpdate(ctx context.Context, tx *firestore.Transaction, docRef *firestore.DocumentRef, kv map[string]interface{}) error

TxUpdate ... 更新する(トランザクション)

func Update

func Update(ctx context.Context, docRef *firestore.DocumentRef, kv map[string]interface{}) error

Update ... 更新する

Types

type DocRef

type DocRef struct {
	CollectionName string `json:"collection_name"`
	DocID          string `json:"doc_id"`
}

DocRef ... 個別のドキュメント参照

type SummaryDocRef

type SummaryDocRef struct {
	ID   string `json:"id"`
	Path string `json:"path"`
}

SummaryDocRef ... 最小のドキュメント参照(フロントに返せる)

func GenerateSummaryDocRef

func GenerateSummaryDocRef(docRef *firestore.DocumentRef, rootCollectionPath string) *SummaryDocRef

GenerateSummaryDocRef ... 最小のドキュメント参照を取得する

Jump to

Keyboard shortcuts

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