Documentation
¶
Index ¶
- func AddStartWith(q firestore.Query, key string, word string) firestore.Query
- func CommitBulkWriter(ctx context.Context) (context.Context, error)
- func Create(ctx context.Context, colRef *firestore.CollectionRef, src any) error
- func Delete(ctx context.Context, docRef *firestore.DocumentRef) error
- func GenerateDocumentRef(cFirestore *firestore.Client, docRefs []*DocRef) *firestore.DocumentRef
- func Get(ctx context.Context, docRef *firestore.DocumentRef, dst any) (bool, error)
- func GetByQuery(ctx context.Context, query firestore.Query, dst any) (bool, error)
- func GetMulti(ctx context.Context, cFirestore *firestore.Client, ...) error
- func ListByQuery(ctx context.Context, query firestore.Query, dsts any) error
- func ListByQueryCursor(ctx context.Context, query firestore.Query, limit int, ...) (*firestore.DocumentSnapshot, error)
- func NewClient(projectID string) *firestore.Client
- func RunBulkWriter(ctx context.Context, cFirestore *firestore.Client) context.Context
- func RunTransaction(ctx context.Context, cFirestore *firestore.Client, ...) error
- func Set(ctx context.Context, docRef *firestore.DocumentRef, src any) error
- func Update(ctx context.Context, docRef *firestore.DocumentRef, kv map[string]any) error
- func ValidateCollectionRef(colRef *firestore.CollectionRef) bool
- func ValidateDocumentID(str string) bool
- func ValidateDocumentRef(docRef *firestore.DocumentRef) bool
- type DocRef
- type SummaryDocRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStartWith ¶
前方一致クエリを追加する
func CommitBulkWriter ¶ added in v1.5.0
func GenerateDocumentRef ¶
func GenerateDocumentRef(cFirestore *firestore.Client, docRefs []*DocRef) *firestore.DocumentRef
ドキュメント参照を作成する
func GetByQuery ¶
クエリで単体取得する(tx対応)
func GetMulti ¶
func GetMulti(ctx context.Context, cFirestore *firestore.Client, docRefs []*firestore.DocumentRef, dsts any) error
複数取得する(tx対応)
func ListByQuery ¶
クエリで複数取得する(tx対応)
func ListByQueryCursor ¶
func ListByQueryCursor(ctx context.Context, query firestore.Query, limit int, cursor *firestore.DocumentSnapshot, dsts any) (*firestore.DocumentSnapshot, error)
クエリで複数取得する(ページング)
func RunBulkWriter ¶ added in v1.5.0
func RunTransaction ¶ added in v1.0.6
func ValidateCollectionRef ¶ added in v1.4.0
func ValidateCollectionRef(colRef *firestore.CollectionRef) bool
正常な Path かチェック
func ValidateDocumentID ¶ added in v1.4.0
正常な DocumentID かチェック
func ValidateDocumentRef ¶ added in v1.4.0
func ValidateDocumentRef(docRef *firestore.DocumentRef) bool
正常な Path かチェック
Types ¶
type SummaryDocRef ¶
最小のドキュメント参照(フロントに返せる)
func GenerateSummaryDocRef ¶
func GenerateSummaryDocRef(docRef *firestore.DocumentRef, rootCollectionPath string) *SummaryDocRef
最小のドキュメント参照を取得する
Click to show internal directories.
Click to hide internal directories.